Bug 1390106 - Stop using versioned scripts in js/src. r=luke
authorMasatoshi Kimura <VYV03354@nifty.ne.jp>
Mon, 14 Aug 2017 20:43:47 +0900
changeset 647060 6f3a0d0bc34d18bb22d51a66ba3abfa166d26506
parent 647059 1eb26b7019757eabd670f8203872076e404dca4e
child 647061 e943579bb054fe3fa18ffa468e821ca703ae46c0
push id74288
push userhikezoe@mozilla.com
push dateWed, 16 Aug 2017 00:19:57 +0000
reviewersluke
bugs1390106
milestone57.0a1
Bug 1390106 - Stop using versioned scripts in js/src. r=luke MozReview-Commit-ID: IfPBaEr62Mi
js/src/gdb/gdb-tests.cpp
js/src/jsapi-tests/testPreserveJitCode.cpp
js/src/jsapi-tests/testWeakMap.cpp
js/src/jsapi-tests/tests.cpp
js/src/shell/js.cpp
js/src/vm/SelfHosting.cpp
--- 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
 }