Move TreeStyleTabBase.evalInSandbox() to TreeStyleTabUtils.
This commit is contained in:
parent
94067b8bf8
commit
665cb5668f
@ -616,18 +616,7 @@ var TreeStyleTabBase = {
|
||||
{
|
||||
return boxObject.getBoxObjectFor(aNode);
|
||||
},
|
||||
|
||||
evalInSandbox : function utils_evalInSandbox(aCode, aOwner)
|
||||
{
|
||||
try {
|
||||
var sandbox = new Components.utils.Sandbox(aOwner || 'about:blank');
|
||||
return Components.utils.evalInSandbox(aCode, sandbox);
|
||||
}
|
||||
catch(e) {
|
||||
}
|
||||
return void(0);
|
||||
},
|
||||
|
||||
|
||||
get browserWindow()
|
||||
{
|
||||
return this.topBrowserWindow;
|
||||
|
@ -3959,7 +3959,7 @@ TreeStyleTabBrowser.prototype = {
|
||||
return;
|
||||
|
||||
var indexes = [];
|
||||
var items = this.evalInSandbox('('+this.SessionStore.getClosedTabData(this.window)+')');
|
||||
var items = utils.evalInSandbox('('+this.SessionStore.getClosedTabData(this.window)+')');
|
||||
for (let i = 0, maxi = items.length; i < maxi; i++)
|
||||
{
|
||||
let item = items[i];
|
||||
|
@ -90,6 +90,17 @@ let TreeStyleTabUtils = {
|
||||
},
|
||||
get tabbrowserBundle () {
|
||||
return stringBundle.get('chrome://browser/locale/tabbrowser.properties');
|
||||
},
|
||||
|
||||
evalInSandbox : function utils_evalInSandbox(aCode, aOwner)
|
||||
{
|
||||
try {
|
||||
var sandbox = new Cu.Sandbox(aOwner || 'about:blank');
|
||||
return Cu.evalInSandbox(aCode, sandbox);
|
||||
}
|
||||
catch(e) {
|
||||
}
|
||||
return void(0);
|
||||
}
|
||||
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user