[V8][Refactoring] Support an optional 'message' argument for throwTypeError()
authorharaken@chromium.org <haraken@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 17 May 2012 15:17:20 +0000 (15:17 +0000)
committerharaken@chromium.org <haraken@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 17 May 2012 15:17:20 +0000 (15:17 +0000)
commitbe4085b9b7f595c19b01e50dedcd57c35c84e724
treef133c06743e3a9fdcf12999575455aea77796a03
parent738801efba559697144260ba730c1e14ed028a78
[V8][Refactoring] Support an optional 'message' argument for throwTypeError()
https://bugs.webkit.org/show_bug.cgi?id=86576

Reviewed by Adam Barth.

As commented in https://bugs.webkit.org/show_bug.cgi?id=84074#c5,
I am planning to refactor a series of confusing throwError()s into
throwError() and throwTypeError().

This patch supports an optional 'message' argument for V8Proxy::throwTypeError().
Also this patch replaces throwError("message", V8Proxy::TypeError) in custom bindings
with V8Proxy::throwTypeError("message").

No tests. No change in behavior.

* bindings/v8/V8Proxy.cpp:
(WebCore::V8Proxy::throwTypeError):
* bindings/v8/V8Proxy.h:
(V8Proxy):
* bindings/v8/custom/V8ArrayBufferViewCustom.h:
(WebCore::constructWebGLArray):
* bindings/v8/custom/V8AudioContextCustom.cpp:
(WebCore::V8AudioContext::constructorCallback):
* bindings/v8/custom/V8BlobCustom.cpp:
(WebCore::V8Blob::constructorCallback):
* bindings/v8/custom/V8DOMFormDataCustom.cpp:
(WebCore::V8DOMFormData::constructorCallback):
* bindings/v8/custom/V8DataViewCustom.cpp:
(WebCore::V8DataView::constructorCallback):
* bindings/v8/custom/V8HTMLImageElementConstructor.cpp:
(WebCore::v8HTMLImageElementConstructorCallback):
* bindings/v8/custom/V8IntentConstructor.cpp:
(WebCore::V8Intent::constructorCallback):
* bindings/v8/custom/V8MessageChannelConstructor.cpp:
(WebCore::V8MessageChannel::constructorCallback):
* bindings/v8/custom/V8NotificationCenterCustom.cpp:
(WebCore::V8NotificationCenter::requestPermissionCallback):
* bindings/v8/custom/V8WebKitMutationObserverCustom.cpp:
(WebCore::V8WebKitMutationObserver::constructorCallback):
* bindings/v8/custom/V8WebKitPointConstructor.cpp:
(WebCore::V8WebKitPoint::constructorCallback):
* bindings/v8/custom/V8WebSocketCustom.cpp:
(WebCore::V8WebSocket::constructorCallback):
* bindings/v8/custom/V8XMLHttpRequestConstructor.cpp:
(WebCore::V8XMLHttpRequest::constructorCallback):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@117448 268f45cc-cd09-0410-ab3c-d52691b4dbfc
16 files changed:
Source/WebCore/ChangeLog
Source/WebCore/bindings/v8/V8Proxy.cpp
Source/WebCore/bindings/v8/V8Proxy.h
Source/WebCore/bindings/v8/custom/V8ArrayBufferViewCustom.h
Source/WebCore/bindings/v8/custom/V8AudioContextCustom.cpp
Source/WebCore/bindings/v8/custom/V8BlobCustom.cpp
Source/WebCore/bindings/v8/custom/V8DOMFormDataCustom.cpp
Source/WebCore/bindings/v8/custom/V8DataViewCustom.cpp
Source/WebCore/bindings/v8/custom/V8HTMLImageElementConstructor.cpp
Source/WebCore/bindings/v8/custom/V8IntentConstructor.cpp
Source/WebCore/bindings/v8/custom/V8MessageChannelConstructor.cpp
Source/WebCore/bindings/v8/custom/V8NotificationCenterCustom.cpp
Source/WebCore/bindings/v8/custom/V8WebKitMutationObserverCustom.cpp
Source/WebCore/bindings/v8/custom/V8WebKitPointConstructor.cpp
Source/WebCore/bindings/v8/custom/V8WebSocketCustom.cpp
Source/WebCore/bindings/v8/custom/V8XMLHttpRequestConstructor.cpp