mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 10:00:54 +00:00
Bug 1048833 - Prevent unnecessary SpecialPowers loading. r=dburns
This commit is contained in:
parent
14fdb73360
commit
62fdc22e51
@ -402,9 +402,16 @@ function createExecuteContentSandbox(aWindow, timeout) {
|
||||
}
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyGetter(sandbox, 'SpecialPowers', function() {
|
||||
return new SpecialPowers(aWindow);
|
||||
});
|
||||
if (aWindow.wrappedJSObject.SpecialPowers != undefined) {
|
||||
XPCOMUtils.defineLazyGetter(sandbox, 'SpecialPowers', function() {
|
||||
return aWindow.wrappedJSObject.SpecialPowers;
|
||||
});
|
||||
}
|
||||
else {
|
||||
XPCOMUtils.defineLazyGetter(sandbox, 'SpecialPowers', function() {
|
||||
return new SpecialPowers(aWindow);
|
||||
});
|
||||
}
|
||||
|
||||
sandbox.asyncComplete = function sandbox_asyncComplete(value, status, stack, commandId) {
|
||||
if (commandId == asyncTestCommandId) {
|
||||
|
Loading…
Reference in New Issue
Block a user