[V8] Add an optional Isolate argument to toV8().
authorharaken@chromium.org <haraken@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 23 Apr 2012 16:20:06 +0000 (16:20 +0000)
committerharaken@chromium.org <haraken@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 23 Apr 2012 16:20:06 +0000 (16:20 +0000)
https://bugs.webkit.org/show_bug.cgi?id=84161

Reviewed by Nate Chapin.

The final objective is to pass Isolate around in V8 bindings.
This patch adds an optional Isolate argument to toV8().
After rewriting all toV8() callers so that they pass Isolate,
I will make the Isolate argument non-optional.

No tests. No change in behavior.

* bindings/scripts/CodeGeneratorV8.pm:
Modified as described above.
(GenerateHeader):
(NativeToJSValue):
* bindings/v8/custom/V8BlobCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8CSSRuleCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8CSSStyleSheetCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8CSSValueCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8CanvasPixelArrayCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8DOMStringMapCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8DOMTokenListCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8DOMWindowCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8DataViewCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8DocumentCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8EntryCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8EntrySyncCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8EventCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8Float32ArrayCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8Float64ArrayCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8HTMLCollectionCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8HTMLDocumentCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8HTMLElementCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8IDBAnyCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8IDBKeyCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8ImageDataCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8Int16ArrayCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8Int32ArrayCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8Int8ArrayCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8LocationCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8NamedNodeMapCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8NodeCustom.cpp:
(WebCore::toV8Slow):
* bindings/v8/custom/V8SVGDocumentCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8SVGElementCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8SVGPathSegCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8ScriptProfileCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8ScriptProfileNodeCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8StyleSheetCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8Uint16ArrayCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8Uint32ArrayCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8Uint8ArrayCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8Uint8ClampedArrayCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8WorkerContextCustom.cpp:
(WebCore::toV8):

* bindings/scripts/test/V8/V8Float64Array.h:
Updated run-bindings-tests results.
(WebCore):
(WebCore::toV8):
* bindings/scripts/test/V8/V8TestActiveDOMObject.h:
(WebCore::toV8):
* bindings/scripts/test/V8/V8TestCustomNamedGetter.h:
(WebCore::toV8):
* bindings/scripts/test/V8/V8TestEventConstructor.h:
(WebCore::toV8):
* bindings/scripts/test/V8/V8TestEventTarget.h:
(WebCore::toV8):
* bindings/scripts/test/V8/V8TestInterface.h:
(WebCore::toV8):
* bindings/scripts/test/V8/V8TestMediaQueryListListener.h:
(WebCore::toV8):
* bindings/scripts/test/V8/V8TestNamedConstructor.h:
(WebCore::toV8):
* bindings/scripts/test/V8/V8TestNode.h:
(WebCore::toV8):
* bindings/scripts/test/V8/V8TestObj.h:
(WebCore::toV8):
* bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h:
(WebCore::toV8):

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

51 files changed:
Source/WebCore/ChangeLog
Source/WebCore/bindings/scripts/CodeGeneratorV8.pm
Source/WebCore/bindings/scripts/test/V8/V8Float64Array.h
Source/WebCore/bindings/scripts/test/V8/V8TestActiveDOMObject.h
Source/WebCore/bindings/scripts/test/V8/V8TestCustomNamedGetter.h
Source/WebCore/bindings/scripts/test/V8/V8TestEventConstructor.h
Source/WebCore/bindings/scripts/test/V8/V8TestEventTarget.h
Source/WebCore/bindings/scripts/test/V8/V8TestInterface.h
Source/WebCore/bindings/scripts/test/V8/V8TestMediaQueryListListener.h
Source/WebCore/bindings/scripts/test/V8/V8TestNamedConstructor.h
Source/WebCore/bindings/scripts/test/V8/V8TestNode.h
Source/WebCore/bindings/scripts/test/V8/V8TestObj.h
Source/WebCore/bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h
Source/WebCore/bindings/v8/custom/V8BlobCustom.cpp
Source/WebCore/bindings/v8/custom/V8CSSRuleCustom.cpp
Source/WebCore/bindings/v8/custom/V8CSSStyleSheetCustom.cpp
Source/WebCore/bindings/v8/custom/V8CSSValueCustom.cpp
Source/WebCore/bindings/v8/custom/V8CanvasPixelArrayCustom.cpp
Source/WebCore/bindings/v8/custom/V8DOMStringMapCustom.cpp
Source/WebCore/bindings/v8/custom/V8DOMTokenListCustom.cpp
Source/WebCore/bindings/v8/custom/V8DOMWindowCustom.cpp
Source/WebCore/bindings/v8/custom/V8DataViewCustom.cpp
Source/WebCore/bindings/v8/custom/V8DocumentCustom.cpp
Source/WebCore/bindings/v8/custom/V8EntryCustom.cpp
Source/WebCore/bindings/v8/custom/V8EntrySyncCustom.cpp
Source/WebCore/bindings/v8/custom/V8EventCustom.cpp
Source/WebCore/bindings/v8/custom/V8Float32ArrayCustom.cpp
Source/WebCore/bindings/v8/custom/V8Float64ArrayCustom.cpp
Source/WebCore/bindings/v8/custom/V8HTMLCollectionCustom.cpp
Source/WebCore/bindings/v8/custom/V8HTMLDocumentCustom.cpp
Source/WebCore/bindings/v8/custom/V8HTMLElementCustom.cpp
Source/WebCore/bindings/v8/custom/V8IDBAnyCustom.cpp
Source/WebCore/bindings/v8/custom/V8IDBKeyCustom.cpp
Source/WebCore/bindings/v8/custom/V8ImageDataCustom.cpp
Source/WebCore/bindings/v8/custom/V8Int16ArrayCustom.cpp
Source/WebCore/bindings/v8/custom/V8Int32ArrayCustom.cpp
Source/WebCore/bindings/v8/custom/V8Int8ArrayCustom.cpp
Source/WebCore/bindings/v8/custom/V8LocationCustom.cpp
Source/WebCore/bindings/v8/custom/V8NamedNodeMapCustom.cpp
Source/WebCore/bindings/v8/custom/V8NodeCustom.cpp
Source/WebCore/bindings/v8/custom/V8SVGDocumentCustom.cpp
Source/WebCore/bindings/v8/custom/V8SVGElementCustom.cpp
Source/WebCore/bindings/v8/custom/V8SVGPathSegCustom.cpp
Source/WebCore/bindings/v8/custom/V8ScriptProfileCustom.cpp
Source/WebCore/bindings/v8/custom/V8ScriptProfileNodeCustom.cpp
Source/WebCore/bindings/v8/custom/V8StyleSheetCustom.cpp
Source/WebCore/bindings/v8/custom/V8Uint16ArrayCustom.cpp
Source/WebCore/bindings/v8/custom/V8Uint32ArrayCustom.cpp
Source/WebCore/bindings/v8/custom/V8Uint8ArrayCustom.cpp
Source/WebCore/bindings/v8/custom/V8Uint8ClampedArrayCustom.cpp
Source/WebCore/bindings/v8/custom/V8WorkerContextCustom.cpp

index 60f8617..68c9de9 100644 (file)
@@ -1,3 +1,123 @@
+2012-04-17  Kentaro Hara  <haraken@chromium.org>
+
+        [V8] Add an optional Isolate argument to toV8().
+        https://bugs.webkit.org/show_bug.cgi?id=84161
+
+        Reviewed by Nate Chapin.
+
+        The final objective is to pass Isolate around in V8 bindings.
+        This patch adds an optional Isolate argument to toV8().
+        After rewriting all toV8() callers so that they pass Isolate,
+        I will make the Isolate argument non-optional.
+
+        No tests. No change in behavior.
+
+        * bindings/scripts/CodeGeneratorV8.pm:
+        Modified as described above.
+        (GenerateHeader):
+        (NativeToJSValue):
+        * bindings/v8/custom/V8BlobCustom.cpp:
+        (WebCore::toV8):
+        * bindings/v8/custom/V8CSSRuleCustom.cpp:
+        (WebCore::toV8):
+        * bindings/v8/custom/V8CSSStyleSheetCustom.cpp:
+        (WebCore::toV8):
+        * bindings/v8/custom/V8CSSValueCustom.cpp:
+        (WebCore::toV8):
+        * bindings/v8/custom/V8CanvasPixelArrayCustom.cpp:
+        (WebCore::toV8):
+        * bindings/v8/custom/V8DOMStringMapCustom.cpp:
+        (WebCore::toV8):
+        * bindings/v8/custom/V8DOMTokenListCustom.cpp:
+        (WebCore::toV8):
+        * bindings/v8/custom/V8DOMWindowCustom.cpp:
+        (WebCore::toV8):
+        * bindings/v8/custom/V8DataViewCustom.cpp:
+        (WebCore::toV8):
+        * bindings/v8/custom/V8DocumentCustom.cpp:
+        (WebCore::toV8):
+        * bindings/v8/custom/V8EntryCustom.cpp:
+        (WebCore::toV8):
+        * bindings/v8/custom/V8EntrySyncCustom.cpp:
+        (WebCore::toV8):
+        * bindings/v8/custom/V8EventCustom.cpp:
+        (WebCore::toV8):
+        * bindings/v8/custom/V8Float32ArrayCustom.cpp:
+        (WebCore::toV8):
+        * bindings/v8/custom/V8Float64ArrayCustom.cpp:
+        (WebCore::toV8):
+        * bindings/v8/custom/V8HTMLCollectionCustom.cpp:
+        (WebCore::toV8):
+        * bindings/v8/custom/V8HTMLDocumentCustom.cpp:
+        (WebCore::toV8):
+        * bindings/v8/custom/V8HTMLElementCustom.cpp:
+        (WebCore::toV8):
+        * bindings/v8/custom/V8IDBAnyCustom.cpp:
+        (WebCore::toV8):
+        * bindings/v8/custom/V8IDBKeyCustom.cpp:
+        (WebCore::toV8):
+        * bindings/v8/custom/V8ImageDataCustom.cpp:
+        (WebCore::toV8):
+        * bindings/v8/custom/V8Int16ArrayCustom.cpp:
+        (WebCore::toV8):
+        * bindings/v8/custom/V8Int32ArrayCustom.cpp:
+        (WebCore::toV8):
+        * bindings/v8/custom/V8Int8ArrayCustom.cpp:
+        (WebCore::toV8):
+        * bindings/v8/custom/V8LocationCustom.cpp:
+        (WebCore::toV8):
+        * bindings/v8/custom/V8NamedNodeMapCustom.cpp:
+        (WebCore::toV8):
+        * bindings/v8/custom/V8NodeCustom.cpp:
+        (WebCore::toV8Slow):
+        * bindings/v8/custom/V8SVGDocumentCustom.cpp:
+        (WebCore::toV8):
+        * bindings/v8/custom/V8SVGElementCustom.cpp:
+        (WebCore::toV8):
+        * bindings/v8/custom/V8SVGPathSegCustom.cpp:
+        (WebCore::toV8):
+        * bindings/v8/custom/V8ScriptProfileCustom.cpp:
+        (WebCore::toV8):
+        * bindings/v8/custom/V8ScriptProfileNodeCustom.cpp:
+        (WebCore::toV8):
+        * bindings/v8/custom/V8StyleSheetCustom.cpp:
+        (WebCore::toV8):
+        * bindings/v8/custom/V8Uint16ArrayCustom.cpp:
+        (WebCore::toV8):
+        * bindings/v8/custom/V8Uint32ArrayCustom.cpp:
+        (WebCore::toV8):
+        * bindings/v8/custom/V8Uint8ArrayCustom.cpp:
+        (WebCore::toV8):
+        * bindings/v8/custom/V8Uint8ClampedArrayCustom.cpp:
+        (WebCore::toV8):
+        * bindings/v8/custom/V8WorkerContextCustom.cpp:
+        (WebCore::toV8):
+
+        * bindings/scripts/test/V8/V8Float64Array.h:
+        Updated run-bindings-tests results.
+        (WebCore):
+        (WebCore::toV8):
+        * bindings/scripts/test/V8/V8TestActiveDOMObject.h:
+        (WebCore::toV8):
+        * bindings/scripts/test/V8/V8TestCustomNamedGetter.h:
+        (WebCore::toV8):
+        * bindings/scripts/test/V8/V8TestEventConstructor.h:
+        (WebCore::toV8):
+        * bindings/scripts/test/V8/V8TestEventTarget.h:
+        (WebCore::toV8):
+        * bindings/scripts/test/V8/V8TestInterface.h:
+        (WebCore::toV8):
+        * bindings/scripts/test/V8/V8TestMediaQueryListListener.h:
+        (WebCore::toV8):
+        * bindings/scripts/test/V8/V8TestNamedConstructor.h:
+        (WebCore::toV8):
+        * bindings/scripts/test/V8/V8TestNode.h:
+        (WebCore::toV8):
+        * bindings/scripts/test/V8/V8TestObj.h:
+        (WebCore::toV8):
+        * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h:
+        (WebCore::toV8):
+
 2012-04-23  Michał Pakuła vel Rutka  <m.pakula@samsung.com>
         [EFL][WK2] Fix build break when non-cross platform CONTEXT_MENUS are enabled.
         https://bugs.webkit.org/show_bug.cgi?id=84136
index 4e768d0..7027d8e 100644 (file)
@@ -441,7 +441,7 @@ END
     } elsif (!($dataNode->extendedAttributes->{"CustomToJSObject"} or $dataNode->extendedAttributes->{"V8CustomToJSObject"})) {
         push(@headerContent, <<END);
 
-inline v8::Handle<v8::Value> toV8(${nativeType}* impl${forceNewObjectParameter})
+inline v8::Handle<v8::Value> toV8(${nativeType}* impl, v8::Isolate* isolate = 0${forceNewObjectParameter})
 {
     if (!impl)
         return v8::Null();
@@ -451,14 +451,14 @@ END
     } elsif ($interfaceName ne 'Node') {
         push(@headerContent, <<END);
 
-v8::Handle<v8::Value> toV8(${nativeType}*${forceNewObjectParameter});
+v8::Handle<v8::Value> toV8(${nativeType}*, v8::Isolate* isolate = 0${forceNewObjectParameter});
 END
     } else {
         push(@headerContent, <<END);
 
 v8::Handle<v8::Value> toV8Slow(Node*, bool);
 
-inline v8::Handle<v8::Value> toV8(Node* impl, bool forceNewObject = false)
+inline v8::Handle<v8::Value> toV8(Node* impl, v8::Isolate* isolate = 0, bool forceNewObject = false)
 {
     if (UNLIKELY(!impl))
         return v8::Null();
@@ -473,9 +473,9 @@ END
     }
 
     push(@headerContent, <<END);
-inline v8::Handle<v8::Value> toV8(PassRefPtr< ${nativeType} > impl${forceNewObjectParameter})
+inline v8::Handle<v8::Value> toV8(PassRefPtr< ${nativeType} > impl, v8::Isolate* isolate = 0${forceNewObjectParameter})
 {
-    return toV8(impl.get()${forceNewObjectCall});
+    return toV8(impl.get(), isolate${forceNewObjectCall});
 }
 END
 
@@ -3813,7 +3813,7 @@ sub NativeToJSValue
 
     # special case for non-DOM node interfaces
     if (IsDOMNodeType($type)) {
-        return "toV8(${value}" . ($signature->extendedAttributes->{"ReturnNewObject"} ? ", true)" : ")");
+        return "toV8(${value}" . ($signature->extendedAttributes->{"ReturnNewObject"} ? ", 0, true)" : ")");
     }
 
     if ($type eq "EventTarget") {
index 11e46a4..18b22dd 100644 (file)
@@ -58,10 +58,10 @@ v8::Handle<v8::Object> V8Float64Array::wrap(Float64Array* impl)
     return V8Float64Array::wrapSlow(impl);
 }
 
-v8::Handle<v8::Value> toV8(Float64Array*);
-inline v8::Handle<v8::Value> toV8(PassRefPtr< Float64Array > impl)
+v8::Handle<v8::Value> toV8(Float64Array*, v8::Isolate* isolate = 0);
+inline v8::Handle<v8::Value> toV8(PassRefPtr< Float64Array > impl, v8::Isolate* isolate = 0)
 {
-    return toV8(impl.get());
+    return toV8(impl.get(), isolate);
 }
 
 }
index 1fe8c51..1d8c06e 100644 (file)
@@ -58,15 +58,15 @@ v8::Handle<v8::Object> V8TestActiveDOMObject::wrap(TestActiveDOMObject* impl)
     return V8TestActiveDOMObject::wrapSlow(impl);
 }
 
-inline v8::Handle<v8::Value> toV8(TestActiveDOMObject* impl)
+inline v8::Handle<v8::Value> toV8(TestActiveDOMObject* impl, v8::Isolate* isolate = 0)
 {
     if (!impl)
         return v8::Null();
     return V8TestActiveDOMObject::wrap(impl);
 }
-inline v8::Handle<v8::Value> toV8(PassRefPtr< TestActiveDOMObject > impl)
+inline v8::Handle<v8::Value> toV8(PassRefPtr< TestActiveDOMObject > impl, v8::Isolate* isolate = 0)
 {
-    return toV8(impl.get());
+    return toV8(impl.get(), isolate);
 }
 
 }
index f80c4d2..3c43647 100644 (file)
@@ -57,15 +57,15 @@ v8::Handle<v8::Object> V8TestCustomNamedGetter::wrap(TestCustomNamedGetter* impl
     return V8TestCustomNamedGetter::wrapSlow(impl);
 }
 
-inline v8::Handle<v8::Value> toV8(TestCustomNamedGetter* impl)
+inline v8::Handle<v8::Value> toV8(TestCustomNamedGetter* impl, v8::Isolate* isolate = 0)
 {
     if (!impl)
         return v8::Null();
     return V8TestCustomNamedGetter::wrap(impl);
 }
-inline v8::Handle<v8::Value> toV8(PassRefPtr< TestCustomNamedGetter > impl)
+inline v8::Handle<v8::Value> toV8(PassRefPtr< TestCustomNamedGetter > impl, v8::Isolate* isolate = 0)
 {
-    return toV8(impl.get());
+    return toV8(impl.get(), isolate);
 }
 
 }
index 939034b..d30528f 100644 (file)
@@ -58,15 +58,15 @@ v8::Handle<v8::Object> V8TestEventConstructor::wrap(TestEventConstructor* impl)
     return V8TestEventConstructor::wrapSlow(impl);
 }
 
-inline v8::Handle<v8::Value> toV8(TestEventConstructor* impl)
+inline v8::Handle<v8::Value> toV8(TestEventConstructor* impl, v8::Isolate* isolate = 0)
 {
     if (!impl)
         return v8::Null();
     return V8TestEventConstructor::wrap(impl);
 }
-inline v8::Handle<v8::Value> toV8(PassRefPtr< TestEventConstructor > impl)
+inline v8::Handle<v8::Value> toV8(PassRefPtr< TestEventConstructor > impl, v8::Isolate* isolate = 0)
 {
-    return toV8(impl.get());
+    return toV8(impl.get(), isolate);
 }
 
 bool fillTestEventConstructorInit(TestEventConstructorInit&, const Dictionary&);
index 5dc50fb..644ed4c 100644 (file)
@@ -59,15 +59,15 @@ v8::Handle<v8::Object> V8TestEventTarget::wrap(TestEventTarget* impl)
     return V8TestEventTarget::wrapSlow(impl);
 }
 
-inline v8::Handle<v8::Value> toV8(TestEventTarget* impl)
+inline v8::Handle<v8::Value> toV8(TestEventTarget* impl, v8::Isolate* isolate = 0)
 {
     if (!impl)
         return v8::Null();
     return V8TestEventTarget::wrap(impl);
 }
-inline v8::Handle<v8::Value> toV8(PassRefPtr< TestEventTarget > impl)
+inline v8::Handle<v8::Value> toV8(PassRefPtr< TestEventTarget > impl, v8::Isolate* isolate = 0)
 {
-    return toV8(impl.get());
+    return toV8(impl.get(), isolate);
 }
 
 }
index 9b0d845..ca0c713 100644 (file)
@@ -61,15 +61,15 @@ v8::Handle<v8::Object> V8TestInterface::wrap(TestInterface* impl)
     return V8TestInterface::wrapSlow(impl);
 }
 
-inline v8::Handle<v8::Value> toV8(TestInterface* impl)
+inline v8::Handle<v8::Value> toV8(TestInterface* impl, v8::Isolate* isolate = 0)
 {
     if (!impl)
         return v8::Null();
     return V8TestInterface::wrap(impl);
 }
-inline v8::Handle<v8::Value> toV8(PassRefPtr< TestInterface > impl)
+inline v8::Handle<v8::Value> toV8(PassRefPtr< TestInterface > impl, v8::Isolate* isolate = 0)
 {
-    return toV8(impl.get());
+    return toV8(impl.get(), isolate);
 }
 
 }
index 3402b37..f6f3c41 100644 (file)
@@ -56,15 +56,15 @@ v8::Handle<v8::Object> V8TestMediaQueryListListener::wrap(TestMediaQueryListList
     return V8TestMediaQueryListListener::wrapSlow(impl);
 }
 
-inline v8::Handle<v8::Value> toV8(TestMediaQueryListListener* impl)
+inline v8::Handle<v8::Value> toV8(TestMediaQueryListListener* impl, v8::Isolate* isolate = 0)
 {
     if (!impl)
         return v8::Null();
     return V8TestMediaQueryListListener::wrap(impl);
 }
-inline v8::Handle<v8::Value> toV8(PassRefPtr< TestMediaQueryListListener > impl)
+inline v8::Handle<v8::Value> toV8(PassRefPtr< TestMediaQueryListListener > impl, v8::Isolate* isolate = 0)
 {
-    return toV8(impl.get());
+    return toV8(impl.get(), isolate);
 }
 
 }
index a2f5f03..5703e39 100644 (file)
@@ -63,15 +63,15 @@ v8::Handle<v8::Object> V8TestNamedConstructor::wrap(TestNamedConstructor* impl)
     return V8TestNamedConstructor::wrapSlow(impl);
 }
 
-inline v8::Handle<v8::Value> toV8(TestNamedConstructor* impl)
+inline v8::Handle<v8::Value> toV8(TestNamedConstructor* impl, v8::Isolate* isolate = 0)
 {
     if (!impl)
         return v8::Null();
     return V8TestNamedConstructor::wrap(impl);
 }
-inline v8::Handle<v8::Value> toV8(PassRefPtr< TestNamedConstructor > impl)
+inline v8::Handle<v8::Value> toV8(PassRefPtr< TestNamedConstructor > impl, v8::Isolate* isolate = 0)
 {
-    return toV8(impl.get());
+    return toV8(impl.get(), isolate);
 }
 
 }
index 4802b07..f141b28 100644 (file)
@@ -57,15 +57,15 @@ v8::Handle<v8::Object> V8TestNode::wrap(TestNode* impl)
     return V8TestNode::wrapSlow(impl);
 }
 
-inline v8::Handle<v8::Value> toV8(TestNode* impl)
+inline v8::Handle<v8::Value> toV8(TestNode* impl, v8::Isolate* isolate = 0)
 {
     if (!impl)
         return v8::Null();
     return V8TestNode::wrap(impl);
 }
-inline v8::Handle<v8::Value> toV8(PassRefPtr< TestNode > impl)
+inline v8::Handle<v8::Value> toV8(PassRefPtr< TestNode > impl, v8::Isolate* isolate = 0)
 {
-    return toV8(impl.get());
+    return toV8(impl.get(), isolate);
 }
 
 }
index 529c581..f92e318 100644 (file)
@@ -62,15 +62,15 @@ v8::Handle<v8::Object> V8TestObj::wrap(TestObj* impl)
     return V8TestObj::wrapSlow(impl);
 }
 
-inline v8::Handle<v8::Value> toV8(TestObj* impl)
+inline v8::Handle<v8::Value> toV8(TestObj* impl, v8::Isolate* isolate = 0)
 {
     if (!impl)
         return v8::Null();
     return V8TestObj::wrap(impl);
 }
-inline v8::Handle<v8::Value> toV8(PassRefPtr< TestObj > impl)
+inline v8::Handle<v8::Value> toV8(PassRefPtr< TestObj > impl, v8::Isolate* isolate = 0)
 {
-    return toV8(impl.get());
+    return toV8(impl.get(), isolate);
 }
 
 }
index 86a55f8..ab98365 100644 (file)
@@ -59,15 +59,15 @@ v8::Handle<v8::Object> V8TestSerializedScriptValueInterface::wrap(TestSerialized
     return V8TestSerializedScriptValueInterface::wrapSlow(impl);
 }
 
-inline v8::Handle<v8::Value> toV8(TestSerializedScriptValueInterface* impl)
+inline v8::Handle<v8::Value> toV8(TestSerializedScriptValueInterface* impl, v8::Isolate* isolate = 0)
 {
     if (!impl)
         return v8::Null();
     return V8TestSerializedScriptValueInterface::wrap(impl);
 }
-inline v8::Handle<v8::Value> toV8(PassRefPtr< TestSerializedScriptValueInterface > impl)
+inline v8::Handle<v8::Value> toV8(PassRefPtr< TestSerializedScriptValueInterface > impl, v8::Isolate* isolate = 0)
 {
-    return toV8(impl.get());
+    return toV8(impl.get(), isolate);
 }
 
 }
index 6853578..488bff3 100644 (file)
@@ -38,7 +38,7 @@
 
 namespace WebCore {
 
-v8::Handle<v8::Value> toV8(Blob* impl)
+v8::Handle<v8::Value> toV8(Blob* impl, v8::Isolate* isolate)
 {
     if (!impl)
         return v8::Null();
index ab6768c..4856b6d 100644 (file)
@@ -43,7 +43,7 @@
 
 namespace WebCore {
 
-v8::Handle<v8::Value> toV8(CSSRule* impl)
+v8::Handle<v8::Value> toV8(CSSRule* impl, v8::Isolate* isolate)
 {
     if (!impl)
         return v8::Null();
index 9b2988b..ae02309 100644 (file)
@@ -36,7 +36,7 @@
 
 namespace WebCore {
 
-v8::Handle<v8::Value> toV8(CSSStyleSheet* impl)
+v8::Handle<v8::Value> toV8(CSSStyleSheet* impl, v8::Isolate* isolate)
 {
     if (!impl)
         return v8::Null();
index 601a62a..f0693c2 100644 (file)
@@ -42,7 +42,7 @@
 
 namespace WebCore {
 
-v8::Handle<v8::Value> toV8(CSSValue* impl)
+v8::Handle<v8::Value> toV8(CSSValue* impl, v8::Isolate* isolate)
 {
     if (!impl)
         return v8::Null();
index 91e39b7..a7979b2 100644 (file)
@@ -33,7 +33,7 @@
 
 namespace WebCore {
 
-v8::Handle<v8::Value> toV8(CanvasPixelArray* impl)
+v8::Handle<v8::Value> toV8(CanvasPixelArray* impl, v8::Isolate* isolate)
 {
     if (!impl)
         return v8::Null();
index ddf22a7..f2a291a 100644 (file)
@@ -84,7 +84,7 @@ v8::Handle<v8::Value> V8DOMStringMap::namedPropertySetter(v8::Local<v8::String>
     return value;
 }
 
-v8::Handle<v8::Value> toV8(DOMStringMap* impl)
+v8::Handle<v8::Value> toV8(DOMStringMap* impl, v8::Isolate* isolate)
 {
     if (!impl)
         return v8::Null();
index a23da48..cf20c12 100644 (file)
@@ -38,7 +38,7 @@
 
 namespace WebCore {
 
-v8::Handle<v8::Value> toV8(DOMTokenList* impl)
+v8::Handle<v8::Value> toV8(DOMTokenList* impl, v8::Isolate* isolate)
 {
     if (!impl)
         return v8::Null();
index dfc30e9..eb65c5e 100644 (file)
@@ -598,7 +598,7 @@ bool V8DOMWindow::indexedSecurityCheck(v8::Local<v8::Object> host, uint32_t inde
     return V8BindingSecurity::canAccessFrame(V8BindingState::Only(), target, false);
 }
 
-v8::Handle<v8::Value> toV8(DOMWindow* window)
+v8::Handle<v8::Value> toV8(DOMWindow* window, v8::Isolate* isolate)
 {
     if (!window)
         return v8::Null();
index 9203fed..b5f8022 100755 (executable)
@@ -56,7 +56,7 @@ v8::Handle<v8::Value> V8DataView::constructorCallback(const v8::Arguments& args)
     return constructWebGLArrayWithArrayBufferArgument<DataView, char>(args, &info, v8::kExternalByteArray, false);
 }
 
-v8::Handle<v8::Value> toV8(DataView* impl)
+v8::Handle<v8::Value> toV8(DataView* impl, v8::Isolate* isolate)
 {
     if (!impl)
         return v8::Null();
index e6ba75b..57bd224 100644 (file)
@@ -116,15 +116,15 @@ v8::Handle<v8::Value> V8Document::getCSSCanvasContextCallback(const v8::Argument
     return v8::Undefined();
 }
 
-v8::Handle<v8::Value> toV8(Document* impl, bool forceNewObject)
+v8::Handle<v8::Value> toV8(Document* impl, v8::Isolate* isolate, bool forceNewObject)
 {
     if (!impl)
         return v8::Null();
     if (impl->isHTMLDocument())
-        return toV8(static_cast<HTMLDocument*>(impl), forceNewObject);
+        return toV8(static_cast<HTMLDocument*>(impl), isolate, forceNewObject);
 #if ENABLE(SVG)
     if (impl->isSVGDocument())
-        return toV8(static_cast<SVGDocument*>(impl), forceNewObject);
+        return toV8(static_cast<SVGDocument*>(impl), isolate, forceNewObject);
 #endif
     v8::Handle<v8::Object> wrapper = V8Document::wrap(impl, forceNewObject);
     if (wrapper.IsEmpty())
index c02cd6f..5519e74 100644 (file)
@@ -44,7 +44,7 @@
 
 namespace WebCore {
 
-v8::Handle<v8::Value> toV8(Entry* impl)
+v8::Handle<v8::Value> toV8(Entry* impl, v8::Isolate* isolate)
 {
     if (!impl)
         return v8::Null();
index e98df19..8cbfcf5 100644 (file)
@@ -44,7 +44,7 @@
 
 namespace WebCore {
 
-v8::Handle<v8::Value> toV8(EntrySync* impl)
+v8::Handle<v8::Value> toV8(EntrySync* impl, v8::Isolate* isolate)
 {
     if (!impl)
         return v8::Null();
index 48939cf..52eddb7 100644 (file)
@@ -73,7 +73,7 @@ v8::Handle<v8::Value> V8Event::clipboardDataAccessorGetter(v8::Local<v8::String>
     if (eventNames().interfaceFor##interfaceName == desiredInterface) \
         return toV8(static_cast<interfaceName*>(event));
 
-v8::Handle<v8::Value> toV8(Event* event)
+v8::Handle<v8::Value> toV8(Event* event, v8::Isolate *isolate)
 {
     if (!event)
         return v8::Null();
index 2ca590a..e9a4fa6 100644 (file)
@@ -54,7 +54,7 @@ v8::Handle<v8::Value> V8Float32Array::setCallback(const v8::Arguments& args)
     return setWebGLArrayHelper<Float32Array, V8Float32Array>(args);
 }
 
-v8::Handle<v8::Value> toV8(Float32Array* impl)
+v8::Handle<v8::Value> toV8(Float32Array* impl, v8::Isolate* isolate)
 {
     if (!impl)
         return v8::Null();
index 092522a..7e253bc 100644 (file)
@@ -49,7 +49,7 @@ v8::Handle<v8::Value> V8Float64Array::setCallback(const v8::Arguments& args)
     return setWebGLArrayHelper<Float64Array, V8Float64Array>(args);
 }
 
-v8::Handle<v8::Value> toV8(Float64Array* impl)
+v8::Handle<v8::Value> toV8(Float64Array* impl, v8::Isolate* isolate)
 {
     if (!impl)
         return v8::Null();
index dda51d4..2e2255c 100644 (file)
@@ -80,7 +80,7 @@ v8::Handle<v8::Value> V8HTMLCollection::namedItemCallback(const v8::Arguments& a
     return result;
 }
 
-v8::Handle<v8::Value> toV8(HTMLCollection* impl)
+v8::Handle<v8::Value> toV8(HTMLCollection* impl, v8::Isolate* isolate)
 {
     if (impl->type() == DocAll)
         return toV8(static_cast<HTMLAllCollection*>(impl));
index 4cf1bca..81c46c7 100644 (file)
@@ -186,7 +186,7 @@ void V8HTMLDocument::allAccessorSetter(v8::Local<v8::String> name, v8::Local<v8:
     info.This()->ForceSet(name, value);
 }
 
-v8::Handle<v8::Value> toV8(HTMLDocument* impl, bool forceNewObject)
+v8::Handle<v8::Value> toV8(HTMLDocument* impl, v8::Isolate* isolate, bool forceNewObject)
 {
     if (!impl)
         return v8::Null();
index 1ca6bd3..ffebda3 100644 (file)
@@ -53,7 +53,7 @@ static v8::Handle<v8::Value> toV8Object(MicroDataItemValue* itemValue)
 }
 #endif
 
-v8::Handle<v8::Value> toV8(HTMLElement* impl, bool forceNewObject)
+v8::Handle<v8::Value> toV8(HTMLElement* impl, v8::Isolate* isolate, bool forceNewObject)
 {
     if (!impl)
         return v8::Null();
index e4831ad..75edd48 100644 (file)
@@ -44,7 +44,7 @@
 
 namespace WebCore {
 
-v8::Handle<v8::Value> toV8(IDBAny* impl)
+v8::Handle<v8::Value> toV8(IDBAny* impl, v8::Isolate* isolate)
 {
     if (!impl)
         return v8::Null();
index 0fbfe1b..9b0e654 100644 (file)
@@ -38,7 +38,7 @@
 
 namespace WebCore {
 
-v8::Handle<v8::Value> toV8(IDBKey* key)
+v8::Handle<v8::Value> toV8(IDBKey* key, v8::Isolate* isolate)
 {
     if (!key)
         return v8::Null();
@@ -58,7 +58,7 @@ v8::Handle<v8::Value> toV8(IDBKey* key)
         {
             v8::Local<v8::Array> array = v8::Array::New(key->array().size());
             for (size_t i = 0; i < key->array().size(); ++i)
-                array->Set(i, toV8(key->array()[i].get()));
+                array->Set(i, toV8(key->array()[i].get(), isolate));
             return array;
         }
     }
index b4549e4..337a5bf 100644 (file)
@@ -35,7 +35,7 @@
 
 namespace WebCore {
 
-v8::Handle<v8::Value> toV8(ImageData* impl)
+v8::Handle<v8::Value> toV8(ImageData* impl, v8::Isolate* isolate)
 {
     if (!impl)
         return v8::Null();
index 70d5384..1eee98d 100644 (file)
@@ -53,7 +53,7 @@ v8::Handle<v8::Value> V8Int16Array::setCallback(const v8::Arguments& args)
     return setWebGLArrayHelper<Int16Array, V8Int16Array>(args);
 }
 
-v8::Handle<v8::Value> toV8(Int16Array* impl)
+v8::Handle<v8::Value> toV8(Int16Array* impl, v8::Isolate* isolate)
 {
     if (!impl)
         return v8::Null();
index 0e0125f..6767a22 100644 (file)
@@ -53,7 +53,7 @@ v8::Handle<v8::Value> V8Int32Array::setCallback(const v8::Arguments& args)
     return setWebGLArrayHelper<Int32Array, V8Int32Array>(args);
 }
 
-v8::Handle<v8::Value> toV8(Int32Array* impl)
+v8::Handle<v8::Value> toV8(Int32Array* impl, v8::Isolate* isolate)
 {
     if (!impl)
         return v8::Null();
index 65d6ea7..1373008 100644 (file)
@@ -53,7 +53,7 @@ v8::Handle<v8::Value> V8Int8Array::setCallback(const v8::Arguments& args)
     return setWebGLArrayHelper<Int8Array, V8Int8Array>(args);
 }
 
-v8::Handle<v8::Value> toV8(Int8Array* impl)
+v8::Handle<v8::Value> toV8(Int8Array* impl, v8::Isolate* isolate)
 {
     if (!impl)
         return v8::Null();
index 7db74e8..50eca03 100644 (file)
@@ -272,7 +272,7 @@ bool V8Location::namedSecurityCheck(v8::Local<v8::Object> host, v8::Local<v8::Va
     return V8BindingSecurity::canAccessFrame(V8BindingState::Only(), imp->frame(), false);
 }
 
-v8::Handle<v8::Value> toV8(Location* impl)
+v8::Handle<v8::Value> toV8(Location* impl, v8::Isolate* isolate)
 {
     if (!impl)
         return v8::Null();
index f303128..e171196 100644 (file)
@@ -71,7 +71,7 @@ v8::Handle<v8::Value> V8NamedNodeMap::namedPropertyGetter(v8::Local<v8::String>
     return toV8(result.release());
 }
 
-v8::Handle<v8::Value> toV8(NamedNodeMap* impl)
+v8::Handle<v8::Value> toV8(NamedNodeMap* impl, v8::Isolate* isolate)
 {
     if (!impl)
         return v8::Null();
index d6f4bbe..1b89b3a 100644 (file)
@@ -149,34 +149,34 @@ v8::Handle<v8::Value> toV8Slow(Node* impl, bool forceNewObject)
     switch (impl->nodeType()) {
     case Node::ELEMENT_NODE:
         if (impl->isHTMLElement())
-            return toV8(toHTMLElement(impl), forceNewObject);
+            return toV8(toHTMLElement(impl), 0, forceNewObject);
 #if ENABLE(SVG)
         if (impl->isSVGElement())
-            return toV8(static_cast<SVGElement*>(impl), forceNewObject);
+            return toV8(static_cast<SVGElement*>(impl), 0, forceNewObject);
 #endif
         return V8Element::wrap(static_cast<Element*>(impl), forceNewObject);
     case Node::ATTRIBUTE_NODE:
-        return toV8(static_cast<Attr*>(impl), forceNewObject);
+        return toV8(static_cast<Attr*>(impl), 0, forceNewObject);
     case Node::TEXT_NODE:
-        return toV8(toText(impl), forceNewObject);
+        return toV8(toText(impl), 0, forceNewObject);
     case Node::CDATA_SECTION_NODE:
-        return toV8(static_cast<CDATASection*>(impl), forceNewObject);
+        return toV8(static_cast<CDATASection*>(impl), 0, forceNewObject);
     case Node::ENTITY_REFERENCE_NODE:
-        return toV8(static_cast<EntityReference*>(impl), forceNewObject);
+        return toV8(static_cast<EntityReference*>(impl), 0, forceNewObject);
     case Node::ENTITY_NODE:
-        return toV8(static_cast<Entity*>(impl), forceNewObject);
+        return toV8(static_cast<Entity*>(impl), 0, forceNewObject);
     case Node::PROCESSING_INSTRUCTION_NODE:
-        return toV8(static_cast<ProcessingInstruction*>(impl), forceNewObject);
+        return toV8(static_cast<ProcessingInstruction*>(impl), 0, forceNewObject);
     case Node::COMMENT_NODE:
-        return toV8(static_cast<Comment*>(impl), forceNewObject);
+        return toV8(static_cast<Comment*>(impl), 0, forceNewObject);
     case Node::DOCUMENT_NODE:
-        return toV8(static_cast<Document*>(impl), forceNewObject);
+        return toV8(static_cast<Document*>(impl), 0, forceNewObject);
     case Node::DOCUMENT_TYPE_NODE:
-        return toV8(static_cast<DocumentType*>(impl), forceNewObject);
+        return toV8(static_cast<DocumentType*>(impl), 0, forceNewObject);
     case Node::DOCUMENT_FRAGMENT_NODE:
-        return toV8(static_cast<DocumentFragment*>(impl), forceNewObject);
+        return toV8(static_cast<DocumentFragment*>(impl), 0, forceNewObject);
     case Node::NOTATION_NODE:
-        return toV8(static_cast<Notation*>(impl), forceNewObject);
+        return toV8(static_cast<Notation*>(impl), 0, forceNewObject);
     default: break; // XPATH_NAMESPACE_NODE
     }
     return V8Node::wrap(impl, forceNewObject);
index 8dce61b..1c5ba85 100644 (file)
@@ -38,7 +38,7 @@
 
 namespace WebCore {
 
-v8::Handle<v8::Value> toV8(SVGDocument* impl, bool forceNewObject)
+v8::Handle<v8::Value> toV8(SVGDocument* impl, v8::Isolate* isolate, bool forceNewObject)
 {
     if (!impl)
         return v8::Null();
index 7ad5f41..fcce45a 100644 (file)
@@ -37,7 +37,7 @@
 
 namespace WebCore {
 
-v8::Handle<v8::Value> toV8(SVGElement* impl, bool forceNewObject)
+v8::Handle<v8::Value> toV8(SVGElement* impl, v8::Isolate* isolate, bool forceNewObject)
 {
     if (!impl)
         return v8::Null();
index 5544f83..bc7d9fd 100644 (file)
@@ -57,7 +57,7 @@
 
 namespace WebCore {
 
-v8::Handle<v8::Value> toV8(SVGPathSeg* impl)
+v8::Handle<v8::Value> toV8(SVGPathSeg* impl, v8::Isolate* isolate)
 {
     if (!impl)
         return v8::Null();
index 6421855..7bab46b 100644 (file)
@@ -41,7 +41,7 @@
 
 namespace WebCore {
 
-v8::Handle<v8::Value> toV8(ScriptProfile* impl)
+v8::Handle<v8::Value> toV8(ScriptProfile* impl, v8::Isolate* isolate)
 {
     if (!impl)
         return v8::Null();
index 78d9210..3ee8f8f 100644 (file)
@@ -48,7 +48,7 @@ v8::Handle<v8::Value> V8ScriptProfileNode::callUIDAccessorGetter(v8::Local<v8::S
     return v8::Number::New(imp->callUID());
 }
 
-v8::Handle<v8::Value> toV8(ScriptProfileNode* impl)
+v8::Handle<v8::Value> toV8(ScriptProfileNode* impl, v8::Isolate* isolate)
 {
     if (!impl)
         return v8::Null();
index 0fe6af8..edc7e09 100644 (file)
@@ -37,7 +37,7 @@
 
 namespace WebCore {
 
-v8::Handle<v8::Value> toV8(StyleSheet* impl)
+v8::Handle<v8::Value> toV8(StyleSheet* impl, v8::Isolate* isolate)
 {
     if (!impl)
         return v8::Null();
index d42c91c..7aa875f 100644 (file)
@@ -53,7 +53,7 @@ v8::Handle<v8::Value> V8Uint16Array::setCallback(const v8::Arguments& args)
     return setWebGLArrayHelper<Uint16Array, V8Uint16Array>(args);
 }
 
-v8::Handle<v8::Value> toV8(Uint16Array* impl)
+v8::Handle<v8::Value> toV8(Uint16Array* impl, v8::Isolate* isolate)
 {
     if (!impl)
         return v8::Null();
index 24cf18a..8c9edf9 100644 (file)
@@ -53,7 +53,7 @@ v8::Handle<v8::Value> V8Uint32Array::setCallback(const v8::Arguments& args)
     return setWebGLArrayHelper<Uint32Array, V8Uint32Array>(args);
 }
 
-v8::Handle<v8::Value> toV8(Uint32Array* impl)
+v8::Handle<v8::Value> toV8(Uint32Array* impl, v8::Isolate* isolate)
 {
     if (!impl)
         return v8::Null();
index f7dc836..f1902be 100644 (file)
@@ -53,7 +53,7 @@ v8::Handle<v8::Value> V8Uint8Array::setCallback(const v8::Arguments& args)
     return setWebGLArrayHelper<Uint8Array, V8Uint8Array>(args);
 }
 
-v8::Handle<v8::Value> toV8(Uint8Array* impl)
+v8::Handle<v8::Value> toV8(Uint8Array* impl, v8::Isolate* isolate)
 {
     if (!impl)
         return v8::Null();
index f3a069a..04918ce 100644 (file)
@@ -50,7 +50,7 @@ v8::Handle<v8::Value> V8Uint8ClampedArray::setCallback(const v8::Arguments& args
     return setWebGLArrayHelper<Uint8ClampedArray, V8Uint8ClampedArray>(args);
 }
 
-v8::Handle<v8::Value> toV8(Uint8ClampedArray* impl)
+v8::Handle<v8::Value> toV8(Uint8ClampedArray* impl, v8::Isolate* isolate)
 {
     if (!impl)
         return v8::Null();
index 4094575..91ba007 100644 (file)
@@ -124,7 +124,7 @@ v8::Handle<v8::Value> V8WorkerContext::setIntervalCallback(const v8::Arguments&
     return SetTimeoutOrInterval(args, false);
 }
 
-v8::Handle<v8::Value> toV8(WorkerContext* impl)
+v8::Handle<v8::Value> toV8(WorkerContext* impl, v8::Isolate* isolate)
 {
     if (!impl)
         return v8::Null();