Title: [275902] trunk/Source/_javascript_Core
- Revision
- 275902
- Author
- mark....@apple.com
- Date
- 2021-04-13 12:56:56 -0700 (Tue, 13 Apr 2021)
Log Message
Use a JSString for the TerminationException value instead of a Symbol.
https://bugs.webkit.org/show_bug.cgi?id=224490
Reviewed by Yusuke Suzuki.
This makes it convertible to a String for clients that wish to report the exception.
Clients, in this case, does not apply to JS code, only C++ code that catches the
exception at the outermost point to handle the termination. The TerminationException
value is not visible to JS code because the TerminationException cannot be caught.
So, this change is transparent to JS code.
* runtime/VM.cpp:
(JSC::VM::ensureTerminationException):
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (275901 => 275902)
--- trunk/Source/_javascript_Core/ChangeLog 2021-04-13 19:54:06 UTC (rev 275901)
+++ trunk/Source/_javascript_Core/ChangeLog 2021-04-13 19:56:56 UTC (rev 275902)
@@ -1,3 +1,19 @@
+2021-04-13 Mark Lam <mark....@apple.com>
+
+ Use a JSString for the TerminationException value instead of a Symbol.
+ https://bugs.webkit.org/show_bug.cgi?id=224490
+
+ Reviewed by Yusuke Suzuki.
+
+ This makes it convertible to a String for clients that wish to report the exception.
+ Clients, in this case, does not apply to JS code, only C++ code that catches the
+ exception at the outermost point to handle the termination. The TerminationException
+ value is not visible to JS code because the TerminationException cannot be caught.
+ So, this change is transparent to JS code.
+
+ * runtime/VM.cpp:
+ (JSC::VM::ensureTerminationException):
+
2021-04-13 Commit Queue <commit-qu...@webkit.org>
Unreviewed, reverting r275867.
Modified: trunk/Source/_javascript_Core/runtime/VM.cpp (275901 => 275902)
--- trunk/Source/_javascript_Core/runtime/VM.cpp 2021-04-13 19:54:06 UTC (rev 275901)
+++ trunk/Source/_javascript_Core/runtime/VM.cpp 2021-04-13 19:56:56 UTC (rev 275902)
@@ -763,12 +763,11 @@
}
#endif // ENABLE(SAMPLING_PROFILER)
-static SymbolImpl::StaticSymbolImpl terminationErrorSymbol { "TerminationError", SymbolImpl::s_flagIsPrivate };
-
+static StringImpl::StaticStringImpl terminationErrorString { "_javascript_ execution terminated." };
Exception* VM::ensureTerminationException()
{
if (!m_terminationException) {
- Symbol* terminationError = Symbol::create(*this, terminationErrorSymbol);
+ JSString* terminationError = jsNontrivialString(*this, terminationErrorString);
m_terminationException = Exception::create(*this, terminationError, Exception::DoNotCaptureStack);
}
return m_terminationException;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes