Title: [196337] trunk/Source/_javascript_Core
Revision
196337
Author
fpi...@apple.com
Date
2016-02-09 14:42:02 -0800 (Tue, 09 Feb 2016)

Log Message

Don't crash if we fail to parse a builtin
https://bugs.webkit.org/show_bug.cgi?id=154047
rdar://problem/24300617

Reviewed by Mark Lam.

Crashing probably seemed like a good idea at the time, but we could get here in case of a
near stack overflow, so that the parser bails because of recursion.

* parser/Parser.h:
(JSC::parse):

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (196336 => 196337)


--- trunk/Source/_javascript_Core/ChangeLog	2016-02-09 22:16:14 UTC (rev 196336)
+++ trunk/Source/_javascript_Core/ChangeLog	2016-02-09 22:42:02 UTC (rev 196337)
@@ -1,3 +1,17 @@
+2016-02-09  Filip Pizlo  <fpi...@apple.com>
+
+        Don't crash if we fail to parse a builtin
+        https://bugs.webkit.org/show_bug.cgi?id=154047
+        rdar://problem/24300617
+
+        Reviewed by Mark Lam.
+
+        Crashing probably seemed like a good idea at the time, but we could get here in case of a
+        near stack overflow, so that the parser bails because of recursion.
+
+        * parser/Parser.h:
+        (JSC::parse):
+
 2016-02-07  Gavin Barraclough  <barraclo...@apple.com>
 
         GetValueFunc/PutValueFunc should not take both slotBase and thisValue

Modified: trunk/Source/_javascript_Core/parser/Parser.h (196336 => 196337)


--- trunk/Source/_javascript_Core/parser/Parser.h	2016-02-09 22:16:14 UTC (rev 196336)
+++ trunk/Source/_javascript_Core/parser/Parser.h	2016-02-09 22:42:02 UTC (rev 196337)
@@ -1542,8 +1542,8 @@
         if (builtinMode == JSParserBuiltinMode::Builtin) {
             if (!result)
                 WTF::dataLog("Error compiling builtin: ", error.message(), "\n");
-            RELEASE_ASSERT(result);
-            result->setClosedVariables(parser.closedVariables());
+            else
+                result->setClosedVariables(parser.closedVariables());
         }
         return result;
     }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to