Title: [100376] trunk
Revision
100376
Author
[email protected]
Date
2011-11-15 17:27:52 -0800 (Tue, 15 Nov 2011)

Log Message

[v8] Use throwError instead of compiling and running script in handleMaxRecursionDepthExceeded
https://bugs.webkit.org/show_bug.cgi?id=72432

Reviewed by Adam Barth.

Source/WebCore:

* bindings/v8/V8Proxy.cpp:
(WebCore::handleMaxRecursionDepthExceeded):

LayoutTests:

Updated test that depends on the error message. The new message is a
strict improvement, as it includes the line number at which the
too-deep call was triggered. Also, we only expect a single error
message; it's not clear why the previous version generated a dup.

Also consolidate expectations, as the test does not differ per platform.

* platform/chromium-cg-mac/fast/xmlhttprequest/xmlhttprequest-recursive-sync-event-expected.txt: Removed.
* platform/chromium-mac/fast/xmlhttprequest/xmlhttprequest-recursive-sync-event-expected.txt: Removed.
* platform/chromium-win/fast/xmlhttprequest/xmlhttprequest-recursive-sync-event-expected.txt: Removed.
* platform/chromium/fast/xmlhttprequest/xmlhttprequest-recursive-sync-event-expected.txt: Added.

Modified Paths

Added Paths

Removed Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (100375 => 100376)


--- trunk/LayoutTests/ChangeLog	2011-11-16 01:25:17 UTC (rev 100375)
+++ trunk/LayoutTests/ChangeLog	2011-11-16 01:27:52 UTC (rev 100376)
@@ -1,3 +1,22 @@
+2011-11-15  Adam Klein  <[email protected]>
+
+        [v8] Use throwError instead of compiling and running script in handleMaxRecursionDepthExceeded
+        https://bugs.webkit.org/show_bug.cgi?id=72432
+
+        Reviewed by Adam Barth.
+
+        Updated test that depends on the error message. The new message is a
+        strict improvement, as it includes the line number at which the
+        too-deep call was triggered. Also, we only expect a single error
+        message; it's not clear why the previous version generated a dup.
+
+        Also consolidate expectations, as the test does not differ per platform.
+
+        * platform/chromium-cg-mac/fast/xmlhttprequest/xmlhttprequest-recursive-sync-event-expected.txt: Removed.
+        * platform/chromium-mac/fast/xmlhttprequest/xmlhttprequest-recursive-sync-event-expected.txt: Removed.
+        * platform/chromium-win/fast/xmlhttprequest/xmlhttprequest-recursive-sync-event-expected.txt: Removed.
+        * platform/chromium/fast/xmlhttprequest/xmlhttprequest-recursive-sync-event-expected.txt: Added.
+
 2011-11-15  Erik Arvidsson  <[email protected]>
 
         JS Test Harness: Remove need to load external css file to reduce flakiness

Added: trunk/LayoutTests/platform/chromium/fast/xmlhttprequest/xmlhttprequest-recursive-sync-event-expected.txt (0 => 100376)


--- trunk/LayoutTests/platform/chromium/fast/xmlhttprequest/xmlhttprequest-recursive-sync-event-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/platform/chromium/fast/xmlhttprequest/xmlhttprequest-recursive-sync-event-expected.txt	2011-11-16 01:27:52 UTC (rev 100376)
@@ -0,0 +1,4 @@
+CONSOLE MESSAGE: line 18: Uncaught RangeError: Maximum call stack size exceeded.
+This tests that having infinite recursion in XMLHttpRequest event handler does not crash. 
+PASS
+

Deleted: trunk/LayoutTests/platform/chromium-cg-mac/fast/xmlhttprequest/xmlhttprequest-recursive-sync-event-expected.txt (100375 => 100376)


--- trunk/LayoutTests/platform/chromium-cg-mac/fast/xmlhttprequest/xmlhttprequest-recursive-sync-event-expected.txt	2011-11-16 01:25:17 UTC (rev 100375)
+++ trunk/LayoutTests/platform/chromium-cg-mac/fast/xmlhttprequest/xmlhttprequest-recursive-sync-event-expected.txt	2011-11-16 01:27:52 UTC (rev 100376)
@@ -1,5 +0,0 @@
-CONSOLE MESSAGE: line 1: Uncaught RangeError: Maximum call stack size exceeded.
-CONSOLE MESSAGE: line 1: Uncaught RangeError: Maximum call stack size exceeded.
-This tests that having infinite recursion in XMLHttpRequest event handler does not crash. 
-PASS
-

Deleted: trunk/LayoutTests/platform/chromium-mac/fast/xmlhttprequest/xmlhttprequest-recursive-sync-event-expected.txt (100375 => 100376)


--- trunk/LayoutTests/platform/chromium-mac/fast/xmlhttprequest/xmlhttprequest-recursive-sync-event-expected.txt	2011-11-16 01:25:17 UTC (rev 100375)
+++ trunk/LayoutTests/platform/chromium-mac/fast/xmlhttprequest/xmlhttprequest-recursive-sync-event-expected.txt	2011-11-16 01:27:52 UTC (rev 100376)
@@ -1,5 +0,0 @@
-CONSOLE MESSAGE: line 1: Uncaught RangeError: Maximum call stack size exceeded.
-CONSOLE MESSAGE: line 1: Uncaught RangeError: Maximum call stack size exceeded.
-This tests that having infinite recursion in XMLHttpRequest event handler does not crash. 
-PASS
-

Deleted: trunk/LayoutTests/platform/chromium-win/fast/xmlhttprequest/xmlhttprequest-recursive-sync-event-expected.txt (100375 => 100376)


--- trunk/LayoutTests/platform/chromium-win/fast/xmlhttprequest/xmlhttprequest-recursive-sync-event-expected.txt	2011-11-16 01:25:17 UTC (rev 100375)
+++ trunk/LayoutTests/platform/chromium-win/fast/xmlhttprequest/xmlhttprequest-recursive-sync-event-expected.txt	2011-11-16 01:27:52 UTC (rev 100376)
@@ -1,5 +0,0 @@
-CONSOLE MESSAGE: line 1: Uncaught RangeError: Maximum call stack size exceeded.
-CONSOLE MESSAGE: line 1: Uncaught RangeError: Maximum call stack size exceeded.
-This tests that having infinite recursion in XMLHttpRequest event handler does not crash. 
-PASS
-

Modified: trunk/Source/WebCore/ChangeLog (100375 => 100376)


--- trunk/Source/WebCore/ChangeLog	2011-11-16 01:25:17 UTC (rev 100375)
+++ trunk/Source/WebCore/ChangeLog	2011-11-16 01:27:52 UTC (rev 100376)
@@ -1,3 +1,13 @@
+2011-11-15  Adam Klein  <[email protected]>
+
+        [v8] Use throwError instead of compiling and running script in handleMaxRecursionDepthExceeded
+        https://bugs.webkit.org/show_bug.cgi?id=72432
+
+        Reviewed by Adam Barth.
+
+        * bindings/v8/V8Proxy.cpp:
+        (WebCore::handleMaxRecursionDepthExceeded):
+
 2011-11-15  Vincent Scheib  <[email protected]>
 
         Pointer Lock: Refactoring: PointerLock.idl: Dropping webkit prefix

Modified: trunk/Source/WebCore/bindings/v8/V8Proxy.cpp (100375 => 100376)


--- trunk/Source/WebCore/bindings/v8/V8Proxy.cpp	2011-11-16 01:25:17 UTC (rev 100375)
+++ trunk/Source/WebCore/bindings/v8/V8Proxy.cpp	2011-11-16 01:27:52 UTC (rev 100376)
@@ -177,9 +177,7 @@
 
 static v8::Local<v8::Value> handleMaxRecursionDepthExceeded()
 {
-    v8::Local<v8::String> code = v8::String::New("throw new RangeError('Maximum call stack size exceeded.')");
-    v8::Local<v8::Script> script = v8::Script::Compile(code);
-    script->Run();
+    throwError("Maximum call stack size exceeded.", V8Proxy::RangeError);
     return v8::Local<v8::Value>();
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to