mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 19:35:51 +00:00
Bug 1602898: Rename Window.getWindowGlobalChild() to .windowGlobalChild. r=farre
Differential Revision: https://phabricator.services.mozilla.com/D56609 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
c3eb36bee1
commit
aa0306477e
@ -112,7 +112,7 @@ class WebRTCChild extends JSWindowActorChild {
|
||||
}
|
||||
|
||||
function getActorForWindow(window) {
|
||||
let windowGlobal = window.getWindowGlobalChild();
|
||||
let windowGlobal = window.windowGlobalChild;
|
||||
try {
|
||||
if (windowGlobal) {
|
||||
return windowGlobal.getActor("WebRTC");
|
||||
|
@ -40,10 +40,7 @@ function init() {
|
||||
window.addEventListener(
|
||||
"pageshow",
|
||||
e => {
|
||||
window
|
||||
.getWindowGlobalChild()
|
||||
.getActor("LightweightTheme")
|
||||
.handleEvent(e);
|
||||
window.windowGlobalChild.getActor("LightweightTheme").handleEvent(e);
|
||||
},
|
||||
{ once: true }
|
||||
);
|
||||
|
@ -63,10 +63,7 @@ function HistorySidebarInit() {
|
||||
window.addEventListener(
|
||||
"pageshow",
|
||||
e => {
|
||||
window
|
||||
.getWindowGlobalChild()
|
||||
.getActor("LightweightTheme")
|
||||
.handleEvent(e);
|
||||
window.windowGlobalChild.getActor("LightweightTheme").handleEvent(e);
|
||||
},
|
||||
{ once: true }
|
||||
);
|
||||
|
@ -1929,7 +1929,7 @@ var gPrivacyPane = {
|
||||
*/
|
||||
showPasswords() {
|
||||
if (LoginHelper.managementURI) {
|
||||
let loginManager = window.getWindowGlobalChild().getActor("LoginManager");
|
||||
let loginManager = window.windowGlobalChild.getActor("LoginManager");
|
||||
loginManager.sendAsyncMessage("PasswordManager:OpenPreferences", {
|
||||
entryPoint: "preferences",
|
||||
});
|
||||
|
@ -59,9 +59,7 @@ class SiteSpecificBrowserChild extends JSWindowActorChild {
|
||||
}
|
||||
|
||||
function getActor(docShell) {
|
||||
return docShell.domWindow
|
||||
.getWindowGlobalChild()
|
||||
.getActor("SiteSpecificBrowser");
|
||||
return docShell.domWindow.windowGlobalChild.getActor("SiteSpecificBrowser");
|
||||
}
|
||||
|
||||
// JS actors can't generally be XPCOM objects so we must use a separate class.
|
||||
|
@ -35,10 +35,7 @@ let onLoaded = () => {
|
||||
window.addEventListener(
|
||||
"pageshow",
|
||||
e => {
|
||||
window
|
||||
.getWindowGlobalChild()
|
||||
.getActor("LightweightTheme")
|
||||
.handleEvent(e);
|
||||
window.windowGlobalChild.getActor("LightweightTheme").handleEvent(e);
|
||||
},
|
||||
{ once: true }
|
||||
);
|
||||
|
@ -89,8 +89,8 @@ function getActorFromWindow(contentWindow, name = "FormAutofill") {
|
||||
return null;
|
||||
}
|
||||
|
||||
return contentWindow.getWindowGlobalChild
|
||||
? contentWindow.getWindowGlobalChild().getActor(name)
|
||||
return contentWindow.windowGlobalChild
|
||||
? contentWindow.windowGlobalChild.getActor(name)
|
||||
: null;
|
||||
}
|
||||
|
||||
|
@ -919,7 +919,7 @@ class FormAutofillCreditCardSection extends FormAutofillSection {
|
||||
return null;
|
||||
}
|
||||
|
||||
let actor = window.getWindowGlobalChild().getActor("FormAutofill");
|
||||
let actor = window.windowGlobalChild.getActor("FormAutofill");
|
||||
return actor.sendQuery("FormAutofill:GetDecryptedString", {
|
||||
cipherText,
|
||||
reauth,
|
||||
|
@ -449,9 +449,6 @@ Minimal Example Actors
|
||||
// resource://testing-common/TestParent.jsm
|
||||
var EXPORTED_SYMBOLS = ["TestParent"];
|
||||
class TestParent extends JSWindowActorParent {
|
||||
constructor() {
|
||||
super();
|
||||
}
|
||||
...
|
||||
}
|
||||
|
||||
@ -460,9 +457,6 @@ Minimal Example Actors
|
||||
// resource://testing-common/TestChild.jsm
|
||||
var EXPORTED_SYMBOLS = ["TestChild"];
|
||||
class TestChild extends JSWindowActorChild {
|
||||
constructor() {
|
||||
super();
|
||||
}
|
||||
...
|
||||
}
|
||||
|
||||
@ -475,7 +469,7 @@ Minimal Example Actors
|
||||
let parentActor = this.browser.browsingContext.currentWindowGlobal.getActor("Test");
|
||||
|
||||
// get child side actor
|
||||
let childActor = content.window.getWindowGlobalChild().getActor("Test");
|
||||
let childActor = content.windowGlobalChild.getActor("Test");
|
||||
|
||||
.. _Electrolysis Project: https://wiki.mozilla.org/Electrolysis
|
||||
.. _IPC Actors: https://developer.mozilla.org/en-US/docs/Mozilla/IPDL/Tutorial
|
||||
|
@ -13,7 +13,7 @@ declTest("destroy actor by iframe remove", {
|
||||
content.document.body.appendChild(frame);
|
||||
await ContentTaskUtils.waitForEvent(frame, "load");
|
||||
is(content.window.frames.length, 1, "There should be an iframe.");
|
||||
let child = frame.contentWindow.window.getWindowGlobalChild();
|
||||
let child = frame.contentWindow.windowGlobalChild;
|
||||
let actorChild = child.getActor("Test");
|
||||
ok(actorChild, "JSWindowActorChild should have value.");
|
||||
|
||||
@ -67,7 +67,7 @@ declTest("destroy actor by page navigates", {
|
||||
await SpecialPowers.spawn(browser, [TEST_URL], async function(url) {
|
||||
let frame = content.document.querySelector("iframe");
|
||||
frame.contentWindow.location = url;
|
||||
let child = frame.contentWindow.window.getWindowGlobalChild();
|
||||
let child = frame.contentWindow.windowGlobalChild;
|
||||
let actorChild = child.getActor("Test");
|
||||
ok(actorChild, "JSWindowActorChild should have value.");
|
||||
|
||||
|
@ -11,7 +11,7 @@ declTest("getActor on both sides", {
|
||||
is(actorParent.manager, parent, "manager should match WindowGlobalParent.");
|
||||
|
||||
await SpecialPowers.spawn(browser, [], async function() {
|
||||
let child = content.window.getWindowGlobalChild();
|
||||
let child = content.windowGlobalChild;
|
||||
ok(child, "WindowGlobalChild should have value.");
|
||||
is(
|
||||
child.isInProcess,
|
||||
|
@ -17,7 +17,7 @@ declTest("getActor with mismatch", {
|
||||
);
|
||||
|
||||
await SpecialPowers.spawn(browser, [], async function() {
|
||||
let child = content.getWindowGlobalChild();
|
||||
let child = content.windowGlobalChild;
|
||||
ok(child, "WindowGlobalChild should have value.");
|
||||
|
||||
Assert.throws(
|
||||
@ -38,7 +38,7 @@ declTest("getActor with matches", {
|
||||
ok(parent.getActor("Test"), "JSWindowActorParent should have value.");
|
||||
|
||||
await SpecialPowers.spawn(browser, [], async function() {
|
||||
let child = content.getWindowGlobalChild();
|
||||
let child = content.windowGlobalChild;
|
||||
ok(child, "WindowGlobalChild should have value.");
|
||||
ok(child.getActor("Test"), "JSWindowActorChild should have value.");
|
||||
});
|
||||
@ -59,7 +59,7 @@ declTest("getActor with iframe matches", {
|
||||
|
||||
is(content.frames.length, 1, "There should be an iframe.");
|
||||
await content.SpecialPowers.spawn(frame, [], () => {
|
||||
let child = content.getWindowGlobalChild();
|
||||
let child = content.windowGlobalChild;
|
||||
Assert.ok(
|
||||
child.getActor("Test"),
|
||||
"JSWindowActorChild should have value."
|
||||
@ -83,7 +83,7 @@ declTest("getActor with iframe mismatch", {
|
||||
|
||||
is(content.frames.length, 1, "There should be an iframe.");
|
||||
await content.SpecialPowers.spawn(frame, [], () => {
|
||||
let child = content.getWindowGlobalChild();
|
||||
let child = content.windowGlobalChild;
|
||||
Assert.throws(
|
||||
() => child.getActor("Test"),
|
||||
/NS_ERROR_NOT_AVAILABLE/,
|
||||
@ -102,7 +102,7 @@ declTest("getActor with remoteType match", {
|
||||
ok(parent.getActor("Test"), "JSWindowActorParent should have value.");
|
||||
|
||||
await SpecialPowers.spawn(browser, [], async function() {
|
||||
let child = content.getWindowGlobalChild();
|
||||
let child = content.windowGlobalChild;
|
||||
ok(child, "WindowGlobalChild should have value.");
|
||||
ok(child.getActor("Test"), "JSWindowActorChild should have value.");
|
||||
});
|
||||
@ -115,7 +115,7 @@ declTest("getActor with iframe remoteType match", {
|
||||
|
||||
async test(browser) {
|
||||
await SpecialPowers.spawn(browser, [TEST_URL], async function(url) {
|
||||
let child = content.getWindowGlobalChild();
|
||||
let child = content.windowGlobalChild;
|
||||
ok(child, "WindowGlobalChild should have value.");
|
||||
ok(child.getActor("Test"), "JSWindowActorChild should have value.");
|
||||
|
||||
@ -127,7 +127,7 @@ declTest("getActor with iframe remoteType match", {
|
||||
|
||||
is(content.frames.length, 1, "There should be an iframe.");
|
||||
await content.SpecialPowers.spawn(frame, [], () => {
|
||||
child = content.getWindowGlobalChild();
|
||||
child = content.windowGlobalChild;
|
||||
Assert.ok(
|
||||
child.getActor("Test"),
|
||||
"JSWindowActorChild should have value."
|
||||
@ -150,7 +150,7 @@ declTest("getActor with remoteType mismatch", {
|
||||
);
|
||||
|
||||
await SpecialPowers.spawn(browser, [], async function() {
|
||||
let child = content.getWindowGlobalChild();
|
||||
let child = content.windowGlobalChild;
|
||||
ok(child, "WindowGlobalChild should have value.");
|
||||
Assert.throws(
|
||||
() => child.getActor("Test"),
|
||||
@ -170,7 +170,7 @@ declTest("getActor without allFrames", {
|
||||
let frame = content.document.createElement("iframe");
|
||||
content.document.body.appendChild(frame);
|
||||
is(content.frames.length, 1, "There should be an iframe.");
|
||||
let child = frame.contentWindow.getWindowGlobalChild();
|
||||
let child = frame.contentWindow.windowGlobalChild;
|
||||
Assert.throws(
|
||||
() => child.getActor("Test"),
|
||||
/NS_ERROR_NOT_AVAILABLE/,
|
||||
@ -189,7 +189,7 @@ declTest("getActor with allFrames", {
|
||||
let frame = content.document.createElement("iframe");
|
||||
content.document.body.appendChild(frame);
|
||||
is(content.frames.length, 1, "There should be an iframe.");
|
||||
let child = frame.contentWindow.getWindowGlobalChild();
|
||||
let child = frame.contentWindow.windowGlobalChild;
|
||||
let actorChild = child.getActor("Test");
|
||||
ok(actorChild, "JSWindowActorChild should have value.");
|
||||
});
|
||||
|
@ -9,13 +9,13 @@ declTest("test observer triggering actor creation", {
|
||||
const TOPIC = "test-js-window-actor-child-observer";
|
||||
Services.obs.notifyObservers(content.window, TOPIC, "dataString");
|
||||
|
||||
let child = content.window.getWindowGlobalChild();
|
||||
let child = content.windowGlobalChild;
|
||||
let actorChild = child.getActor("Test");
|
||||
ok(actorChild, "JSWindowActorChild should have value.");
|
||||
let { subject, topic, data } = actorChild.lastObserved;
|
||||
|
||||
is(
|
||||
subject.getWindowGlobalChild().getActor("Test"),
|
||||
subject.windowGlobalChild.getActor("Test"),
|
||||
actorChild,
|
||||
"Should have been recieved on the right actor"
|
||||
);
|
||||
@ -31,13 +31,13 @@ declTest("test observers with null data", {
|
||||
const TOPIC = "test-js-window-actor-child-observer";
|
||||
Services.obs.notifyObservers(content.window, TOPIC);
|
||||
|
||||
let child = content.window.getWindowGlobalChild();
|
||||
let child = content.windowGlobalChild;
|
||||
let actorChild = child.getActor("Test");
|
||||
ok(actorChild, "JSWindowActorChild should have value.");
|
||||
let { subject, topic, data } = actorChild.lastObserved;
|
||||
|
||||
is(
|
||||
subject.getWindowGlobalChild().getActor("Test"),
|
||||
subject.windowGlobalChild.getActor("Test"),
|
||||
actorChild,
|
||||
"Should have been recieved on the right actor"
|
||||
);
|
||||
@ -52,7 +52,7 @@ declTest("observers don't notify with wrong window", {
|
||||
await SpecialPowers.spawn(browser, [], async function() {
|
||||
const TOPIC = "test-js-window-actor-child-observer";
|
||||
Services.obs.notifyObservers(null, TOPIC);
|
||||
let child = content.window.getWindowGlobalChild();
|
||||
let child = content.windowGlobalChild;
|
||||
let actorChild = child.getActor("Test");
|
||||
ok(actorChild, "JSWindowActorChild should have value.");
|
||||
is(
|
||||
@ -73,7 +73,7 @@ declTest("observers notify with audio-playback", {
|
||||
let audio = content.document.querySelector("audio");
|
||||
audio.play();
|
||||
|
||||
let child = content.window.getWindowGlobalChild();
|
||||
let child = content.windowGlobalChild;
|
||||
let actorChild = child.getActor("Test");
|
||||
ok(actorChild, "JSWindowActorChild should have value.");
|
||||
|
||||
|
@ -9,7 +9,7 @@ declTest("asyncMessage testing", {
|
||||
ok(actorParent, "JSWindowActorParent should have value.");
|
||||
|
||||
await ContentTask.spawn(browser, {}, async function() {
|
||||
let child = content.window.getWindowGlobalChild();
|
||||
let child = content.windowGlobalChild;
|
||||
let actorChild = child.getActor("Test");
|
||||
ok(actorChild, "JSWindowActorChild should have value.");
|
||||
|
||||
@ -32,7 +32,7 @@ declTest("asyncMessage without both sides", {
|
||||
// If we don't create a parent actor, make sure the parent actor
|
||||
// gets created by having sent the message.
|
||||
await ContentTask.spawn(browser, {}, async function() {
|
||||
let child = content.window.getWindowGlobalChild();
|
||||
let child = content.windowGlobalChild;
|
||||
let actorChild = child.getActor("Test");
|
||||
ok(actorChild, "JSWindowActorChild should have value.");
|
||||
|
||||
|
@ -84,7 +84,7 @@ declTest("sendQuery in-process early lifetime", {
|
||||
async test(browser) {
|
||||
let iframe = browser.contentDocument.createElement("iframe");
|
||||
browser.contentDocument.body.appendChild(iframe);
|
||||
let wgc = iframe.contentWindow.getWindowGlobalChild();
|
||||
let wgc = iframe.contentWindow.windowGlobalChild;
|
||||
let actorChild = wgc.getActor("Test");
|
||||
let { result } = await actorChild.sendQuery("asyncMul", { a: 10, b: 20 });
|
||||
is(result, 200);
|
||||
|
@ -548,8 +548,8 @@ partial interface Window {
|
||||
[ChromeOnly]
|
||||
readonly attribute boolean hasOpenerForInitialContentBrowser;
|
||||
|
||||
[ChromeOnly]
|
||||
WindowGlobalChild? getWindowGlobalChild();
|
||||
[Pure, ChromeOnly]
|
||||
readonly attribute WindowGlobalChild? windowGlobalChild;
|
||||
};
|
||||
|
||||
Window includes TouchEventHandlers;
|
||||
|
@ -514,7 +514,7 @@ const STATE_COMPLETED = 5;
|
||||
function FlushRendering(aFlushMode) {
|
||||
let browsingContext = content.docShell.browsingContext;
|
||||
let ignoreThrottledAnimations = (aFlushMode === FlushMode.IGNORE_THROTTLED_ANIMATIONS);
|
||||
let promise = content.getWindowGlobalChild().getActor("ReftestFission").sendQuery("FlushRendering", {browsingContext, ignoreThrottledAnimations});
|
||||
let promise = content.windowGlobalChild.getActor("ReftestFission").sendQuery("FlushRendering", {browsingContext, ignoreThrottledAnimations});
|
||||
return promise.then(function(result) {
|
||||
for (let errorString of result.errorStrings) {
|
||||
LogError(errorString);
|
||||
@ -1382,7 +1382,7 @@ function SynchronizeForSnapshot(flags)
|
||||
}
|
||||
|
||||
let browsingContext = content.docShell.browsingContext;
|
||||
let promise = content.getWindowGlobalChild().getActor("ReftestFission").sendQuery("UpdateLayerTree", {browsingContext});
|
||||
let promise = content.windowGlobalChild.getActor("ReftestFission").sendQuery("UpdateLayerTree", {browsingContext});
|
||||
return promise.then(function (result) {
|
||||
for (let errorString of result) {
|
||||
LogError(errorString);
|
||||
|
@ -181,7 +181,7 @@ function Tester(aTests, structuredLogger, aCallback) {
|
||||
// Make sure our SpecialPowers actor is instantiated, in case it was
|
||||
// registered after our DOMWindowCreated event was fired (which it
|
||||
// most likely was).
|
||||
window.getWindowGlobalChild().getActor("SpecialPowers");
|
||||
void window.windowGlobalChild.getActor("SpecialPowers");
|
||||
|
||||
var simpleTestScope = {};
|
||||
this._scriptLoader.loadSubScript(
|
||||
|
@ -679,7 +679,7 @@ class SpecialPowersChild extends JSWindowActorChild {
|
||||
|
||||
async toggleMuteState(aMuted, aWindow) {
|
||||
let actor = aWindow
|
||||
? aWindow.getWindowGlobalChild().getActor("SpecialPowers")
|
||||
? aWindow.windowGlobalChild.getActor("SpecialPowers")
|
||||
: this;
|
||||
return actor.sendQuery("SPToggleMuteAudio", { mute: aMuted });
|
||||
}
|
||||
@ -1773,7 +1773,7 @@ class SpecialPowersChild extends JSWindowActorChild {
|
||||
|
||||
try {
|
||||
let actor = aWindow
|
||||
? aWindow.getWindowGlobalChild().getActor("SpecialPowers")
|
||||
? aWindow.windowGlobalChild.getActor("SpecialPowers")
|
||||
: this;
|
||||
actor.sendAsyncMessage("SpecialPowers.Focus", {});
|
||||
} catch (e) {
|
||||
|
@ -497,7 +497,7 @@ class BaseContext {
|
||||
* @returns {PointConduit}
|
||||
*/
|
||||
openConduit(subject, address) {
|
||||
let wgc = this.contentWindow.getWindowGlobalChild();
|
||||
let wgc = this.contentWindow.windowGlobalChild;
|
||||
let conduit = wgc.getActor("Conduits").openConduit(subject, {
|
||||
id: subject.id || getUniqueId(),
|
||||
extensionId: this.extension.id,
|
||||
|
@ -262,7 +262,7 @@ add_task(async function test_sub_subframe_conduit_verified_env() {
|
||||
async function faker(extensionId, envType) {
|
||||
try {
|
||||
let id = envType + "-xyz1234";
|
||||
let wgc = this.content.getWindowGlobalChild();
|
||||
let wgc = this.content.windowGlobalChild;
|
||||
|
||||
let conduit = wgc.getActor("Conduits").openConduit({}, {
|
||||
id,
|
||||
|
@ -375,7 +375,7 @@ let gAutoCompleteListener = {
|
||||
return;
|
||||
}
|
||||
|
||||
let loginManager = window.getWindowGlobalChild().getActor("LoginManager");
|
||||
let loginManager = window.windowGlobalChild.getActor("LoginManager");
|
||||
let hostname = eventTarget.ownerDocument.documentURIObject.host;
|
||||
loginManager.sendAsyncMessage("PasswordManager:OpenPreferences", {
|
||||
hostname,
|
||||
@ -424,7 +424,7 @@ this.LoginManagerChild = class LoginManagerChild extends JSWindowActorChild {
|
||||
}
|
||||
|
||||
static forWindow(window) {
|
||||
let windowGlobal = window.getWindowGlobalChild();
|
||||
let windowGlobal = window.windowGlobalChild;
|
||||
if (windowGlobal) {
|
||||
return windowGlobal.getActor("LoginManager");
|
||||
}
|
||||
@ -665,11 +665,13 @@ this.LoginManagerChild = class LoginManagerChild extends JSWindowActorChild {
|
||||
}
|
||||
|
||||
// Get the highest accessible docshell and attach the progress listener to that.
|
||||
let browsingContext = window.getWindowGlobalChild().browsingContext;
|
||||
let docShell;
|
||||
while (browsingContext && browsingContext.docShell) {
|
||||
for (
|
||||
let browsingContext = BrowsingContext.getFromWindow(window);
|
||||
browsingContext && browsingContext.docShell;
|
||||
browsingContext = browsingContext.parent
|
||||
) {
|
||||
docShell = browsingContext.docShell;
|
||||
browsingContext = browsingContext.parent;
|
||||
}
|
||||
|
||||
try {
|
||||
@ -1595,7 +1597,7 @@ this.LoginManagerChild = class LoginManagerChild extends JSWindowActorChild {
|
||||
}
|
||||
|
||||
let autoFilledLogin = docState.fillsByRootElement.get(form.rootElement);
|
||||
let browsingContextId = win.getWindowGlobalChild().browsingContext.id;
|
||||
let browsingContextId = win.windowGlobalChild.browsingContext.id;
|
||||
|
||||
let detail = {
|
||||
origin,
|
||||
|
@ -109,7 +109,7 @@ function checkAutoCompleteResults(actualValues, expectedValues, hostname, msg) {
|
||||
}
|
||||
|
||||
function getIframeBrowsingContext(window, iframeNumber = 0) {
|
||||
let bc = SpecialPowers.wrap(window).getWindowGlobalChild().browsingContext;
|
||||
let bc = SpecialPowers.wrap(window).windowGlobalChild.browsingContext;
|
||||
return SpecialPowers.unwrap(bc.getChildren()[iframeNumber]);
|
||||
}
|
||||
|
||||
|
@ -134,7 +134,7 @@ add_task(async function test_dedupe_subdomain() {
|
||||
"form-basic-password", "pass1");
|
||||
|
||||
let filledGUID = await SpecialPowers.spawn(bc, [], function getFilledGUID() {
|
||||
let LMC = this.content.getWindowGlobalChild().getActor("LoginManager");
|
||||
let LMC = this.content.windowGlobalChild.getActor("LoginManager");
|
||||
let doc = this.content.document;
|
||||
let form = doc.getElementById("form-basic");
|
||||
return LMC.stateForDocument(doc).fillsByRootElement.get(form).guid;
|
||||
|
@ -296,8 +296,8 @@
|
||||
Assert.equal(proxyok, "PASS", "Proxy Authorization OK, " + frameid);
|
||||
}
|
||||
|
||||
let parentIFrameBC = SpecialPowers.wrap(window).getWindowGlobalChild().
|
||||
browsingContext.getChildren()[0];
|
||||
let parentIFrameBC = SpecialPowers.wrap(window).windowGlobalChild
|
||||
.browsingContext.getChildren()[0];
|
||||
|
||||
let childIFrame = SpecialPowers.unwrap(parentIFrameBC.getChildren()[0]);
|
||||
await SpecialPowers.spawn(childIFrame, ["iframe1"], checkIframe);
|
||||
|
@ -545,8 +545,7 @@ function openTabPrompt(domWin, tabPrompt, args) {
|
||||
}
|
||||
|
||||
function openRemotePrompt(domWin, args) {
|
||||
let windowGlobal = domWin.getWindowGlobalChild();
|
||||
let actor = windowGlobal.getActor("Prompt");
|
||||
let actor = domWin.windowGlobalChild.getActor("Prompt");
|
||||
|
||||
let docShell = domWin.docShell;
|
||||
let inPermitUnload =
|
||||
|
@ -39,7 +39,7 @@ function isAutocompleteDisabled(aField) {
|
||||
function FormHistoryClient({ formField, inputName }) {
|
||||
if (formField && inputName != this.SEARCHBAR_ID) {
|
||||
let window = formField.ownerGlobal;
|
||||
this.windowGlobal = window.getWindowGlobalChild();
|
||||
this.windowGlobal = window.windowGlobalChild;
|
||||
} else if (inputName == this.SEARCHBAR_ID && formField) {
|
||||
throw new Error(
|
||||
"FormHistoryClient constructed with both a " +
|
||||
|
@ -85,8 +85,7 @@ var ContentDOMReference = {
|
||||
);
|
||||
}
|
||||
|
||||
let browsingContext = element.ownerGlobal.getWindowGlobalChild()
|
||||
.browsingContext;
|
||||
let browsingContext = BrowsingContext.getFromWindow(element.ownerGlobal);
|
||||
let mappings = gRegistry.get(browsingContext);
|
||||
if (!mappings) {
|
||||
mappings = {
|
||||
|
@ -40,6 +40,7 @@ const extraDefinitions = [
|
||||
// single) variable.
|
||||
{ name: "XPCOMUtils", writable: false },
|
||||
{ name: "Task", writable: false },
|
||||
{ name: "windowGlobalChild", writable: false },
|
||||
];
|
||||
|
||||
// Some files in global-scripts.inc need mapping to specific locations.
|
||||
|
Loading…
Reference in New Issue
Block a user