Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: lib/utils.js

Issue 29356087: Issue 4497 - Move Utils.getRequestWindow() into child/utils.js (Closed) Base URL: https://hg.adblockplus.org/adblockplus
Patch Set: Created Oct. 6, 2016, 12:18 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/child/utils.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/utils.js
===================================================================
--- a/lib/utils.js
+++ b/lib/utils.js
@@ -205,36 +205,16 @@ let Utils = exports.Utils =
* @param {function} callback
*/
runAsync: function(callback)
{
Services.tm.currentThread.dispatch(callback, Ci.nsIEventTarget.DISPATCH_NORMAL);
},
/**
- * Gets the DOM window associated with a particular request (if any).
- */
- getRequestWindow: function(/**nsIChannel*/ channel) /**nsIDOMWindow*/
- {
- try
- {
- if (channel.notificationCallbacks)
- return channel.notificationCallbacks.getInterface(Ci.nsILoadContext).associatedWindow;
- } catch(e) {}
-
- try
- {
- if (channel.loadGroup && channel.loadGroup.notificationCallbacks)
- return channel.loadGroup.notificationCallbacks.getInterface(Ci.nsILoadContext).associatedWindow;
- } catch(e) {}
-
- return null;
- },
-
- /**
* Generates filter subscription checksum.
*
* @param {string[]} lines filter subscription lines (with checksum line removed)
* @return {String} checksum or null
*/
generateChecksum: function(lines)
{
let stream = null;
« no previous file with comments | « lib/child/utils.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld