Title: [254783] trunk
Revision
254783
Author
[email protected]
Date
2020-01-17 17:00:30 -0800 (Fri, 17 Jan 2020)

Log Message

JSModuleLoader's printableModuleKey() should never throw.
https://bugs.webkit.org/show_bug.cgi?id=206461
<rdar://problem/58696678>

Reviewed by Michael Saboff.

JSTests:

* stress/printableModuleKey-should-never-throw.js: Added.

Source/_javascript_Core:

Hence, it should be using a CatchScope instead of a ThrowScope.

* runtime/JSModuleLoader.cpp:
(JSC::printableModuleKey):

Modified Paths

Added Paths

Diff

Modified: trunk/JSTests/ChangeLog (254782 => 254783)


--- trunk/JSTests/ChangeLog	2020-01-18 00:48:31 UTC (rev 254782)
+++ trunk/JSTests/ChangeLog	2020-01-18 01:00:30 UTC (rev 254783)
@@ -1,3 +1,13 @@
+2020-01-17  Mark Lam  <[email protected]>
+
+        JSModuleLoader's printableModuleKey() should never throw.
+        https://bugs.webkit.org/show_bug.cgi?id=206461
+        <rdar://problem/58696678>
+
+        Reviewed by Michael Saboff.
+
+        * stress/printableModuleKey-should-never-throw.js: Added.
+
 2020-01-17  Alexey Shvayka  <[email protected]>
 
         JSON.parse should lookup prototype chains during revival

Added: trunk/JSTests/stress/printableModuleKey-should-never-throw.js (0 => 254783)


--- trunk/JSTests/stress/printableModuleKey-should-never-throw.js	                        (rev 0)
+++ trunk/JSTests/stress/printableModuleKey-should-never-throw.js	2020-01-18 01:00:30 UTC (rev 254783)
@@ -0,0 +1,3 @@
+//@ runDefault
+
+import(0);

Modified: trunk/Source/_javascript_Core/ChangeLog (254782 => 254783)


--- trunk/Source/_javascript_Core/ChangeLog	2020-01-18 00:48:31 UTC (rev 254782)
+++ trunk/Source/_javascript_Core/ChangeLog	2020-01-18 01:00:30 UTC (rev 254783)
@@ -1,3 +1,16 @@
+2020-01-17  Mark Lam  <[email protected]>
+
+        JSModuleLoader's printableModuleKey() should never throw.
+        https://bugs.webkit.org/show_bug.cgi?id=206461
+        <rdar://problem/58696678>
+
+        Reviewed by Michael Saboff.
+
+        Hence, it should be using a CatchScope instead of a ThrowScope.
+
+        * runtime/JSModuleLoader.cpp:
+        (JSC::printableModuleKey):
+
 2020-01-17  Justin Michaud  <[email protected]>
 
         Separate storage of Structure::m_offset into transition and max offset

Modified: trunk/Source/_javascript_Core/runtime/JSModuleLoader.cpp (254782 => 254783)


--- trunk/Source/_javascript_Core/runtime/JSModuleLoader.cpp	2020-01-18 00:48:31 UTC (rev 254782)
+++ trunk/Source/_javascript_Core/runtime/JSModuleLoader.cpp	2020-01-18 01:00:30 UTC (rev 254783)
@@ -116,7 +116,7 @@
 static String printableModuleKey(JSGlobalObject* globalObject, JSValue key)
 {
     VM& vm = globalObject->vm();
-    auto scope = DECLARE_THROW_SCOPE(vm);
+    auto scope = DECLARE_CATCH_SCOPE(vm);
     if (key.isString() || key.isSymbol()) {
         auto propertyName = key.toPropertyKey(globalObject);
         scope.assertNoException(); // This is OK since this function is just for debugging purpose.
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to