Bug 1390106 - Stop using versioned scripts in js/src. r?arai
MozReview-Commit-ID: IfPBaEr62Mi
--- a/js/src/gdb/gdb-tests.cpp
+++ b/js/src/gdb/gdb-tests.cpp
@@ -74,17 +74,17 @@ main(int argc, const char** argv)
checkBool(JS::InitSelfHostedCode(cx));
JS::SetWarningReporter(cx, reportWarning);
JSAutoRequest ar(cx);
/* Create the global object. */
JS::CompartmentOptions options;
- options.behaviors().setVersion(JSVERSION_LATEST);
+ options.behaviors().setVersion(JSVERSION_DEFAULT);
RootedObject global(cx, checkPtr(JS_NewGlobalObject(cx, &global_class,
nullptr, JS::FireOnNewGlobalHook, options)));
JSAutoCompartment ac(cx, global);
/* Populate the global object with the standard globals,
like Object and Array. */
checkBool(JS_InitStandardClasses(cx, global));
--- a/js/src/jsapi-tests/testPreserveJitCode.cpp
+++ b/js/src/jsapi-tests/testPreserveJitCode.cpp
@@ -86,12 +86,12 @@ testPreserveJitCode(bool preserveJitCode
return true;
}
JSObject*
createTestGlobal(bool preserveJitCode)
{
JS::CompartmentOptions options;
options.creationOptions().setPreserveJitCode(preserveJitCode);
- options.behaviors().setVersion(JSVERSION_LATEST);
+ options.behaviors().setVersion(JSVERSION_DEFAULT);
return JS_NewGlobalObject(cx, getGlobalClass(), nullptr, JS::FireOnNewGlobalHook, options);
}
END_TEST(test_PreserveJitCode)
--- a/js/src/jsapi-tests/testWeakMap.cpp
+++ b/js/src/jsapi-tests/testWeakMap.cpp
@@ -232,17 +232,17 @@ JSObject* newDelegate()
&delegateClassOps,
JS_NULL_CLASS_SPEC,
&delegateClassExtension,
JS_NULL_OBJECT_OPS
};
/* Create the global object. */
JS::CompartmentOptions options;
- options.behaviors().setVersion(JSVERSION_LATEST);
+ options.behaviors().setVersion(JSVERSION_DEFAULT);
JS::RootedObject global(cx, JS_NewGlobalObject(cx, Jsvalify(&delegateClass), nullptr,
JS::FireOnNewGlobalHook, options));
if (!global)
return nullptr;
JS_SetReservedSlot(global, 0, JS::Int32Value(42));
return global;
--- a/js/src/jsapi-tests/tests.cpp
+++ b/js/src/jsapi-tests/tests.cpp
@@ -82,17 +82,17 @@ JSObject* JSAPITest::createGlobal(JSPrin
{
/* Create the global object. */
JS::RootedObject newGlobal(cx);
JS::CompartmentOptions options;
#ifdef ENABLE_STREAMS
options.creationOptions().setStreamsEnabled(true);
#endif
printf("enabled\n");
- options.behaviors().setVersion(JSVERSION_LATEST);
+ options.behaviors().setVersion(JSVERSION_DEFAULT);
newGlobal = JS_NewGlobalObject(cx, getGlobalClass(), principals, JS::FireOnNewGlobalHook,
options);
if (!newGlobal)
return nullptr;
JSAutoCompartment ac(cx, newGlobal);
// Populate the global object with the standard globals like Object and
--- a/js/src/shell/js.cpp
+++ b/js/src/shell/js.cpp
@@ -626,17 +626,17 @@ InitModuleLoader(JSContext* cx)
return false;
}
CompileOptions options(cx);
options.setIntroductionType("shell module loader");
options.setFileAndLine("shell/ModuleLoader.js", 1);
options.setSelfHostingMode(false);
options.setCanLazilyParse(false);
- options.setVersion(JSVERSION_LATEST);
+ options.setVersion(JSVERSION_DEFAULT);
options.werrorOption = true;
options.strictOption = true;
RootedValue rv(cx);
return Evaluate(cx, options, src, srcLen, &rv);
}
static bool
--- a/js/src/vm/SelfHosting.cpp
+++ b/js/src/vm/SelfHosting.cpp
@@ -2599,17 +2599,17 @@ js::FillSelfHostingCompileOptions(Compil
* Additionally, the special syntax callFunction(fun, receiver, ...args)
* is supported, for which bytecode is emitted that invokes |fun| with
* |receiver| as the this-object and ...args as the arguments.
*/
options.setIntroductionType("self-hosted");
options.setFileAndLine("self-hosted", 1);
options.setSelfHostingMode(true);
options.setCanLazilyParse(false);
- options.setVersion(JSVERSION_LATEST);
+ options.setVersion(JSVERSION_DEFAULT);
options.werrorOption = true;
options.strictOption = true;
#ifdef DEBUG
options.extraWarningsOption = true;
#endif
}