Title: [274239] trunk/Source/_javascript_Core
Revision
274239
Author
[email protected]
Date
2021-03-10 14:00:22 -0800 (Wed, 10 Mar 2021)

Log Message

executeModuleProgram needs to ensure module argument array is still in scope
https://bugs.webkit.org/show_bug.cgi?id=223039

Reviewed by Saam Barati.

This was causing testing builds to crash for wasm tests.

* interpreter/Interpreter.cpp:
(JSC::Interpreter::executeModuleProgram):

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (274238 => 274239)


--- trunk/Source/_javascript_Core/ChangeLog	2021-03-10 21:58:18 UTC (rev 274238)
+++ trunk/Source/_javascript_Core/ChangeLog	2021-03-10 22:00:22 UTC (rev 274239)
@@ -1,3 +1,15 @@
+2021-03-10  Keith Miller  <[email protected]>
+
+        executeModuleProgram needs to ensure module argument array is still in scope
+        https://bugs.webkit.org/show_bug.cgi?id=223039
+
+        Reviewed by Saam Barati.
+
+        This was causing testing builds to crash for wasm tests.
+
+        * interpreter/Interpreter.cpp:
+        (JSC::Interpreter::executeModuleProgram):
+
 2021-03-10  Michael Catanzaro  <[email protected]>
 
         [GTK] Reenable -fvisibility=hidden

Modified: trunk/Source/_javascript_Core/interpreter/Interpreter.cpp (274238 => 274239)


--- trunk/Source/_javascript_Core/interpreter/Interpreter.cpp	2021-03-10 21:58:18 UTC (rev 274238)
+++ trunk/Source/_javascript_Core/interpreter/Interpreter.cpp	2021-03-10 22:00:22 UTC (rev 274239)
@@ -1248,17 +1248,18 @@
 
     RefPtr<JITCode> jitCode;
     ProtoCallFrame protoCallFrame;
+    JSValue args[numberOfArguments] = {
+        record,
+        record->internalField(JSModuleRecord::Field::State).get(),
+        sentValue,
+        resumeMode,
+        scope,
+    };
+
     {
         DisallowGC disallowGC; // Ensure no GC happens. GC can replace CodeBlock in Executable.
         jitCode = executable->generatedJITCode();
 
-        JSValue args[numberOfArguments] = {
-            record,
-            record->internalField(JSModuleRecord::Field::State).get(),
-            sentValue,
-            resumeMode,
-            scope,
-        };
         // The |this| of the module is always `undefined`.
         // http://www.ecma-international.org/ecma-262/6.0/#sec-module-environment-records-hasthisbinding
         // http://www.ecma-international.org/ecma-262/6.0/#sec-module-environment-records-getthisbinding
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to