ES6 Classes: Runtime error in JIT'd class calling super() with arguments and supercla...
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 28 Mar 2015 03:09:20 +0000 (03:09 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 28 Mar 2015 03:09:20 +0000 (03:09 +0000)
https://bugs.webkit.org/show_bug.cgi?id=142862

Reviewed by Benjamin Poulain.

Source/JavaScriptCore:

Add a test that used to fail in DFG now that the bug has been fixed by r181993.

* tests/stress/class-syntax-derived-default-constructor.js: Added.

Source/WebInspectorUI:

Removed the workaround for the bug since it has been fixed by r181993.

* UserInterface/Base/Object.js:
* UserInterface/Models/DebuggerDashboard.js:
* UserInterface/Models/NetworkTimeline.js:
* UserInterface/Models/ReplayDashboard.js:
* UserInterface/Models/Revision.js:

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

Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/tests/stress/class-syntax-derived-default-constructor.js [new file with mode: 0644]
Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Base/Object.js
Source/WebInspectorUI/UserInterface/Models/DebuggerDashboard.js
Source/WebInspectorUI/UserInterface/Models/NetworkTimeline.js
Source/WebInspectorUI/UserInterface/Models/ReplayDashboard.js
Source/WebInspectorUI/UserInterface/Models/Revision.js

index a24310e..9c300e0 100644 (file)
@@ -1,3 +1,14 @@
+2015-03-27  Ryosuke Niwa  <rniwa@webkit.org>
+
+        ES6 Classes: Runtime error in JIT'd class calling super() with arguments and superclass has default constructor
+        https://bugs.webkit.org/show_bug.cgi?id=142862
+
+        Reviewed by Benjamin Poulain.
+
+        Add a test that used to fail in DFG now that the bug has been fixed by r181993.
+
+        * tests/stress/class-syntax-derived-default-constructor.js: Added.
+
 2015-03-27  Michael Saboff  <msaboff@apple.com>
 
         load8Signed() and load16Signed() should be renamed to avoid confusion
diff --git a/Source/JavaScriptCore/tests/stress/class-syntax-derived-default-constructor.js b/Source/JavaScriptCore/tests/stress/class-syntax-derived-default-constructor.js
new file mode 100644 (file)
index 0000000..f0c477e
--- /dev/null
@@ -0,0 +1,26 @@
+
+var A = class A { };
+var B = class B extends A { };
+var C = class C extends B { constructor() { super(); } };
+
+noInline(C);
+
+(function() {
+    var x;
+    for (var i = 0; i < 1e5; ++i)
+        x = new C(false);
+})();
+
+var D = class D extends A { constructor() {
+    super(...arguments);
+    return function () { return arguments; }
+} };
+var E = class E extends D { constructor() { super(); } };
+
+noInline(E);
+
+(function() {
+    var x;
+    for (var i = 0; i < 1e5; ++i)
+        x = new C(false);
+})();
index 57b4262..0fe6df3 100644 (file)
@@ -1,3 +1,18 @@
+2015-03-27  Ryosuke Niwa  <rniwa@webkit.org>
+
+        ES6 Classes: Runtime error in JIT'd class calling super() with arguments and superclass has default constructor
+        https://bugs.webkit.org/show_bug.cgi?id=142862
+
+        Reviewed by Benjamin Poulain.
+
+        Removed the workaround for the bug since it has been fixed by r181993.
+
+        * UserInterface/Base/Object.js:
+        * UserInterface/Models/DebuggerDashboard.js:
+        * UserInterface/Models/NetworkTimeline.js:
+        * UserInterface/Models/ReplayDashboard.js:
+        * UserInterface/Models/Revision.js:
+
 2015-03-27  Joseph Pecoraro  <pecoraro@apple.com>
 
         Web Inspector: Add Setter Icon for ObjectTreeView
index bea3d34..2528daf 100644 (file)
 
 WebInspector.Object = class Object
 {
-    constructor()
-    {
-        // FIXME: Remove once <https://webkit.org/b/142862> is fixed.
-    }
-
     // Static
 
     static addEventListener(eventType, listener, thisObject)
index 2937c9a..0c4258c 100644 (file)
@@ -25,9 +25,4 @@
 
 WebInspector.DebuggerDashboard = class DebuggerDashboard extends WebInspector.Object
 {
-    constructor()
-    {
-        // FIXME: Remove once <https://webkit.org/b/142862> is fixed.
-        super();
-    }
 };
index d3069b7..450ff2c 100644 (file)
 
 WebInspector.NetworkTimeline = class NetworkTimeline extends WebInspector.Timeline
 {
-    constructor(type)
-    {
-        // FIXME: Remove once <https://webkit.org/b/142862> is fixed.
-        super(type);
-    }
-
     // Public
 
     recordForResource(resource)
index b349d98..64629df 100644 (file)
@@ -25,9 +25,4 @@
 
 WebInspector.ReplayDashboard = class ReplayDashboard extends WebInspector.Object
 {
-    constructor()
-    {
-        // FIXME: Remove once <https://webkit.org/b/142862> is fixed.
-        super();
-    }
 };
index 398491a..83c51a7 100644 (file)
 
 WebInspector.Revision = class Revision extends WebInspector.Object
 {
-    constructor()
-    {
-        // FIXME: Remove once <https://webkit.org/b/142862> is fixed.
-        super();
-    }
-
     // Public
 
     apply()