Bug 801937 - JavaScript strict warning in scratchpad.js; r=harth
This commit is contained in:
@@ -225,7 +225,7 @@ var Scratchpad = {
|
|||||||
this._previousLocation != this.gBrowser.contentWindow.location.href) {
|
this._previousLocation != this.gBrowser.contentWindow.location.href) {
|
||||||
let contentWindow = this.gBrowser.selectedBrowser.contentWindow;
|
let contentWindow = this.gBrowser.selectedBrowser.contentWindow;
|
||||||
this._contentSandbox = new Cu.Sandbox(contentWindow,
|
this._contentSandbox = new Cu.Sandbox(contentWindow,
|
||||||
{ sandboxPrototype: contentWindow, wantXrays: false,
|
{ sandboxPrototype: contentWindow, wantXrays: false,
|
||||||
sandboxName: 'scratchpad-content'});
|
sandboxName: 'scratchpad-content'});
|
||||||
this._contentSandbox.__SCRATCHPAD__ = this;
|
this._contentSandbox.__SCRATCHPAD__ = this;
|
||||||
|
|
||||||
@@ -260,7 +260,7 @@ var Scratchpad = {
|
|||||||
if (!this._chromeSandbox ||
|
if (!this._chromeSandbox ||
|
||||||
this.browserWindow != this._previousBrowserWindow) {
|
this.browserWindow != this._previousBrowserWindow) {
|
||||||
this._chromeSandbox = new Cu.Sandbox(this.browserWindow,
|
this._chromeSandbox = new Cu.Sandbox(this.browserWindow,
|
||||||
{ sandboxPrototype: this.browserWindow, wantXrays: false,
|
{ sandboxPrototype: this.browserWindow, wantXrays: false,
|
||||||
sandboxName: 'scratchpad-chrome'});
|
sandboxName: 'scratchpad-chrome'});
|
||||||
this._chromeSandbox.__SCRATCHPAD__ = this;
|
this._chromeSandbox.__SCRATCHPAD__ = this;
|
||||||
addDebuggerToGlobal(this._chromeSandbox);
|
addDebuggerToGlobal(this._chromeSandbox);
|
||||||
@@ -1243,8 +1243,13 @@ var Scratchpad = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.resetContext();
|
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.editor.removeEventListener(SourceEditor.EVENTS.DIRTY_CHANGED,
|
||||||
this._onDirtyChanged);
|
this._onDirtyChanged);
|
||||||
PreferenceObserver.uninit();
|
PreferenceObserver.uninit();
|
||||||
|
|||||||
Reference in New Issue
Block a user