Title: [276162] trunk/Source/_javascript_Core
- Revision
- 276162
- Author
- [email protected]
- Date
- 2021-04-16 12:59:33 -0700 (Fri, 16 Apr 2021)
Log Message
More changes to support the TerminationException.
https://bugs.webkit.org/show_bug.cgi?id=224681
rdar://76698113
Reviewed by Keith Miller.
* interpreter/Interpreter.cpp:
(JSC::Interpreter::executeProgram):
- ProgramExecutable::initializeGlobalProperties() can throw the TerminationException.
Add handling for that.
* runtime/JSObject.cpp:
(JSC::JSObject::defineOwnIndexedProperty):
- JSObject::defineOwnIndexedProperty() has a blob of assertion code that it verifying
that getOwnPropertyDescriptor() should succeed without throwing any exceptions if
the fast path is allowed. However, this is assertion is only true if there isn't
a termination being requested. So, use the DeferTermination scope to allow this
assertion to be tested without the complication of a TerminationException.
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (276161 => 276162)
--- trunk/Source/_javascript_Core/ChangeLog 2021-04-16 19:42:40 UTC (rev 276161)
+++ trunk/Source/_javascript_Core/ChangeLog 2021-04-16 19:59:33 UTC (rev 276162)
@@ -1,3 +1,24 @@
+2021-04-16 Mark Lam <[email protected]>
+
+ More changes to support the TerminationException.
+ https://bugs.webkit.org/show_bug.cgi?id=224681
+ rdar://76698113
+
+ Reviewed by Keith Miller.
+
+ * interpreter/Interpreter.cpp:
+ (JSC::Interpreter::executeProgram):
+ - ProgramExecutable::initializeGlobalProperties() can throw the TerminationException.
+ Add handling for that.
+
+ * runtime/JSObject.cpp:
+ (JSC::JSObject::defineOwnIndexedProperty):
+ - JSObject::defineOwnIndexedProperty() has a blob of assertion code that it verifying
+ that getOwnPropertyDescriptor() should succeed without throwing any exceptions if
+ the fast path is allowed. However, this is assertion is only true if there isn't
+ a termination being requested. So, use the DeferTermination scope to allow this
+ assertion to be tested without the complication of a TerminationException.
+
2021-04-16 Keith Miller <[email protected]>
Before deleting a MarkedBlock we do not need to clear its m_directory pointer.
Modified: trunk/Source/_javascript_Core/interpreter/Interpreter.cpp (276161 => 276162)
--- trunk/Source/_javascript_Core/interpreter/Interpreter.cpp 2021-04-16 19:42:40 UTC (rev 276161)
+++ trunk/Source/_javascript_Core/interpreter/Interpreter.cpp 2021-04-16 19:59:33 UTC (rev 276162)
@@ -797,7 +797,8 @@
// Compile source to bytecode if necessary:
JSObject* error = program->initializeGlobalProperties(vm, globalObject, scope);
- EXCEPTION_ASSERT(!throwScope.exception() || !error);
+ EXCEPTION_ASSERT(!throwScope.exception() || !error || vm.isTerminationException(throwScope.exception()));
+ RETURN_IF_EXCEPTION(throwScope, checkedReturn(throwScope.exception()));
if (UNLIKELY(error))
return checkedReturn(throwException(globalObject, throwScope, error));
Modified: trunk/Source/_javascript_Core/runtime/JSObject.cpp (276161 => 276162)
--- trunk/Source/_javascript_Core/runtime/JSObject.cpp 2021-04-16 19:42:40 UTC (rev 276161)
+++ trunk/Source/_javascript_Core/runtime/JSObject.cpp 2021-04-16 19:59:33 UTC (rev 276162)
@@ -2625,6 +2625,7 @@
#if ASSERT_ENABLED
if (canGetIndexQuickly(index) && canDoFastPutDirectIndex(vm, this)) {
+ DeferTermination deferScope(vm);
PropertyDescriptor currentDescriptor;
ASSERT(getOwnPropertyDescriptor(globalObject, Identifier::from(vm, index), currentDescriptor));
scope.assertNoException();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes