Unreviewed, rolling out r243665.
authorryanhaddad@apple.com <ryanhaddad@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 6 Apr 2019 00:05:32 +0000 (00:05 +0000)
committerryanhaddad@apple.com <ryanhaddad@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 6 Apr 2019 00:05:32 +0000 (00:05 +0000)
Caused iOS JSC tests to exit with an exception.

Reverted changeset:

"Assertion failed in JSC::createError"
https://bugs.webkit.org/show_bug.cgi?id=196305
https://trac.webkit.org/changeset/243665

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@243955 268f45cc-cd09-0410-ab3c-d52691b4dbfc

JSTests/ChangeLog
JSTests/stress/create-error-out-of-memory-rope-string-2.js [deleted file]
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/runtime/ExceptionHelpers.cpp

index 7c3fd74..d6979fb 100644 (file)
@@ -1,3 +1,15 @@
+2019-04-05  Ryan Haddad  <ryanhaddad@apple.com>
+
+        Unreviewed, rolling out r243665.
+
+        Caused iOS JSC tests to exit with an exception.
+
+        Reverted changeset:
+
+        "Assertion failed in JSC::createError"
+        https://bugs.webkit.org/show_bug.cgi?id=196305
+        https://trac.webkit.org/changeset/243665
+
 2019-04-05  Yusuke Suzuki  <ysuzuki@apple.com>
 
         SIGSEGV in JSC::BytecodeGenerator::addStringConstant
diff --git a/JSTests/stress/create-error-out-of-memory-rope-string-2.js b/JSTests/stress/create-error-out-of-memory-rope-string-2.js
deleted file mode 100644 (file)
index 45af68d..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-function assert(a, message) {
-    if (!a)
-        throw new Error(message);
-}
-
-try {
-    const var_1 = 'a'.padStart(2147483648 - 1);
-    new var_1();
-    assert(false, `Should throw OOM error`);
-} catch (error) {
-    assert(error.message == "Out of memory", "Expected OutOfMemoryError, but got: " + error);
-}
index 55fe492..42731a2 100644 (file)
@@ -1,3 +1,15 @@
+2019-04-05  Ryan Haddad  <ryanhaddad@apple.com>
+
+        Unreviewed, rolling out r243665.
+
+        Caused iOS JSC tests to exit with an exception.
+
+        Reverted changeset:
+
+        "Assertion failed in JSC::createError"
+        https://bugs.webkit.org/show_bug.cgi?id=196305
+        https://trac.webkit.org/changeset/243665
+
 2019-04-05  Yusuke Suzuki  <ysuzuki@apple.com>
 
         SIGSEGV in JSC::BytecodeGenerator::addStringConstant
index 6486c06..156c180 100644 (file)
@@ -275,7 +275,8 @@ JSObject* createError(ExecState* exec, JSValue value, const String& message, Err
     auto scope = DECLARE_CATCH_SCOPE(vm);
 
     String valueDescription = errorDescriptionForValue(exec, value);
-    if (scope.exception() || !valueDescription) {
+    ASSERT(scope.exception() || !!valueDescription);
+    if (!valueDescription) {
         scope.clearException();
         return createOutOfMemoryError(exec);
     }