зеркало из https://github.com/mozilla/pjs.git
Bug 724286 - Fix TelemetryTimestamps, AddonManagerPrivate global scope pollution and whitelist __SSi. r=dietrich
This commit is contained in:
Родитель
dfae6bcec1
Коммит
e8ed468174
|
@ -137,8 +137,9 @@ __defineGetter__("gPrefService", function() {
|
|||
});
|
||||
|
||||
__defineGetter__("AddonManager", function() {
|
||||
Cu.import("resource://gre/modules/AddonManager.jsm");
|
||||
return this.AddonManager;
|
||||
let tmp = {};
|
||||
Cu.import("resource://gre/modules/AddonManager.jsm", tmp);
|
||||
return this.AddonManager = tmp.AddonManager;
|
||||
});
|
||||
__defineSetter__("AddonManager", function (val) {
|
||||
delete this.AddonManager;
|
||||
|
@ -1503,7 +1504,9 @@ function prepareForStartup() {
|
|||
}
|
||||
|
||||
function delayedStartup(isLoadingBlank, mustLoadSidebar) {
|
||||
Cu.import("resource:///modules/TelemetryTimestamps.jsm");
|
||||
let tmp = {};
|
||||
Cu.import("resource:///modules/TelemetryTimestamps.jsm", tmp);
|
||||
let TelemetryTimestamps = tmp.TelemetryTimestamps;
|
||||
TelemetryTimestamps.add("delayedStartupStarted");
|
||||
gDelayedStartupTimeoutId = null;
|
||||
|
||||
|
|
|
@ -11,7 +11,9 @@ function getSimpleMeasurementsFromTelemetryPing() {
|
|||
|
||||
function test() {
|
||||
// Test the module logic
|
||||
Cu.import("resource:///modules/TelemetryTimestamps.jsm");
|
||||
let tmp = {};
|
||||
Cu.import("resource:///modules/TelemetryTimestamps.jsm", tmp);
|
||||
let TelemetryTimestamps = tmp.TelemetryTimestamps;
|
||||
let now = Date.now();
|
||||
TelemetryTimestamps.add("foo");
|
||||
ok(TelemetryTimestamps.get().foo, "foo was added");
|
||||
|
|
|
@ -95,7 +95,7 @@ Tester.prototype = {
|
|||
this._cs.registerListener(this);
|
||||
this._globalProperties = Object.keys(window);
|
||||
this._globalPropertyWhitelist = ["navigator", "constructor", "Application",
|
||||
"__SS_tabsToRestore", "webConsoleCommandController",
|
||||
"__SS_tabsToRestore", "__SSi", "webConsoleCommandController",
|
||||
|
||||
// Temporarily added to whitelist for Fennec tests:
|
||||
"AddonUpdateChecker",
|
||||
|
|
|
@ -4,6 +4,11 @@
|
|||
|
||||
Components.utils.import("resource://gre/modules/NetUtil.jsm");
|
||||
|
||||
let tmp = {};
|
||||
Components.utils.import("resource://gre/modules/AddonManager.jsm", tmp);
|
||||
let AddonManager = tmp.AddonManager;
|
||||
let AddonManagerPrivate = tmp.AddonManagerPrivate;
|
||||
|
||||
var pathParts = gTestPath.split("/");
|
||||
// Drop the test filename
|
||||
pathParts.splice(pathParts.length - 1, pathParts.length);
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
const TEST_ROOT = "http://example.com/browser/toolkit/mozapps/plugins/tests/";
|
||||
|
||||
Components.utils.import("resource://gre/modules/AddonManager.jsm");
|
||||
let tmp = {};
|
||||
Components.utils.import("resource://gre/modules/AddonManager.jsm", tmp);
|
||||
let AddonManager = tmp.AddonManager;
|
||||
|
||||
var gPFS;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче