Title: [184507] branches/safari-601.1.32-branch

Diff

Modified: branches/safari-601.1.32-branch/LayoutTests/ChangeLog (184506 => 184507)


--- branches/safari-601.1.32-branch/LayoutTests/ChangeLog	2015-05-18 19:24:42 UTC (rev 184506)
+++ branches/safari-601.1.32-branch/LayoutTests/ChangeLog	2015-05-18 19:35:03 UTC (rev 184507)
@@ -1,5 +1,21 @@
 2015-05-18  Matthew Hanson  <[email protected]>
 
+        Merge r183912. rdar://problem/20926150
+
+    2015-05-06  Ryosuke Niwa  <[email protected]>
+
+            ToT WebKit crashes while loading ES6 compatibility table
+            https://bugs.webkit.org/show_bug.cgi?id=144726
+
+            Reviewed by Filip Pizlo.
+
+            Added new test cases.
+
+            * js/class-syntax-string-and-numeric-names-expected.txt:
+            * js/script-tests/class-syntax-string-and-numeric-names.js:
+
+2015-05-18  Matthew Hanson  <[email protected]>
+
         Merge r184353. rdar://problem/20809399
 
     2015-05-14  Myles C. Maxfield  <[email protected]>

Modified: branches/safari-601.1.32-branch/LayoutTests/js/class-syntax-string-and-numeric-names-expected.txt (184506 => 184507)


--- branches/safari-601.1.32-branch/LayoutTests/js/class-syntax-string-and-numeric-names-expected.txt	2015-05-18 19:24:42 UTC (rev 184506)
+++ branches/safari-601.1.32-branch/LayoutTests/js/class-syntax-string-and-numeric-names-expected.txt	2015-05-18 19:35:03 UTC (rev 184507)
@@ -40,6 +40,8 @@
 PASS (new X)[6] is undefined
 PASS setterValue = 0; X = class { static set 7(x) { setterValue = x } static get 7() { } }; X[7] = 27; setterValue is 27
 PASS (new X)[7] = 28; setterValue is 27
+PASS function x() { return class { 'foo bar'() { return 29; } } }; (new (x()))['foo bar']() is 29
+PASS function x() { return class { 30() { return 30; } } }; (new (x()))[30]() is 30
 PASS successfullyParsed is true
 
 TEST COMPLETE

Modified: branches/safari-601.1.32-branch/LayoutTests/js/script-tests/class-syntax-string-and-numeric-names.js (184506 => 184507)


--- branches/safari-601.1.32-branch/LayoutTests/js/script-tests/class-syntax-string-and-numeric-names.js	2015-05-18 19:24:42 UTC (rev 184506)
+++ branches/safari-601.1.32-branch/LayoutTests/js/script-tests/class-syntax-string-and-numeric-names.js	2015-05-18 19:35:03 UTC (rev 184507)
@@ -51,3 +51,6 @@
 shouldBe("(new X)[6]", "undefined");
 shouldBe("setterValue = 0; X = class { static set 7(x) { setterValue = x } static get 7() { } }; X[7] = 27; setterValue", "27");
 shouldBe("(new X)[7] = 28; setterValue", "27");
+
+shouldBe("function x() { return class { 'foo bar'() { return 29; } } }; (new (x()))['foo bar']()", "29");
+shouldBe("function x() { return class { 30() { return 30; } } }; (new (x()))[30]()", "30");

Modified: branches/safari-601.1.32-branch/Source/_javascript_Core/ChangeLog (184506 => 184507)


--- branches/safari-601.1.32-branch/Source/_javascript_Core/ChangeLog	2015-05-18 19:24:42 UTC (rev 184506)
+++ branches/safari-601.1.32-branch/Source/_javascript_Core/ChangeLog	2015-05-18 19:35:03 UTC (rev 184507)
@@ -1,3 +1,21 @@
+2015-05-18  Matthew Hanson  <[email protected]>
+
+        Merge r183912. rdar://problem/20926150
+
+    2015-05-06  Ryosuke Niwa  <[email protected]>
+
+            ToT WebKit crashes while loading ES6 compatibility table
+            https://bugs.webkit.org/show_bug.cgi?id=144726
+
+            Reviewed by Filip Pizlo.
+
+            The bug was caused by parseClass superfluously avoiding to build up the string after seeing {.
+
+            Always build the identifier here as it could be a method name.
+
+            * parser/Parser.cpp:
+            (JSC::Parser<LexerType>::parseClass):
+
 2015-05-12  Dana Burkart <[email protected]>
 
         Merge r184137. rdar://problem/20707307

Modified: branches/safari-601.1.32-branch/Source/_javascript_Core/parser/Parser.cpp (184506 => 184507)


--- branches/safari-601.1.32-branch/Source/_javascript_Core/parser/Parser.cpp	2015-05-18 19:24:42 UTC (rev 184506)
+++ branches/safari-601.1.32-branch/Source/_javascript_Core/parser/Parser.cpp	2015-05-18 19:35:03 UTC (rev 184507)
@@ -1529,7 +1529,7 @@
     }
     const ConstructorKind constructorKind = parentClass ? ConstructorKind::Derived : ConstructorKind::Base;
 
-    consumeOrFailWithFlags(OPENBRACE, TreeBuilder::DontBuildStrings, "Expected opening '{' at the start of a class body");
+    consumeOrFail(OPENBRACE, "Expected opening '{' at the start of a class body");
 
     TreeExpression constructor = 0;
     TreePropertyList staticMethods = 0;
@@ -1558,16 +1558,19 @@
         switch (m_token.m_type) {
         case STRING:
             ident = m_token.m_data.ident;
+            ASSERT(ident);
             next();
             break;
         case IDENT:
             ident = m_token.m_data.ident;
             isGetter = *ident == propertyNames.get;
             isSetter = *ident == propertyNames.set;
+            ASSERT(ident);
             break;
         case DOUBLE:
         case INTEGER:
             ident = &m_parserArena.identifierArena().makeNumericIdentifier(const_cast<VM*>(m_vm), m_token.m_data.doubleValue);
+            ASSERT(ident);
             next();
             break;
         default:
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to