Title: [125236] trunk/Source/WebCore
Revision
125236
Author
[email protected]
Date
2012-08-09 19:13:55 -0700 (Thu, 09 Aug 2012)

Log Message

[V8] V8Utilities::throwTypeMismatchException() should use setDOMException()
https://bugs.webkit.org/show_bug.cgi?id=93610

Reviewed by Adam Barth.

Given that V8Utilities::throwTypeMismatchException() throws a DOM exception,
we should use setDOMException() instead of throwError().

This patch also renames throwTypeMismatchException() to setTypeMismatchException().

No tests. I couldn't figure out how to trigger the call path.
Either way this is just a minor change of error message.

* bindings/v8/V8Utilities.cpp:
(WebCore::setTypeMismatchException):
* bindings/v8/V8Utilities.h:
(WebCore::createFunctionOnlyCallback):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (125235 => 125236)


--- trunk/Source/WebCore/ChangeLog	2012-08-10 02:11:58 UTC (rev 125235)
+++ trunk/Source/WebCore/ChangeLog	2012-08-10 02:13:55 UTC (rev 125236)
@@ -1,3 +1,23 @@
+2012-08-09  Kentaro Hara  <[email protected]>
+
+        [V8] V8Utilities::throwTypeMismatchException() should use setDOMException()
+        https://bugs.webkit.org/show_bug.cgi?id=93610
+
+        Reviewed by Adam Barth.
+
+        Given that V8Utilities::throwTypeMismatchException() throws a DOM exception,
+        we should use setDOMException() instead of throwError().
+
+        This patch also renames throwTypeMismatchException() to setTypeMismatchException().
+
+        No tests. I couldn't figure out how to trigger the call path.
+        Either way this is just a minor change of error message.
+
+        * bindings/v8/V8Utilities.cpp:
+        (WebCore::setTypeMismatchException):
+        * bindings/v8/V8Utilities.h:
+        (WebCore::createFunctionOnlyCallback):
+
 2012-08-09  Julien Chaffraix  <[email protected]>
 
         Crash in WebCore::RenderTable::cellBefore

Modified: trunk/Source/WebCore/bindings/v8/V8Utilities.cpp (125235 => 125236)


--- trunk/Source/WebCore/bindings/v8/V8Utilities.cpp	2012-08-10 02:11:58 UTC (rev 125235)
+++ trunk/Source/WebCore/bindings/v8/V8Utilities.cpp	2012-08-10 02:13:55 UTC (rev 125236)
@@ -191,9 +191,9 @@
     return 0;
 }
 
-void throwTypeMismatchException(v8::Isolate* isolate)
+void setTypeMismatchException(v8::Isolate* isolate)
 {
-    V8Proxy::throwError(V8Proxy::GeneralError, "TYPE_MISMATCH_ERR: DOM Exception 17", isolate);
+    V8Proxy::setDOMException(TYPE_MISMATCH_ERR, isolate);
 }
 
 } // namespace WebCore

Modified: trunk/Source/WebCore/bindings/v8/V8Utilities.h (125235 => 125236)


--- trunk/Source/WebCore/bindings/v8/V8Utilities.h	2012-08-10 02:11:58 UTC (rev 125235)
+++ trunk/Source/WebCore/bindings/v8/V8Utilities.h	2012-08-10 02:13:55 UTC (rev 125236)
@@ -60,7 +60,7 @@
 
     ScriptExecutionContext* getScriptExecutionContext();
 
-    void throwTypeMismatchException(v8::Isolate*);
+    void setTypeMismatchException(v8::Isolate*);
 
     enum CallbackAllowedValueFlag {
         CallbackAllowUndefined = 1,
@@ -102,7 +102,7 @@
 
         if (!value->IsFunction()) {
             succeeded = false;
-            throwTypeMismatchException(isolate);
+            setTypeMismatchException(isolate);
             return 0;
         }
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to