diff --git a/js/src/jsapi-tests/testCompileNonSyntactic.cpp b/js/src/jsapi-tests/testCompileNonSyntactic.cpp index c7d156329a45..115eb397a62c 100644 --- a/js/src/jsapi-tests/testCompileNonSyntactic.cpp +++ b/js/src/jsapi-tests/testCompileNonSyntactic.cpp @@ -5,7 +5,7 @@ #include "mozilla/Utf8.h" // mozilla::Utf8Unit #include "gc/GCInternals.h" -#include "js/CompilationAndEvaluation.h" // JS::Compile{,ForNonSyntacticScope} +#include "js/CompilationAndEvaluation.h" // JS::Compile{,DontInflate,ForNonSyntacticScope} #include "js/SourceText.h" // JS::Source{Ownership,Text} #include "jsapi-tests/tests.h" #include "vm/Monitor.h" @@ -95,7 +95,7 @@ bool testCompile(bool nonSyntactic) { CHECK(script); CHECK_EQUAL(script->hasNonSyntacticScope(), nonSyntactic); - script = Compile(cx, options, buf8); + script = CompileDontInflate(cx, options, buf8); CHECK(script); CHECK_EQUAL(script->hasNonSyntacticScope(), nonSyntactic); diff --git a/js/src/jsapi-tests/testCompileUtf8.cpp b/js/src/jsapi-tests/testCompileUtf8.cpp index 1eb8adc14341..5bdad9caf7dd 100644 --- a/js/src/jsapi-tests/testCompileUtf8.cpp +++ b/js/src/jsapi-tests/testCompileUtf8.cpp @@ -11,7 +11,7 @@ #include "jsfriendapi.h" #include "js/CharacterEncoding.h" -#include "js/CompilationAndEvaluation.h" +#include "js/CompilationAndEvaluation.h" // JS::CompileDontInflate #include "js/SourceText.h" #include "jsapi-tests/tests.h" #include "vm/ErrorReporting.h" diff --git a/js/src/jsapi-tests/testEmptyWindowIsOmitted.cpp b/js/src/jsapi-tests/testEmptyWindowIsOmitted.cpp index 66f7ef0f48d3..40cbc16222d4 100644 --- a/js/src/jsapi-tests/testEmptyWindowIsOmitted.cpp +++ b/js/src/jsapi-tests/testEmptyWindowIsOmitted.cpp @@ -11,7 +11,7 @@ #include "jsfriendapi.h" #include "js/CharacterEncoding.h" -#include "js/CompilationAndEvaluation.h" +#include "js/CompilationAndEvaluation.h" // JS::Compile{,DontInflate} #include "js/SourceText.h" #include "jsapi-tests/tests.h" #include "vm/ErrorReporting.h" diff --git a/js/src/jsapi-tests/testGCCellPtr.cpp b/js/src/jsapi-tests/testGCCellPtr.cpp index 3d37f3345ec7..670aedcf6ba4 100644 --- a/js/src/jsapi-tests/testGCCellPtr.cpp +++ b/js/src/jsapi-tests/testGCCellPtr.cpp @@ -9,7 +9,7 @@ #include "jspubtd.h" #include "gc/Heap.h" -#include "js/CompilationAndEvaluation.h" // JS::Compile +#include "js/CompilationAndEvaluation.h" // JS::CompileDontInflate #include "js/SourceText.h" // JS::Source{Ownership,Text} #include "jsapi-tests/tests.h" @@ -29,7 +29,7 @@ BEGIN_TEST(testGCCellPtr) { JS::SourceText srcBuf; CHECK(srcBuf.init(cx, code, strlen(code), JS::SourceOwnership::Borrowed)); - JS::RootedScript script(cx, JS::Compile(cx, opts, srcBuf)); + JS::RootedScript script(cx, JS::CompileDontInflate(cx, opts, srcBuf)); CHECK(script); CHECK(!JS::GCCellPtr(nullptr)); diff --git a/js/src/jsapi-tests/testPrivateGCThingValue.cpp b/js/src/jsapi-tests/testPrivateGCThingValue.cpp index 963eccf510f7..353306aee5d9 100644 --- a/js/src/jsapi-tests/testPrivateGCThingValue.cpp +++ b/js/src/jsapi-tests/testPrivateGCThingValue.cpp @@ -10,7 +10,7 @@ #include "jsapi.h" -#include "js/CompilationAndEvaluation.h" // JS::Compile +#include "js/CompilationAndEvaluation.h" // JS::CompileDontInflate #include "js/HeapAPI.h" #include "js/SourceText.h" // JS::Source{Ownership,Text} #include "jsapi-tests/tests.h" @@ -50,7 +50,7 @@ BEGIN_TEST(testPrivateGCThingValue) { CHECK(srcBuf.init(cx, code, mozilla::ArrayLength(code) - 1, JS::SourceOwnership::Borrowed)); - JS::RootedScript script(cx, JS::Compile(cx, options, srcBuf)); + JS::RootedScript script(cx, JS::CompileDontInflate(cx, options, srcBuf)); CHECK(script); JS_SetReservedSlot(obj, 0, PrivateGCThingValue(script)); diff --git a/js/src/jsapi-tests/testScriptInfo.cpp b/js/src/jsapi-tests/testScriptInfo.cpp index d11c13b63c4f..41af49d71148 100644 --- a/js/src/jsapi-tests/testScriptInfo.cpp +++ b/js/src/jsapi-tests/testScriptInfo.cpp @@ -10,7 +10,7 @@ #include "jsapi.h" -#include "js/CompilationAndEvaluation.h" // JS::Compile +#include "js/CompilationAndEvaluation.h" // JS::CompileDontInflate #include "js/SourceText.h" // JS::Source{Ownership,Text} #include "jsapi-tests/tests.h" @@ -38,7 +38,7 @@ BEGIN_TEST(testScriptInfo) { CHECK(srcBuf.init(cx, code, mozilla::ArrayLength(code) - 1, JS::SourceOwnership::Borrowed)); - JS::RootedScript script(cx, JS::Compile(cx, options, srcBuf)); + JS::RootedScript script(cx, JS::CompileDontInflate(cx, options, srcBuf)); CHECK(script); CHECK_EQUAL(JS_GetScriptBaseLineNumber(cx, script), startLine); diff --git a/js/src/jsapi-tests/testScriptObject.cpp b/js/src/jsapi-tests/testScriptObject.cpp index 0abd1fd24b05..c82f296bd8ae 100644 --- a/js/src/jsapi-tests/testScriptObject.cpp +++ b/js/src/jsapi-tests/testScriptObject.cpp @@ -7,7 +7,7 @@ #include "mozilla/Utf8.h" // mozilla::Utf8Unit -#include "js/CompilationAndEvaluation.h" // JS::Compile{,Utf8{Path,File}} +#include "js/CompilationAndEvaluation.h" // JS::Compile{,DontInflate,Utf8{Path,File}} #include "js/SourceText.h" // JS::Source{Ownership,Text} #include "jsapi-tests/tests.h" @@ -48,7 +48,7 @@ BEGIN_FIXTURE_TEST(ScriptObjectFixture, bug438633_CompileScript) { JS::SourceText srcBuf; CHECK(srcBuf.init(cx, code, code_size, JS::SourceOwnership::Borrowed)); - JS::RootedScript script(cx, JS::Compile(cx, options, srcBuf)); + JS::RootedScript script(cx, JS::CompileDontInflate(cx, options, srcBuf)); CHECK(script); return tryScript(script); @@ -62,7 +62,7 @@ BEGIN_FIXTURE_TEST(ScriptObjectFixture, bug438633_CompileScript_empty) { JS::SourceText srcBuf; CHECK(srcBuf.init(cx, "", 0, JS::SourceOwnership::Borrowed)); - JS::RootedScript script(cx, JS::Compile(cx, options, srcBuf)); + JS::RootedScript script(cx, JS::CompileDontInflate(cx, options, srcBuf)); CHECK(script); return tryScript(script); @@ -76,7 +76,7 @@ BEGIN_FIXTURE_TEST(ScriptObjectFixture, bug438633_CompileScriptForPrincipals) { JS::SourceText srcBuf; CHECK(srcBuf.init(cx, code, code_size, JS::SourceOwnership::Borrowed)); - JS::RootedScript script(cx, JS::Compile(cx, options, srcBuf)); + JS::RootedScript script(cx, JS::CompileDontInflate(cx, options, srcBuf)); return tryScript(script); } @@ -223,7 +223,7 @@ BEGIN_FIXTURE_TEST(ScriptObjectFixture, CloneAndExecuteScript) { JS::SourceText srcBuf; CHECK(srcBuf.init(cx, "val", 3, JS::SourceOwnership::Borrowed)); - JS::RootedScript script(cx, JS::Compile(cx, options, srcBuf)); + JS::RootedScript script(cx, JS::CompileDontInflate(cx, options, srcBuf)); CHECK(script); JS::RootedValue value(cx); diff --git a/js/src/jsapi-tests/testUbiNode.cpp b/js/src/jsapi-tests/testUbiNode.cpp index 6595656fe373..52c0ac58cf76 100644 --- a/js/src/jsapi-tests/testUbiNode.cpp +++ b/js/src/jsapi-tests/testUbiNode.cpp @@ -5,7 +5,7 @@ #include "mozilla/Utf8.h" // mozilla::Utf8Unit #include "builtin/TestingFunctions.h" -#include "js/CompilationAndEvaluation.h" // JS::Compile +#include "js/CompilationAndEvaluation.h" // JS::CompileDontInflate #include "js/SourceText.h" // JS::Source{Ownership,Text} #include "js/UbiNode.h" #include "js/UbiNodeDominatorTree.h" @@ -98,7 +98,7 @@ BEGIN_TEST(test_ubiNodeZone) { JS::SourceText emptySrcBuf; CHECK(emptySrcBuf.init(cx, "", 0, JS::SourceOwnership::Borrowed)); - RootedScript script1(cx, JS::Compile(cx, options, emptySrcBuf)); + RootedScript script1(cx, JS::CompileDontInflate(cx, options, emptySrcBuf)); CHECK(script1); { @@ -109,7 +109,7 @@ BEGIN_TEST(test_ubiNodeZone) { RootedString string2(cx, JS_NewStringCopyZ(cx, "A million household uses!")); CHECK(string2); - RootedScript script2(cx, JS::Compile(cx, options, emptySrcBuf)); + RootedScript script2(cx, JS::CompileDontInflate(cx, options, emptySrcBuf)); CHECK(script2); CHECK(JS::ubi::Node(string1).zone() == global1->zone()); @@ -147,7 +147,7 @@ BEGIN_TEST(test_ubiNodeCompartment) { CHECK(emptySrcBuf.init(cx, "", 0, JS::SourceOwnership::Borrowed)); // Create a script in the original realm... - RootedScript script1(cx, JS::Compile(cx, options, emptySrcBuf)); + RootedScript script1(cx, JS::CompileDontInflate(cx, options, emptySrcBuf)); CHECK(script1); { @@ -155,7 +155,7 @@ BEGIN_TEST(test_ubiNodeCompartment) { // there, too. JSAutoRealm ar(cx, global2); - RootedScript script2(cx, JS::Compile(cx, options, emptySrcBuf)); + RootedScript script2(cx, JS::CompileDontInflate(cx, options, emptySrcBuf)); CHECK(script2); CHECK(JS::ubi::Node(script1).compartment() == global1->compartment()); diff --git a/js/src/jsapi-tests/testXDR.cpp b/js/src/jsapi-tests/testXDR.cpp index a84f1434b446..a20a8a3f3339 100644 --- a/js/src/jsapi-tests/testXDR.cpp +++ b/js/src/jsapi-tests/testXDR.cpp @@ -11,7 +11,7 @@ #include "builtin/String.h" #include "js/BuildId.h" // JS::BuildIdCharVector, JS::SetProcessBuildIdOp -#include "js/CompilationAndEvaluation.h" +#include "js/CompilationAndEvaluation.h" // JS::CompileDontInflate #include "js/SourceText.h" // JS::Source{Ownership,Text} #include "js/Transcoding.h" #include "jsapi-tests/tests.h" @@ -69,7 +69,7 @@ BEGIN_TEST(testXDR_bug506491) { CHECK(srcBuf.init(cx, s, mozilla::ArrayLength(s) - 1, JS::SourceOwnership::Borrowed)); - JS::RootedScript script(cx, JS::Compile(cx, options, srcBuf)); + JS::RootedScript script(cx, JS::CompileDontInflate(cx, options, srcBuf)); CHECK(script); script = FreezeThaw(cx, script); @@ -98,7 +98,7 @@ BEGIN_TEST(testXDR_bug516827) { JS::SourceText srcBuf; CHECK(srcBuf.init(cx, "", 0, JS::SourceOwnership::Borrowed)); - JS::RootedScript script(cx, JS::Compile(cx, options, srcBuf)); + JS::RootedScript script(cx, JS::CompileDontInflate(cx, options, srcBuf)); CHECK(script); script = FreezeThaw(cx, script); @@ -130,7 +130,7 @@ BEGIN_TEST(testXDR_source) { JS::SourceText srcBuf; CHECK(srcBuf.init(cx, *s, strlen(*s), JS::SourceOwnership::Borrowed)); - JS::RootedScript script(cx, JS::Compile(cx, options, srcBuf)); + JS::RootedScript script(cx, JS::CompileDontInflate(cx, options, srcBuf)); CHECK(script); script = FreezeThaw(cx, script); @@ -158,7 +158,7 @@ BEGIN_TEST(testXDR_sourceMap) { JS::SourceText srcBuf; CHECK(srcBuf.init(cx, "", 0, JS::SourceOwnership::Borrowed)); - script = JS::Compile(cx, options, srcBuf); + script = JS::CompileDontInflate(cx, options, srcBuf); CHECK(script); size_t len = strlen(*sm);