Bug 1100635 - Fix strict warning in xpcshell/head.js. r=cmanchester+432261

MozReview-Commit-ID: 3KktUF0n5GB

--HG--
extra : rebase_source : 8a560a3ebc3ad56c6011c01c0b8df71184887af6
This commit is contained in:
Andrew McCreight 2017-06-16 15:30:47 -07:00
parent ed863255b4
commit 1b0c3c5f57

View File

@ -12,8 +12,7 @@
/* defined by the harness */
/* globals _HEAD_FILES, _HEAD_JS_PATH, _JSDEBUGGER_PORT, _JSCOV_DIR,
_MOZINFO_JS_PATH, _TEST_FILE, _TEST_NAME, _TESTING_MODULES_DIR,
_XPCSHELL_PROCESS:true */
_MOZINFO_JS_PATH, _TEST_FILE, _TEST_NAME, _TESTING_MODULES_DIR:true */
/* defined by XPCShellImpl.cpp */
/* globals load, sendCommand */
@ -31,6 +30,9 @@ var _cleanupFunctions = [];
var _pendingTimers = [];
var _profileInitialized = false;
// Assigned in do_load_child_test_harness.
var _XPCSHELL_PROCESS;
// Register the testing-common resource protocol early, to have access to its
// modules.
_register_modules_protocol_handler();
@ -51,7 +53,6 @@ var Assert = new AssertCls(function(err, message, stack) {
}
});
var _add_params = function(params) {
if (typeof _XPCSHELL_PROCESS != "undefined") {
params.xpcshell_process = _XPCSHELL_PROCESS;
@ -1251,7 +1252,7 @@ function do_load_child_test_harness() {
+ "const _TEST_NAME=" + uneval(_TEST_NAME) + "; "
// We'll need more magic to get the debugger working in the child
+ "const _JSDEBUGGER_PORT=0; "
+ "const _XPCSHELL_PROCESS='child';";
+ "_XPCSHELL_PROCESS='child';";
if (typeof _JSCOV_DIR === "string") {
command += " const _JSCOV_DIR=" + uneval(_JSCOV_DIR) + ";";