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

Unified Diff: lib/child/contentPolicy.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 | « no previous file | lib/child/elemHide.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/child/contentPolicy.js
===================================================================
--- a/lib/child/contentPolicy.js
+++ b/lib/child/contentPolicy.js
@@ -34,17 +34,17 @@ catch (e)
Cu.reportError(e);
}
let {XPCOMUtils} = Cu.import("resource://gre/modules/XPCOMUtils.jsm", {});
let {Services} = Cu.import("resource://gre/modules/Services.jsm", {});
let {port} = require("messaging");
let {Utils} = require("utils");
-let {getFrames, isPrivate} = require("child/utils");
+let {getFrames, isPrivate, getRequestWindow} = require("child/utils");
let {objectMouseEventHander} = require("child/objectTabs");
let {RequestNotifier} = require("child/requestNotifier");
/**
* Randomly generated class name, to be applied to collapsed nodes.
* @type Promise.<string>
*/
let collapsedClass = port.emitWithResponse("getCollapsedClass");
@@ -401,17 +401,17 @@ var PolicyImplementation =
// nsILoadInfo.contentPolicyType was introduced in Gecko 35, then
// renamed to nsILoadInfo.externalContentPolicyType in Gecko 44.
let loadInfo = oldChannel.loadInfo;
let contentType = ("externalContentPolicyType" in loadInfo ?
loadInfo.externalContentPolicyType : loadInfo.contentPolicyType);
if (!contentType)
return;
- let wnd = Utils.getRequestWindow(newChannel);
+ let wnd = getRequestWindow(newChannel);
if (!wnd)
return;
if (contentType == Ci.nsIContentPolicy.TYPE_DOCUMENT)
{
if (wnd.history.length <= 1 && wnd.opener)
{
// Special treatment for pop-up windows - this will close the window
« no previous file with comments | « no previous file | lib/child/elemHide.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld