From 1b0c3c5f57305b15f913509c4703594965fee9e9 Mon Sep 17 00:00:00 2001 From: Andrew McCreight Date: Fri, 16 Jun 2017 15:30:47 -0700 Subject: [PATCH] Bug 1100635 - Fix strict warning in xpcshell/head.js. r=cmanchester+432261 MozReview-Commit-ID: 3KktUF0n5GB --HG-- extra : rebase_source : 8a560a3ebc3ad56c6011c01c0b8df71184887af6 --- testing/xpcshell/head.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/testing/xpcshell/head.js b/testing/xpcshell/head.js index bbf1ccefc966..678da166c375 100644 --- a/testing/xpcshell/head.js +++ b/testing/xpcshell/head.js @@ -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) + ";";