Title: [275860] trunk/Source/_javascript_Core
Revision
275860
Author
[email protected]
Date
2021-04-12 21:43:02 -0700 (Mon, 12 Apr 2021)

Log Message

Interpreter::executeProgram() should install its VMEntryScope at the top.
https://bugs.webkit.org/show_bug.cgi?id=224450
rdar://76530841

Reviewed by Yusuke Suzuki.

"top" includes before any VM code that can throw exceptions is run.

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

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (275859 => 275860)


--- trunk/Source/_javascript_Core/ChangeLog	2021-04-13 04:19:17 UTC (rev 275859)
+++ trunk/Source/_javascript_Core/ChangeLog	2021-04-13 04:43:02 UTC (rev 275860)
@@ -1,3 +1,16 @@
+2021-04-12  Mark Lam  <[email protected]>
+
+        Interpreter::executeProgram() should install its VMEntryScope at the top.
+        https://bugs.webkit.org/show_bug.cgi?id=224450
+        rdar://76530841
+
+        Reviewed by Yusuke Suzuki.
+
+        "top" includes before any VM code that can throw exceptions is run.
+
+        * interpreter/Interpreter.cpp:
+        (JSC::Interpreter::executeProgram):
+
 2021-04-12  Ross Kirsling  <[email protected]>
 
         ICU 69 deprecates ubrk_safeClone in favor of ubrk_clone

Modified: trunk/Source/_javascript_Core/interpreter/Interpreter.cpp (275859 => 275860)


--- trunk/Source/_javascript_Core/interpreter/Interpreter.cpp	2021-04-13 04:19:17 UTC (rev 275859)
+++ trunk/Source/_javascript_Core/interpreter/Interpreter.cpp	2021-04-13 04:43:02 UTC (rev 275860)
@@ -648,6 +648,8 @@
     JSGlobalObject* globalObject = scope->globalObject(vm);
     JSCallee* globalCallee = globalObject->globalCallee();
 
+    VMEntryScope entryScope(vm, globalObject);
+
     auto clobberizeValidator = makeScopeExit([&] {
         vm.didEnterVM = true;
     });
@@ -793,8 +795,6 @@
     // If we get here, then we have already proven that the script is not a JSON
     // object.
 
-    VMEntryScope entryScope(vm, globalObject);
-
     // Compile source to bytecode if necessary:
     JSObject* error = program->initializeGlobalProperties(vm, globalObject, scope);
     EXCEPTION_ASSERT(!throwScope.exception() || !error);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to