Title: [118071] trunk/Source/WebCore
Revision
118071
Author
[email protected]
Date
2012-05-22 15:47:12 -0700 (Tue, 22 May 2012)

Log Message

[V8] Pass Isolate to throwTypeError()
https://bugs.webkit.org/show_bug.cgi?id=87111

Reviewed by Adam Barth.

The objective is to pass Isolate around in V8 bindings.
This patch passes Isolate to throwTypeError() in custom bindings.

No tests. No change in behavior.

* bindings/v8/custom/V8ArrayBufferCustom.cpp:
(WebCore::V8ArrayBuffer::constructorCallback):
* bindings/v8/custom/V8ArrayBufferViewCustom.h:
(WebCore::constructWebGLArrayWithArrayBufferArgument):
(WebCore::constructWebGLArray):
* bindings/v8/custom/V8AudioBufferSourceNodeCustom.cpp:
(WebCore::V8AudioBufferSourceNode::bufferAccessorSetter):
* bindings/v8/custom/V8AudioContextCustom.cpp:
(WebCore::V8AudioContext::constructorCallback):
* bindings/v8/custom/V8BlobCustom.cpp:
(WebCore::V8Blob::constructorCallback):
* bindings/v8/custom/V8ClipboardCustom.cpp:
(WebCore::V8Clipboard::setDragImageCallback):
* bindings/v8/custom/V8DOMFormDataCustom.cpp:
(WebCore::V8DOMFormData::constructorCallback):
* bindings/v8/custom/V8DataViewCustom.cpp:
(WebCore::V8DataView::constructorCallback):
* bindings/v8/custom/V8HTMLDocumentCustom.cpp:
(WebCore::V8HTMLDocument::openCallback):
* bindings/v8/custom/V8HTMLImageElementConstructor.cpp:
(WebCore::v8HTMLImageElementConstructorCallback):
* bindings/v8/custom/V8HTMLInputElementCustom.cpp:
(WebCore::V8HTMLInputElement::selectionStartAccessorGetter):
(WebCore::V8HTMLInputElement::selectionStartAccessorSetter):
(WebCore::V8HTMLInputElement::selectionEndAccessorGetter):
(WebCore::V8HTMLInputElement::selectionEndAccessorSetter):
(WebCore::V8HTMLInputElement::selectionDirectionAccessorGetter):
(WebCore::V8HTMLInputElement::selectionDirectionAccessorSetter):
(WebCore::V8HTMLInputElement::setSelectionRangeCallback):
* bindings/v8/custom/V8HTMLMediaElementCustom.cpp:
(WebCore::V8HTMLMediaElement::controllerAccessorSetter):
* bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
(WebCore::V8InjectedScriptHost::inspectedObjectCallback):
* 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/V8SQLResultSetRowListCustom.cpp:
(WebCore::V8SQLResultSetRowList::itemCallback):
* 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):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (118070 => 118071)


--- trunk/Source/WebCore/ChangeLog	2012-05-22 22:44:46 UTC (rev 118070)
+++ trunk/Source/WebCore/ChangeLog	2012-05-22 22:47:12 UTC (rev 118071)
@@ -1,5 +1,67 @@
 2012-05-22  Kentaro Hara  <[email protected]>
 
+        [V8] Pass Isolate to throwTypeError()
+        https://bugs.webkit.org/show_bug.cgi?id=87111
+
+        Reviewed by Adam Barth.
+
+        The objective is to pass Isolate around in V8 bindings.
+        This patch passes Isolate to throwTypeError() in custom bindings.
+
+        No tests. No change in behavior.
+
+        * bindings/v8/custom/V8ArrayBufferCustom.cpp:
+        (WebCore::V8ArrayBuffer::constructorCallback):
+        * bindings/v8/custom/V8ArrayBufferViewCustom.h:
+        (WebCore::constructWebGLArrayWithArrayBufferArgument):
+        (WebCore::constructWebGLArray):
+        * bindings/v8/custom/V8AudioBufferSourceNodeCustom.cpp:
+        (WebCore::V8AudioBufferSourceNode::bufferAccessorSetter):
+        * bindings/v8/custom/V8AudioContextCustom.cpp:
+        (WebCore::V8AudioContext::constructorCallback):
+        * bindings/v8/custom/V8BlobCustom.cpp:
+        (WebCore::V8Blob::constructorCallback):
+        * bindings/v8/custom/V8ClipboardCustom.cpp:
+        (WebCore::V8Clipboard::setDragImageCallback):
+        * bindings/v8/custom/V8DOMFormDataCustom.cpp:
+        (WebCore::V8DOMFormData::constructorCallback):
+        * bindings/v8/custom/V8DataViewCustom.cpp:
+        (WebCore::V8DataView::constructorCallback):
+        * bindings/v8/custom/V8HTMLDocumentCustom.cpp:
+        (WebCore::V8HTMLDocument::openCallback):
+        * bindings/v8/custom/V8HTMLImageElementConstructor.cpp:
+        (WebCore::v8HTMLImageElementConstructorCallback):
+        * bindings/v8/custom/V8HTMLInputElementCustom.cpp:
+        (WebCore::V8HTMLInputElement::selectionStartAccessorGetter):
+        (WebCore::V8HTMLInputElement::selectionStartAccessorSetter):
+        (WebCore::V8HTMLInputElement::selectionEndAccessorGetter):
+        (WebCore::V8HTMLInputElement::selectionEndAccessorSetter):
+        (WebCore::V8HTMLInputElement::selectionDirectionAccessorGetter):
+        (WebCore::V8HTMLInputElement::selectionDirectionAccessorSetter):
+        (WebCore::V8HTMLInputElement::setSelectionRangeCallback):
+        * bindings/v8/custom/V8HTMLMediaElementCustom.cpp:
+        (WebCore::V8HTMLMediaElement::controllerAccessorSetter):
+        * bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
+        (WebCore::V8InjectedScriptHost::inspectedObjectCallback):
+        * 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/V8SQLResultSetRowListCustom.cpp:
+        (WebCore::V8SQLResultSetRowList::itemCallback):
+        * 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):
+
+2012-05-22  Kentaro Hara  <[email protected]>
+
         [V8] Replace 'setDOMException(); return Undefined();' with 'return setDOMException();'
         https://bugs.webkit.org/show_bug.cgi?id=87102
 

Modified: trunk/Source/WebCore/bindings/v8/custom/V8ArrayBufferCustom.cpp (118070 => 118071)


--- trunk/Source/WebCore/bindings/v8/custom/V8ArrayBufferCustom.cpp	2012-05-22 22:44:46 UTC (rev 118070)
+++ trunk/Source/WebCore/bindings/v8/custom/V8ArrayBufferCustom.cpp	2012-05-22 22:47:12 UTC (rev 118071)
@@ -43,7 +43,7 @@
     INC_STATS("DOM.ArrayBuffer.Constructor");
 
     if (!args.IsConstructCall())
-        return V8Proxy::throwTypeError("DOM object constructor cannot be called as a function.");
+        return V8Proxy::throwTypeError("DOM object constructor cannot be called as a function.", args.GetIsolate());
 
     if (ConstructorMode::current() == ConstructorMode::WrapExistingObject)
         return args.Holder();

Modified: trunk/Source/WebCore/bindings/v8/custom/V8ArrayBufferViewCustom.h (118070 => 118071)


--- trunk/Source/WebCore/bindings/v8/custom/V8ArrayBufferViewCustom.h	2012-05-22 22:44:46 UTC (rev 118070)
+++ trunk/Source/WebCore/bindings/v8/custom/V8ArrayBufferViewCustom.h	2012-05-22 22:47:12 UTC (rev 118071)
@@ -60,20 +60,20 @@
 {
     ArrayBuffer* buf = V8ArrayBuffer::toNative(args[0]->ToObject());
     if (!buf)
-        return V8Proxy::throwTypeError("Could not convert argument 0 to a ArrayBuffer");
+        return V8Proxy::throwTypeError("Could not convert argument 0 to a ArrayBuffer", args.GetIsolate());
     bool ok;
     uint32_t offset = 0;
     int argLen = args.Length();
     if (argLen > 1) {
         offset = toUInt32(args[1], ok);
         if (!ok)
-            return V8Proxy::throwTypeError("Could not convert argument 1 to a number");
+            return V8Proxy::throwTypeError("Could not convert argument 1 to a number", args.GetIsolate());
     }
     uint32_t length = 0;
     if (argLen > 2) {
         length = toUInt32(args[2], ok);
         if (!ok)
-            return V8Proxy::throwTypeError("Could not convert argument 2 to a number");
+            return V8Proxy::throwTypeError("Could not convert argument 2 to a number", args.GetIsolate());
     } else {
         if ((buf->byteLength() - offset) % sizeof(ElementType))
             return V8Proxy::throwError(V8Proxy::RangeError, "ArrayBuffer length minus the byteOffset is not a multiple of the element size.", args.GetIsolate());
@@ -97,7 +97,7 @@
 v8::Handle<v8::Value> constructWebGLArray(const v8::Arguments& args, WrapperTypeInfo* type, v8::ExternalArrayType arrayType)
 {
     if (!args.IsConstructCall())
-        return V8Proxy::throwTypeError("DOM object constructor cannot be called as a function.");
+        return V8Proxy::throwTypeError("DOM object constructor cannot be called as a function.", args.GetIsolate());
 
     if (ConstructorMode::current() == ConstructorMode::WrapExistingObject)
         return args.Holder();
@@ -150,7 +150,7 @@
     if (args[0]->IsObject()) {
         srcArray = args[0]->ToObject();
         if (srcArray.IsEmpty())
-            return V8Proxy::throwTypeError("Could not convert argument 0 to an array");
+            return V8Proxy::throwTypeError("Could not convert argument 0 to an array", args.GetIsolate());
         len = toUInt32(srcArray->Get(v8::String::New("length")));
         doInstantiation = true;
     } else {

Modified: trunk/Source/WebCore/bindings/v8/custom/V8AudioBufferSourceNodeCustom.cpp (118070 => 118071)


--- trunk/Source/WebCore/bindings/v8/custom/V8AudioBufferSourceNodeCustom.cpp	2012-05-22 22:44:46 UTC (rev 118070)
+++ trunk/Source/WebCore/bindings/v8/custom/V8AudioBufferSourceNodeCustom.cpp	2012-05-22 22:47:12 UTC (rev 118071)
@@ -47,13 +47,13 @@
     if (V8AudioBuffer::HasInstance(value)) {
         buffer = V8AudioBuffer::toNative(value->ToObject());
         if (buffer && !imp->setBuffer(buffer)) {
-            V8Proxy::throwTypeError("AudioBuffer unsupported number of channels");
+            V8Proxy::throwTypeError("AudioBuffer unsupported number of channels", info.GetIsolate());
             return;
         }
     }
     
     if (!buffer) {
-        V8Proxy::throwTypeError("Value is not of type AudioBuffer");
+        V8Proxy::throwTypeError("Value is not of type AudioBuffer", info.GetIsolate());
         return;
     }
 }

Modified: trunk/Source/WebCore/bindings/v8/custom/V8AudioContextCustom.cpp (118070 => 118071)


--- trunk/Source/WebCore/bindings/v8/custom/V8AudioContextCustom.cpp	2012-05-22 22:44:46 UTC (rev 118070)
+++ trunk/Source/WebCore/bindings/v8/custom/V8AudioContextCustom.cpp	2012-05-22 22:47:12 UTC (rev 118071)
@@ -44,7 +44,7 @@
     INC_STATS("DOM.AudioContext.Contructor");
 
     if (!args.IsConstructCall())
-        return V8Proxy::throwTypeError("AudioContext constructor cannot be called as a function.");
+        return V8Proxy::throwTypeError("AudioContext constructor cannot be called as a function.", args.GetIsolate());
 
     if (ConstructorMode::current() == ConstructorMode::WrapExistingObject)
         return args.Holder();

Modified: trunk/Source/WebCore/bindings/v8/custom/V8BlobCustom.cpp (118070 => 118071)


--- trunk/Source/WebCore/bindings/v8/custom/V8BlobCustom.cpp	2012-05-22 22:44:46 UTC (rev 118070)
+++ trunk/Source/WebCore/bindings/v8/custom/V8BlobCustom.cpp	2012-05-22 22:47:12 UTC (rev 118071)
@@ -60,7 +60,7 @@
     INC_STATS("DOM.Blob.Constructor");
 
     if (!args.IsConstructCall())
-        return V8Proxy::throwTypeError("DOM object constructor cannot be called as a function.");
+        return V8Proxy::throwTypeError("DOM object constructor cannot be called as a function.", args.GetIsolate());
 
     if (ConstructorMode::current() == ConstructorMode::WrapExistingObject)
         return args.Holder();
@@ -77,14 +77,14 @@
 
     v8::Local<v8::Value> firstArg = args[0];
     if (!firstArg->IsArray())
-        return V8Proxy::throwTypeError("First argument of the constructor is not of type Array");
+        return V8Proxy::throwTypeError("First argument of the constructor is not of type Array", args.GetIsolate());
 
     String type;
     String endings = "transparent";
 
     if (args.Length() > 1) {
         if (!args[1]->IsObject())
-            return V8Proxy::throwTypeError("Second argument of the constructor is not of type Object");
+            return V8Proxy::throwTypeError("Second argument of the constructor is not of type Object", args.GetIsolate());
 
         Dictionary dictionary(args[1]);
 
@@ -95,7 +95,7 @@
 
         if (containsEndings) {
             if (endings != "transparent" && endings != "native")
-                return V8Proxy::throwTypeError("The endings property must be either \"transparent\" or \"native\"");
+                return V8Proxy::throwTypeError("The endings property must be either \"transparent\" or \"native\"", args.GetIsolate());
         }
 
         v8::TryCatch tryCatchType;

Modified: trunk/Source/WebCore/bindings/v8/custom/V8ClipboardCustom.cpp (118070 => 118071)


--- trunk/Source/WebCore/bindings/v8/custom/V8ClipboardCustom.cpp	2012-05-22 22:44:46 UTC (rev 118070)
+++ trunk/Source/WebCore/bindings/v8/custom/V8ClipboardCustom.cpp	2012-05-22 22:47:12 UTC (rev 118071)
@@ -99,7 +99,7 @@
         node = V8Node::toNative(v8::Handle<v8::Object>::Cast(args[0]));
 
     if (!node || !node->isElementNode())
-        return V8Proxy::throwTypeError("setDragImageFromElement: Invalid first argument");
+        return V8Proxy::throwTypeError("setDragImageFromElement: Invalid first argument", args.GetIsolate());
 
     if (static_cast<Element*>(node)->hasLocalName(HTMLNames::imgTag) && !node->inDocument())
         clipboard->setDragImage(static_cast<HTMLImageElement*>(node)->cachedImage(), IntPoint(x, y));

Modified: trunk/Source/WebCore/bindings/v8/custom/V8DOMFormDataCustom.cpp (118070 => 118071)


--- trunk/Source/WebCore/bindings/v8/custom/V8DOMFormDataCustom.cpp	2012-05-22 22:44:46 UTC (rev 118070)
+++ trunk/Source/WebCore/bindings/v8/custom/V8DOMFormDataCustom.cpp	2012-05-22 22:47:12 UTC (rev 118071)
@@ -45,7 +45,7 @@
     INC_STATS("DOM.FormData.Constructor");
 
     if (!args.IsConstructCall())
-        return V8Proxy::throwTypeError("DOM object constructor cannot be called as a function.");
+        return V8Proxy::throwTypeError("DOM object constructor cannot be called as a function.", args.GetIsolate());
 
     if (ConstructorMode::current() == ConstructorMode::WrapExistingObject)
         return args.Holder();

Modified: trunk/Source/WebCore/bindings/v8/custom/V8DataViewCustom.cpp (118070 => 118071)


--- trunk/Source/WebCore/bindings/v8/custom/V8DataViewCustom.cpp	2012-05-22 22:44:46 UTC (rev 118070)
+++ trunk/Source/WebCore/bindings/v8/custom/V8DataViewCustom.cpp	2012-05-22 22:47:12 UTC (rev 118071)
@@ -39,7 +39,7 @@
     INC_STATS("DOM.DataView.Constructor");
 
     if (!args.IsConstructCall())
-        return V8Proxy::throwTypeError("DOM object constructor cannot be called as a function");
+        return V8Proxy::throwTypeError("DOM object constructor cannot be called as a function", args.GetIsolate());
 
     if (ConstructorMode::current() == ConstructorMode::WrapExistingObject)
         return args.Holder();

Modified: trunk/Source/WebCore/bindings/v8/custom/V8HTMLDocumentCustom.cpp (118070 => 118071)


--- trunk/Source/WebCore/bindings/v8/custom/V8HTMLDocumentCustom.cpp	2012-05-22 22:44:46 UTC (rev 118070)
+++ trunk/Source/WebCore/bindings/v8/custom/V8HTMLDocumentCustom.cpp	2012-05-22 22:47:12 UTC (rev 118071)
@@ -149,7 +149,7 @@
             v8::Local<v8::Value> function = global->Get(v8::String::New("open"));
             // If the open property is not a function throw a type error.
             if (!function->IsFunction())
-                return V8Proxy::throwTypeError("open is not a function");
+                return V8Proxy::throwTypeError("open is not a function", args.GetIsolate());
             // Wrap up the arguments and call the function.
             OwnArrayPtr<v8::Local<v8::Value> > params = adoptArrayPtr(new v8::Local<v8::Value>[args.Length()]);
             for (int i = 0; i < args.Length(); i++)

Modified: trunk/Source/WebCore/bindings/v8/custom/V8HTMLImageElementConstructor.cpp (118070 => 118071)


--- trunk/Source/WebCore/bindings/v8/custom/V8HTMLImageElementConstructor.cpp	2012-05-22 22:44:46 UTC (rev 118070)
+++ trunk/Source/WebCore/bindings/v8/custom/V8HTMLImageElementConstructor.cpp	2012-05-22 22:47:12 UTC (rev 118071)
@@ -51,7 +51,7 @@
     INC_STATS("DOM.HTMLImageElement.Contructor");
 
     if (!args.IsConstructCall())
-        return V8Proxy::throwTypeError("DOM object constructor cannot be called as a function.");
+        return V8Proxy::throwTypeError("DOM object constructor cannot be called as a function.", args.GetIsolate());
 
     if (ConstructorMode::current() == ConstructorMode::WrapExistingObject)
         return args.Holder();

Modified: trunk/Source/WebCore/bindings/v8/custom/V8HTMLInputElementCustom.cpp (118070 => 118071)


--- trunk/Source/WebCore/bindings/v8/custom/V8HTMLInputElementCustom.cpp	2012-05-22 22:44:46 UTC (rev 118070)
+++ trunk/Source/WebCore/bindings/v8/custom/V8HTMLInputElementCustom.cpp	2012-05-22 22:47:12 UTC (rev 118071)
@@ -45,7 +45,7 @@
     HTMLInputElement* imp = V8HTMLInputElement::toNative(holder);
 
     if (!imp->canHaveSelection())
-        return V8Proxy::throwTypeError("Accessing selectionStart on an input element that cannot have a selection.");
+        return V8Proxy::throwTypeError("Accessing selectionStart on an input element that cannot have a selection.", info.GetIsolate());
 
     int v = imp->selectionStart();
     return v8::Integer::New(v);
@@ -58,7 +58,7 @@
     HTMLInputElement* imp = V8HTMLInputElement::toNative(holder);
 
     if (!imp->canHaveSelection()) {
-        V8Proxy::throwTypeError("Accessing selectionStart on an input element that cannot have a selection.");
+        V8Proxy::throwTypeError("Accessing selectionStart on an input element that cannot have a selection.", info.GetIsolate());
         return;
     }
     imp->setSelectionStart(value->Int32Value());
@@ -71,7 +71,7 @@
     HTMLInputElement* imp = V8HTMLInputElement::toNative(holder);
 
     if (!imp->canHaveSelection())
-        return V8Proxy::throwTypeError("Accessing selectionEnd on an input element that cannot have a selection.");
+        return V8Proxy::throwTypeError("Accessing selectionEnd on an input element that cannot have a selection.", info.GetIsolate());
 
     int v = imp->selectionEnd();
     return v8::Integer::New(v);
@@ -84,7 +84,7 @@
     HTMLInputElement* imp = V8HTMLInputElement::toNative(holder);
 
     if (!imp->canHaveSelection()) {
-        V8Proxy::throwTypeError("Accessing selectionEnd on an input element that cannot have a selection.");
+        V8Proxy::throwTypeError("Accessing selectionEnd on an input element that cannot have a selection.", info.GetIsolate());
         return;
     }
 
@@ -98,7 +98,7 @@
     HTMLInputElement* imp = V8HTMLInputElement::toNative(holder);
 
     if (!imp->canHaveSelection())
-        return V8Proxy::throwTypeError("Accessing selectionDirection on an input element that cannot have a selection.");
+        return V8Proxy::throwTypeError("Accessing selectionDirection on an input element that cannot have a selection.", info.GetIsolate());
 
     return v8String(imp->selectionDirection());
 }
@@ -110,7 +110,7 @@
     HTMLInputElement* imp = V8HTMLInputElement::toNative(holder);
 
     if (!imp->canHaveSelection()) {
-        V8Proxy::throwTypeError("Accessing selectionDirection on an input element that cannot have a selection.");
+        V8Proxy::throwTypeError("Accessing selectionDirection on an input element that cannot have a selection.", info.GetIsolate());
         return;
     }
 
@@ -124,7 +124,7 @@
     HTMLInputElement* imp = V8HTMLInputElement::toNative(holder);
 
     if (!imp->canHaveSelection())
-        return V8Proxy::throwTypeError("Calling setSelectionRange on an input element that cannot have a selection.");
+        return V8Proxy::throwTypeError("Calling setSelectionRange on an input element that cannot have a selection.", args.GetIsolate());
 
     int start = args[0]->Int32Value();
     int end = args[1]->Int32Value();

Modified: trunk/Source/WebCore/bindings/v8/custom/V8HTMLMediaElementCustom.cpp (118070 => 118071)


--- trunk/Source/WebCore/bindings/v8/custom/V8HTMLMediaElementCustom.cpp	2012-05-22 22:44:46 UTC (rev 118070)
+++ trunk/Source/WebCore/bindings/v8/custom/V8HTMLMediaElementCustom.cpp	2012-05-22 22:47:12 UTC (rev 118071)
@@ -43,7 +43,7 @@
         controller = V8MediaController::toNative(value->ToObject());
     
     if (!controller) {
-        V8Proxy::throwTypeError("Value is not of type MediaController");
+        V8Proxy::throwTypeError("Value is not of type MediaController", info.GetIsolate());
         return;
     }
 

Modified: trunk/Source/WebCore/bindings/v8/custom/V8InjectedScriptHostCustom.cpp (118070 => 118071)


--- trunk/Source/WebCore/bindings/v8/custom/V8InjectedScriptHostCustom.cpp	2012-05-22 22:44:46 UTC (rev 118070)
+++ trunk/Source/WebCore/bindings/v8/custom/V8InjectedScriptHostCustom.cpp	2012-05-22 22:47:12 UTC (rev 118071)
@@ -83,7 +83,7 @@
         return v8::Undefined();
 
     if (!args[0]->IsInt32())
-        return V8Proxy::throwTypeError("argument has to be an integer");
+        return V8Proxy::throwTypeError("argument has to be an integer", args.GetIsolate());
 
     InjectedScriptHost* host = V8InjectedScriptHost::toNative(args.Holder());
     InjectedScriptHost::InspectableObject* object = host->inspectedObject(args[0]->ToInt32()->Value());

Modified: trunk/Source/WebCore/bindings/v8/custom/V8IntentConstructor.cpp (118070 => 118071)


--- trunk/Source/WebCore/bindings/v8/custom/V8IntentConstructor.cpp	2012-05-22 22:44:46 UTC (rev 118070)
+++ trunk/Source/WebCore/bindings/v8/custom/V8IntentConstructor.cpp	2012-05-22 22:47:12 UTC (rev 118071)
@@ -48,7 +48,7 @@
     INC_STATS("DOM.Intent.Constructor");
 
     if (!args.IsConstructCall())
-        return V8Proxy::throwTypeError("DOM object constructor cannot be called as a function.");
+        return V8Proxy::throwTypeError("DOM object constructor cannot be called as a function.", args.GetIsolate());
 
     if (ConstructorMode::current() == ConstructorMode::WrapExistingObject)
         return args.Holder();
@@ -76,7 +76,7 @@
     ArrayBufferArray arrayBufferArrayTransferList;
     if (args.Length() > 3) {
         if (!extractTransferables(args[3], messagePortArrayTransferList, arrayBufferArrayTransferList))
-            return V8Proxy::throwTypeError("Could not extract transferables");
+            return V8Proxy::throwTypeError("Could not extract transferables", args.GetIsolate());
     }
     bool dataDidThrow = false;
     RefPtr<SerializedScriptValue> data = "" &messagePortArrayTransferList, &arrayBufferArrayTransferList, dataDidThrow);

Modified: trunk/Source/WebCore/bindings/v8/custom/V8MessageChannelConstructor.cpp (118070 => 118071)


--- trunk/Source/WebCore/bindings/v8/custom/V8MessageChannelConstructor.cpp	2012-05-22 22:44:46 UTC (rev 118070)
+++ trunk/Source/WebCore/bindings/v8/custom/V8MessageChannelConstructor.cpp	2012-05-22 22:47:12 UTC (rev 118071)
@@ -51,7 +51,7 @@
     // FIXME: The logic here is almost exact duplicate of V8::constructDOMObject.
     // Consider refactoring to reduce duplication.
     if (!args.IsConstructCall())
-        return V8Proxy::throwTypeError("DOM object constructor cannot be called as a function.");
+        return V8Proxy::throwTypeError("DOM object constructor cannot be called as a function.", args.GetIsolate());
 
     if (ConstructorMode::current() == ConstructorMode::WrapExistingObject)
         return args.Holder();

Modified: trunk/Source/WebCore/bindings/v8/custom/V8NotificationCenterCustom.cpp (118070 => 118071)


--- trunk/Source/WebCore/bindings/v8/custom/V8NotificationCenterCustom.cpp	2012-05-22 22:44:46 UTC (rev 118070)
+++ trunk/Source/WebCore/bindings/v8/custom/V8NotificationCenterCustom.cpp	2012-05-22 22:47:12 UTC (rev 118071)
@@ -95,7 +95,7 @@
     RefPtr<V8CustomVoidCallback> callback;
     if (args.Length() > 0) {
         if (!args[0]->IsObject())
-            return V8Proxy::throwTypeError("Callback must be of valid type.");
+            return V8Proxy::throwTypeError("Callback must be of valid type.", args.GetIsolate());
  
         callback = V8CustomVoidCallback::create(args[0], context);
     }

Modified: trunk/Source/WebCore/bindings/v8/custom/V8SQLResultSetRowListCustom.cpp (118070 => 118071)


--- trunk/Source/WebCore/bindings/v8/custom/V8SQLResultSetRowListCustom.cpp	2012-05-22 22:44:46 UTC (rev 118070)
+++ trunk/Source/WebCore/bindings/v8/custom/V8SQLResultSetRowListCustom.cpp	2012-05-22 22:47:12 UTC (rev 118071)
@@ -47,7 +47,7 @@
         return V8Proxy::throwError(V8Proxy::SyntaxError, "Item index is required.", args.GetIsolate());
 
     if (!args[0]->IsNumber())
-        return V8Proxy::throwTypeError("Item index must be a number.");
+        return V8Proxy::throwTypeError("Item index must be a number.", args.GetIsolate());
 
     SQLResultSetRowList* rowList = V8SQLResultSetRowList::toNative(args.Holder());
 

Modified: trunk/Source/WebCore/bindings/v8/custom/V8WebKitMutationObserverCustom.cpp (118070 => 118071)


--- trunk/Source/WebCore/bindings/v8/custom/V8WebKitMutationObserverCustom.cpp	2012-05-22 22:44:46 UTC (rev 118070)
+++ trunk/Source/WebCore/bindings/v8/custom/V8WebKitMutationObserverCustom.cpp	2012-05-22 22:47:12 UTC (rev 118071)
@@ -55,7 +55,7 @@
     INC_STATS("DOM.WebKitMutationObserver.Constructor");
 
     if (!args.IsConstructCall())
-        return V8Proxy::throwTypeError("DOM object constructor cannot be called as a function.");
+        return V8Proxy::throwTypeError("DOM object constructor cannot be called as a function.", args.GetIsolate());
 
     if (ConstructorMode::current() == ConstructorMode::WrapExistingObject)
         return args.Holder();

Modified: trunk/Source/WebCore/bindings/v8/custom/V8WebKitPointConstructor.cpp (118070 => 118071)


--- trunk/Source/WebCore/bindings/v8/custom/V8WebKitPointConstructor.cpp	2012-05-22 22:44:46 UTC (rev 118070)
+++ trunk/Source/WebCore/bindings/v8/custom/V8WebKitPointConstructor.cpp	2012-05-22 22:47:12 UTC (rev 118071)
@@ -45,7 +45,7 @@
     INC_STATS("DOM.WebKitPoint.Constructor");
 
     if (!args.IsConstructCall())
-        return V8Proxy::throwTypeError("DOM object constructor cannot be called as a function.");
+        return V8Proxy::throwTypeError("DOM object constructor cannot be called as a function.", args.GetIsolate());
 
     if (ConstructorMode::current() == ConstructorMode::WrapExistingObject)
         return args.Holder();

Modified: trunk/Source/WebCore/bindings/v8/custom/V8WebSocketCustom.cpp (118070 => 118071)


--- trunk/Source/WebCore/bindings/v8/custom/V8WebSocketCustom.cpp	2012-05-22 22:44:46 UTC (rev 118070)
+++ trunk/Source/WebCore/bindings/v8/custom/V8WebSocketCustom.cpp	2012-05-22 22:47:12 UTC (rev 118071)
@@ -56,7 +56,7 @@
     INC_STATS("DOM.WebSocket.Constructor");
 
     if (!args.IsConstructCall())
-        return V8Proxy::throwTypeError("DOM object constructor cannot be called as a function.");
+        return V8Proxy::throwTypeError("DOM object constructor cannot be called as a function.", args.GetIsolate());
 
     if (ConstructorMode::current() == ConstructorMode::WrapExistingObject)
         return args.Holder();

Modified: trunk/Source/WebCore/bindings/v8/custom/V8XMLHttpRequestConstructor.cpp (118070 => 118071)


--- trunk/Source/WebCore/bindings/v8/custom/V8XMLHttpRequestConstructor.cpp	2012-05-22 22:44:46 UTC (rev 118070)
+++ trunk/Source/WebCore/bindings/v8/custom/V8XMLHttpRequestConstructor.cpp	2012-05-22 22:47:12 UTC (rev 118071)
@@ -48,7 +48,7 @@
     INC_STATS("DOM.XMLHttpRequest.Constructor");
 
     if (!args.IsConstructCall())
-        return V8Proxy::throwTypeError("DOM object constructor cannot be called as a function.");
+        return V8Proxy::throwTypeError("DOM object constructor cannot be called as a function.", args.GetIsolate());
 
     if (ConstructorMode::current() == ConstructorMode::WrapExistingObject)
         return args.Holder();
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to