mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 801937 - JavaScript strict warning in scratchpad.js; r=harth
This commit is contained in:
parent
94902b2e3f
commit
3c7636a394
@ -225,7 +225,7 @@ var Scratchpad = {
|
||||
this._previousLocation != this.gBrowser.contentWindow.location.href) {
|
||||
let contentWindow = this.gBrowser.selectedBrowser.contentWindow;
|
||||
this._contentSandbox = new Cu.Sandbox(contentWindow,
|
||||
{ sandboxPrototype: contentWindow, wantXrays: false,
|
||||
{ sandboxPrototype: contentWindow, wantXrays: false,
|
||||
sandboxName: 'scratchpad-content'});
|
||||
this._contentSandbox.__SCRATCHPAD__ = this;
|
||||
|
||||
@ -260,7 +260,7 @@ var Scratchpad = {
|
||||
if (!this._chromeSandbox ||
|
||||
this.browserWindow != this._previousBrowserWindow) {
|
||||
this._chromeSandbox = new Cu.Sandbox(this.browserWindow,
|
||||
{ sandboxPrototype: this.browserWindow, wantXrays: false,
|
||||
{ sandboxPrototype: this.browserWindow, wantXrays: false,
|
||||
sandboxName: 'scratchpad-chrome'});
|
||||
this._chromeSandbox.__SCRATCHPAD__ = this;
|
||||
addDebuggerToGlobal(this._chromeSandbox);
|
||||
@ -1243,8 +1243,13 @@ var Scratchpad = {
|
||||
}
|
||||
|
||||
this.resetContext();
|
||||
this.gBrowser.selectedBrowser.removeEventListener("load",
|
||||
this._reloadAndRunEvent, true);
|
||||
|
||||
// This event is created only after user uses 'reload and run' feature.
|
||||
if (this._reloadAndRunEvent) {
|
||||
this.gBrowser.selectedBrowser.removeEventListener("load",
|
||||
this._reloadAndRunEvent, true);
|
||||
}
|
||||
|
||||
this.editor.removeEventListener(SourceEditor.EVENTS.DIRTY_CHANGED,
|
||||
this._onDirtyChanged);
|
||||
PreferenceObserver.uninit();
|
||||
|
Loading…
Reference in New Issue
Block a user