[V8] Make a creationContext parameter of toV8() mandatory
authorharaken@chromium.org <haraken@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 16 Jan 2013 19:21:40 +0000 (19:21 +0000)
committerharaken@chromium.org <haraken@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 16 Jan 2013 19:21:40 +0000 (19:21 +0000)
https://bugs.webkit.org/show_bug.cgi?id=107020

Reviewed by Adam Barth.

Source/WebCore:

Currently a creationContext parameter of toV8() is optional:

  Handle<Value> toV8(..., Handle<Object> creationContext = Handle<Object>(), ...) {
    ...;
  }

On the other hand, looking at the implementation of
V8WrapperInstantiationScope:

    explicit V8WrapperInstantiationScope(v8::Handle<v8::Object> creationContext)
        : m_didEnterContext(false)
        , m_context(v8::Context::GetCurrent())
    {
        if (creationContext.IsEmpty()) // We do nothing for this case!
            return;
        v8::Handle<v8::Context> contextForWrapper = creationContext->CreationContext();
        if (contextForWrapper == m_context)
            return;
        m_context = v8::Local<v8::Context>::New(contextForWrapper);
        m_didEnterContext = true;
        m_context->Enter();
    }

we're assuming that a creationContext parameter is passed
to toV8() when a creationContext exists. In other words,
if we forget to pass a creationContext parameter, we will
end up with creating an object on the current context, which
is wrong. To avoid the mistake, we should make the
creationContext parameter mandatory. When we really do not
have a creationContext, we can pass Handle<Object>() explicitly.

No tests. No change in behavior.

* bindings/scripts/CodeGeneratorV8.pm:
(GenerateHeader):
* bindings/scripts/test/V8/V8Float64Array.h:
(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/V8TestException.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/V8TestOverloadedConstructors.h:
(WebCore::toV8):
* bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h:
(WebCore::toV8):
* bindings/v8/IDBBindingUtilities.cpp:
(WebCore::injectIDBKeyIntoScriptValue):
(WebCore::idbKeyToScriptValue):
* bindings/v8/ScriptController.cpp:
(WebCore::createScriptObject):
(WebCore::ScriptController::createScriptObjectForPluginElement):
* bindings/v8/ScriptDebugServer.cpp:
(WebCore::ScriptDebugServer::currentCallFrame):
* bindings/v8/ScriptObject.cpp:
(WebCore::ScriptGlobalObject::set):
* bindings/v8/V8AbstractEventListener.cpp:
(WebCore::V8AbstractEventListener::handleEvent):
(WebCore::V8AbstractEventListener::getReceiverObject):
* bindings/v8/V8DOMWindowShell.cpp:
(WebCore::V8DOMWindowShell::updateDocumentProperty):
* bindings/v8/V8LazyEventListener.cpp:
(WebCore::toObjectWrapper):
* bindings/v8/V8MutationCallback.cpp:
(WebCore::V8MutationCallback::handleEvent):
* bindings/v8/V8NodeFilterCondition.cpp:
(WebCore::V8NodeFilterCondition::acceptNode):
* bindings/v8/V8WorkerContextEventListener.cpp:
(WebCore::V8WorkerContextEventListener::handleEvent):
(WebCore::V8WorkerContextEventListener::getReceiverObject):
* bindings/v8/custom/V8CustomSQLStatementErrorCallback.cpp:
(WebCore::V8SQLStatementErrorCallback::handleEvent):
* bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
(WebCore::InjectedScriptHost::nodeAsScriptValue):
* css/MediaQueryListListener.cpp:
(WebCore::MediaQueryListListener::queryChanged):
* testing/v8/WebCoreTestSupport.cpp:
(WebCoreTestSupport::injectInternalsObject):

Source/WebKit/chromium:

We pass Handle<Object>() to a creationContext parameter of
toV8() when we do not have a creationContext.

No tests. No change in behavior.

* src/InspectorFrontendClientImpl.cpp:
(WebKit::InspectorFrontendClientImpl::windowObjectCleared):
* src/WebArrayBuffer.cpp:
(WebKit::WebArrayBuffer::toV8Value):
* src/WebBlob.cpp:
(WebKit::WebBlob::toV8Value):
* src/WebFrameImpl.cpp:
(WebKit::WebFrameImpl::createFileSystem):
(WebKit::WebFrameImpl::createSerializableFileSystem):
(WebKit::WebFrameImpl::createFileEntry):

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

34 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/V8TestException.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/V8TestOverloadedConstructors.h
Source/WebCore/bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h
Source/WebCore/bindings/v8/IDBBindingUtilities.cpp
Source/WebCore/bindings/v8/ScriptController.cpp
Source/WebCore/bindings/v8/ScriptDebugServer.cpp
Source/WebCore/bindings/v8/ScriptObject.cpp
Source/WebCore/bindings/v8/V8AbstractEventListener.cpp
Source/WebCore/bindings/v8/V8DOMWindowShell.cpp
Source/WebCore/bindings/v8/V8LazyEventListener.cpp
Source/WebCore/bindings/v8/V8MutationCallback.cpp
Source/WebCore/bindings/v8/V8NodeFilterCondition.cpp
Source/WebCore/bindings/v8/V8WorkerContextEventListener.cpp
Source/WebCore/bindings/v8/custom/V8CustomSQLStatementErrorCallback.cpp
Source/WebCore/bindings/v8/custom/V8InjectedScriptHostCustom.cpp
Source/WebCore/css/MediaQueryListListener.cpp
Source/WebCore/testing/v8/WebCoreTestSupport.cpp
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/src/InspectorFrontendClientImpl.cpp
Source/WebKit/chromium/src/WebArrayBuffer.cpp
Source/WebKit/chromium/src/WebBlob.cpp
Source/WebKit/chromium/src/WebFrameImpl.cpp

index d7045194a65ce34639944cc58501787a767c4840..f6a1901722359078d8bb2bd73f9757ff3fcc1eef 100644 (file)
@@ -1,3 +1,104 @@
+2013-01-16  Kentaro Hara  <haraken@chromium.org>
+
+        [V8] Make a creationContext parameter of toV8() mandatory
+        https://bugs.webkit.org/show_bug.cgi?id=107020
+
+        Reviewed by Adam Barth.
+
+        Currently a creationContext parameter of toV8() is optional:
+
+          Handle<Value> toV8(..., Handle<Object> creationContext = Handle<Object>(), ...) {
+            ...;
+          }
+
+        On the other hand, looking at the implementation of
+        V8WrapperInstantiationScope:
+
+            explicit V8WrapperInstantiationScope(v8::Handle<v8::Object> creationContext)
+                : m_didEnterContext(false)
+                , m_context(v8::Context::GetCurrent())
+            {
+                if (creationContext.IsEmpty()) // We do nothing for this case!
+                    return;
+                v8::Handle<v8::Context> contextForWrapper = creationContext->CreationContext();
+                if (contextForWrapper == m_context)
+                    return;
+                m_context = v8::Local<v8::Context>::New(contextForWrapper);
+                m_didEnterContext = true;
+                m_context->Enter();
+            }
+
+        we're assuming that a creationContext parameter is passed
+        to toV8() when a creationContext exists. In other words,
+        if we forget to pass a creationContext parameter, we will
+        end up with creating an object on the current context, which
+        is wrong. To avoid the mistake, we should make the
+        creationContext parameter mandatory. When we really do not
+        have a creationContext, we can pass Handle<Object>() explicitly.
+
+        No tests. No change in behavior.
+
+        * bindings/scripts/CodeGeneratorV8.pm:
+        (GenerateHeader):
+        * bindings/scripts/test/V8/V8Float64Array.h:
+        (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/V8TestException.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/V8TestOverloadedConstructors.h:
+        (WebCore::toV8):
+        * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h:
+        (WebCore::toV8):
+        * bindings/v8/IDBBindingUtilities.cpp:
+        (WebCore::injectIDBKeyIntoScriptValue):
+        (WebCore::idbKeyToScriptValue):
+        * bindings/v8/ScriptController.cpp:
+        (WebCore::createScriptObject):
+        (WebCore::ScriptController::createScriptObjectForPluginElement):
+        * bindings/v8/ScriptDebugServer.cpp:
+        (WebCore::ScriptDebugServer::currentCallFrame):
+        * bindings/v8/ScriptObject.cpp:
+        (WebCore::ScriptGlobalObject::set):
+        * bindings/v8/V8AbstractEventListener.cpp:
+        (WebCore::V8AbstractEventListener::handleEvent):
+        (WebCore::V8AbstractEventListener::getReceiverObject):
+        * bindings/v8/V8DOMWindowShell.cpp:
+        (WebCore::V8DOMWindowShell::updateDocumentProperty):
+        * bindings/v8/V8LazyEventListener.cpp:
+        (WebCore::toObjectWrapper):
+        * bindings/v8/V8MutationCallback.cpp:
+        (WebCore::V8MutationCallback::handleEvent):
+        * bindings/v8/V8NodeFilterCondition.cpp:
+        (WebCore::V8NodeFilterCondition::acceptNode):
+        * bindings/v8/V8WorkerContextEventListener.cpp:
+        (WebCore::V8WorkerContextEventListener::handleEvent):
+        (WebCore::V8WorkerContextEventListener::getReceiverObject):
+        * bindings/v8/custom/V8CustomSQLStatementErrorCallback.cpp:
+        (WebCore::V8SQLStatementErrorCallback::handleEvent):
+        * bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
+        (WebCore::InjectedScriptHost::nodeAsScriptValue):
+        * css/MediaQueryListListener.cpp:
+        (WebCore::MediaQueryListListener::queryChanged):
+        * testing/v8/WebCoreTestSupport.cpp:
+        (WebCoreTestSupport::injectInternalsObject):
+
 2013-01-15  Jer Noble  <jer.noble@apple.com>
 
         Add a Setting to disable QTKit media engine.
index ed750449eb10f6c6bf1cbbd11526be9fb9a0e892..5b728c310ea9bb6fabf8878398036a077bf5cecb 100644 (file)
@@ -530,7 +530,7 @@ END
         die "Must have custom toV8\n" if !$customWrap;
         push(@headerContent, <<END);
 class ${nativeType};
-v8::Handle<v8::Value> toV8(${nativeType}*, v8::Handle<v8::Object> creationContext = v8::Handle<v8::Object>(), v8::Isolate* = 0);
+v8::Handle<v8::Value> toV8(${nativeType}*, v8::Handle<v8::Object> creationContext, v8::Isolate* = 0);
 
 template<class HolderContainer, class Wrappable>
 inline v8::Handle<v8::Value> toV8Fast(${nativeType}* impl, const HolderContainer& container, Wrappable*)
@@ -561,7 +561,7 @@ END
 
         push(@headerContent, <<END);
 
-inline v8::Handle<v8::Value> toV8(${nativeType}* impl, v8::Handle<v8::Object> creationContext = v8::Handle<v8::Object>(), v8::Isolate* isolate = 0)
+inline v8::Handle<v8::Value> toV8(${nativeType}* impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate = 0)
 {
     if (UNLIKELY(!impl))
         return v8NullWithCheck(isolate);
@@ -592,7 +592,7 @@ inline v8::Handle<v8::Value> toV8Fast(PassRefPtr< ${nativeType} > impl, const Ho
     return toV8Fast(impl.get(), container, wrappable);
 }
 
-inline v8::Handle<v8::Value> toV8(PassRefPtr< ${nativeType} > impl, v8::Handle<v8::Object> creationContext = v8::Handle<v8::Object>(), v8::Isolate* isolate = 0)
+inline v8::Handle<v8::Value> toV8(PassRefPtr< ${nativeType} > impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate = 0)
 {
     return toV8(impl.get(), creationContext, isolate);
 }
index 9e506bd4626f2a33e008ae8f4c76002e463303b6..f5ebd700e0c3810ca65f812262f919e54708c8e2 100644 (file)
@@ -56,7 +56,7 @@ private:
 
 v8::Handle<v8::Object> wrap(Float64Array* impl, v8::Handle<v8::Object> creationContext, v8::Isolate*);
 
-inline v8::Handle<v8::Value> toV8(Float64Array* impl, v8::Handle<v8::Object> creationContext = v8::Handle<v8::Object>(), v8::Isolate* isolate = 0)
+inline v8::Handle<v8::Value> toV8(Float64Array* impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate = 0)
 {
     if (UNLIKELY(!impl))
         return v8NullWithCheck(isolate);
@@ -83,7 +83,7 @@ inline v8::Handle<v8::Value> toV8Fast(PassRefPtr< Float64Array > impl, const Hol
     return toV8Fast(impl.get(), container, wrappable);
 }
 
-inline v8::Handle<v8::Value> toV8(PassRefPtr< Float64Array > impl, v8::Handle<v8::Object> creationContext = v8::Handle<v8::Object>(), v8::Isolate* isolate = 0)
+inline v8::Handle<v8::Value> toV8(PassRefPtr< Float64Array > impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate = 0)
 {
     return toV8(impl.get(), creationContext, isolate);
 }
index fa1ca1648a6847ee9bc3289614d646ead3fd201a..aaf6b2ed17379214a8c580d8c2731b84d5b1fcec 100644 (file)
@@ -61,7 +61,7 @@ inline v8::Handle<v8::Object> wrap(TestActiveDOMObject* impl, v8::Handle<v8::Obj
     return V8TestActiveDOMObject::createWrapper(impl, creationContext, isolate);
 }
 
-inline v8::Handle<v8::Value> toV8(TestActiveDOMObject* impl, v8::Handle<v8::Object> creationContext = v8::Handle<v8::Object>(), v8::Isolate* isolate = 0)
+inline v8::Handle<v8::Value> toV8(TestActiveDOMObject* impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate = 0)
 {
     if (UNLIKELY(!impl))
         return v8NullWithCheck(isolate);
@@ -88,7 +88,7 @@ inline v8::Handle<v8::Value> toV8Fast(PassRefPtr< TestActiveDOMObject > impl, co
     return toV8Fast(impl.get(), container, wrappable);
 }
 
-inline v8::Handle<v8::Value> toV8(PassRefPtr< TestActiveDOMObject > impl, v8::Handle<v8::Object> creationContext = v8::Handle<v8::Object>(), v8::Isolate* isolate = 0)
+inline v8::Handle<v8::Value> toV8(PassRefPtr< TestActiveDOMObject > impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate = 0)
 {
     return toV8(impl.get(), creationContext, isolate);
 }
index 128e223dbe9ba4186ed1021badf83752383ba19c..031813ebbd9c9c8bba67b7ee17cbdfac9e08543c 100644 (file)
@@ -60,7 +60,7 @@ inline v8::Handle<v8::Object> wrap(TestCustomNamedGetter* impl, v8::Handle<v8::O
     return V8TestCustomNamedGetter::createWrapper(impl, creationContext, isolate);
 }
 
-inline v8::Handle<v8::Value> toV8(TestCustomNamedGetter* impl, v8::Handle<v8::Object> creationContext = v8::Handle<v8::Object>(), v8::Isolate* isolate = 0)
+inline v8::Handle<v8::Value> toV8(TestCustomNamedGetter* impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate = 0)
 {
     if (UNLIKELY(!impl))
         return v8NullWithCheck(isolate);
@@ -87,7 +87,7 @@ inline v8::Handle<v8::Value> toV8Fast(PassRefPtr< TestCustomNamedGetter > impl,
     return toV8Fast(impl.get(), container, wrappable);
 }
 
-inline v8::Handle<v8::Value> toV8(PassRefPtr< TestCustomNamedGetter > impl, v8::Handle<v8::Object> creationContext = v8::Handle<v8::Object>(), v8::Isolate* isolate = 0)
+inline v8::Handle<v8::Value> toV8(PassRefPtr< TestCustomNamedGetter > impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate = 0)
 {
     return toV8(impl.get(), creationContext, isolate);
 }
index d3ba25723535d560797319328db18bfd19d2ac93..13f37e275767bb7f3d613d3a8b80772b1be9ad70 100644 (file)
@@ -61,7 +61,7 @@ inline v8::Handle<v8::Object> wrap(TestEventConstructor* impl, v8::Handle<v8::Ob
     return V8TestEventConstructor::createWrapper(impl, creationContext, isolate);
 }
 
-inline v8::Handle<v8::Value> toV8(TestEventConstructor* impl, v8::Handle<v8::Object> creationContext = v8::Handle<v8::Object>(), v8::Isolate* isolate = 0)
+inline v8::Handle<v8::Value> toV8(TestEventConstructor* impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate = 0)
 {
     if (UNLIKELY(!impl))
         return v8NullWithCheck(isolate);
@@ -88,7 +88,7 @@ inline v8::Handle<v8::Value> toV8Fast(PassRefPtr< TestEventConstructor > impl, c
     return toV8Fast(impl.get(), container, wrappable);
 }
 
-inline v8::Handle<v8::Value> toV8(PassRefPtr< TestEventConstructor > impl, v8::Handle<v8::Object> creationContext = v8::Handle<v8::Object>(), v8::Isolate* isolate = 0)
+inline v8::Handle<v8::Value> toV8(PassRefPtr< TestEventConstructor > impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate = 0)
 {
     return toV8(impl.get(), creationContext, isolate);
 }
index e95ed4df20a4dc9080ddcf2ba2c24f6474a77697..6296d7034b9811ad087aa40f0aaafca5395c752e 100644 (file)
@@ -62,7 +62,7 @@ inline v8::Handle<v8::Object> wrap(TestEventTarget* impl, v8::Handle<v8::Object>
     return V8TestEventTarget::createWrapper(impl, creationContext, isolate);
 }
 
-inline v8::Handle<v8::Value> toV8(TestEventTarget* impl, v8::Handle<v8::Object> creationContext = v8::Handle<v8::Object>(), v8::Isolate* isolate = 0)
+inline v8::Handle<v8::Value> toV8(TestEventTarget* impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate = 0)
 {
     if (UNLIKELY(!impl))
         return v8NullWithCheck(isolate);
@@ -89,7 +89,7 @@ inline v8::Handle<v8::Value> toV8Fast(PassRefPtr< TestEventTarget > impl, const
     return toV8Fast(impl.get(), container, wrappable);
 }
 
-inline v8::Handle<v8::Value> toV8(PassRefPtr< TestEventTarget > impl, v8::Handle<v8::Object> creationContext = v8::Handle<v8::Object>(), v8::Isolate* isolate = 0)
+inline v8::Handle<v8::Value> toV8(PassRefPtr< TestEventTarget > impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate = 0)
 {
     return toV8(impl.get(), creationContext, isolate);
 }
index 40d27b415b924ad7e472fc32adfc75e8b62fb38a..f9722e3426720f629706d674c770eaad1d357d9f 100644 (file)
@@ -59,7 +59,7 @@ inline v8::Handle<v8::Object> wrap(TestException* impl, v8::Handle<v8::Object> c
     return V8TestException::createWrapper(impl, creationContext, isolate);
 }
 
-inline v8::Handle<v8::Value> toV8(TestException* impl, v8::Handle<v8::Object> creationContext = v8::Handle<v8::Object>(), v8::Isolate* isolate = 0)
+inline v8::Handle<v8::Value> toV8(TestException* impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate = 0)
 {
     if (UNLIKELY(!impl))
         return v8NullWithCheck(isolate);
@@ -86,7 +86,7 @@ inline v8::Handle<v8::Value> toV8Fast(PassRefPtr< TestException > impl, const Ho
     return toV8Fast(impl.get(), container, wrappable);
 }
 
-inline v8::Handle<v8::Value> toV8(PassRefPtr< TestException > impl, v8::Handle<v8::Object> creationContext = v8::Handle<v8::Object>(), v8::Isolate* isolate = 0)
+inline v8::Handle<v8::Value> toV8(PassRefPtr< TestException > impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate = 0)
 {
     return toV8(impl.get(), creationContext, isolate);
 }
index cb6aba3663eb4d86792925132179a077ca87478f..9b63ff55031d2bbfe6df823f1b77db70e255a5f3 100644 (file)
@@ -64,7 +64,7 @@ inline v8::Handle<v8::Object> wrap(TestInterface* impl, v8::Handle<v8::Object> c
     return V8TestInterface::createWrapper(impl, creationContext, isolate);
 }
 
-inline v8::Handle<v8::Value> toV8(TestInterface* impl, v8::Handle<v8::Object> creationContext = v8::Handle<v8::Object>(), v8::Isolate* isolate = 0)
+inline v8::Handle<v8::Value> toV8(TestInterface* impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate = 0)
 {
     if (UNLIKELY(!impl))
         return v8NullWithCheck(isolate);
@@ -91,7 +91,7 @@ inline v8::Handle<v8::Value> toV8Fast(PassRefPtr< TestInterface > impl, const Ho
     return toV8Fast(impl.get(), container, wrappable);
 }
 
-inline v8::Handle<v8::Value> toV8(PassRefPtr< TestInterface > impl, v8::Handle<v8::Object> creationContext = v8::Handle<v8::Object>(), v8::Isolate* isolate = 0)
+inline v8::Handle<v8::Value> toV8(PassRefPtr< TestInterface > impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate = 0)
 {
     return toV8(impl.get(), creationContext, isolate);
 }
index 4fb7065c77fa655642e4fe70e6f7eb029d7a2bc8..155ac4de46b7c0b431e082a6c332bf5bce8eae9e 100644 (file)
@@ -59,7 +59,7 @@ inline v8::Handle<v8::Object> wrap(TestMediaQueryListListener* impl, v8::Handle<
     return V8TestMediaQueryListListener::createWrapper(impl, creationContext, isolate);
 }
 
-inline v8::Handle<v8::Value> toV8(TestMediaQueryListListener* impl, v8::Handle<v8::Object> creationContext = v8::Handle<v8::Object>(), v8::Isolate* isolate = 0)
+inline v8::Handle<v8::Value> toV8(TestMediaQueryListListener* impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate = 0)
 {
     if (UNLIKELY(!impl))
         return v8NullWithCheck(isolate);
@@ -86,7 +86,7 @@ inline v8::Handle<v8::Value> toV8Fast(PassRefPtr< TestMediaQueryListListener > i
     return toV8Fast(impl.get(), container, wrappable);
 }
 
-inline v8::Handle<v8::Value> toV8(PassRefPtr< TestMediaQueryListListener > impl, v8::Handle<v8::Object> creationContext = v8::Handle<v8::Object>(), v8::Isolate* isolate = 0)
+inline v8::Handle<v8::Value> toV8(PassRefPtr< TestMediaQueryListListener > impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate = 0)
 {
     return toV8(impl.get(), creationContext, isolate);
 }
index a5ff314a593e1ca1dedc2925edb366410cb98762..e256239a5e6fd408ce8d3cc1dfe0ce0c1a0f883f 100644 (file)
@@ -66,7 +66,7 @@ inline v8::Handle<v8::Object> wrap(TestNamedConstructor* impl, v8::Handle<v8::Ob
     return V8TestNamedConstructor::createWrapper(impl, creationContext, isolate);
 }
 
-inline v8::Handle<v8::Value> toV8(TestNamedConstructor* impl, v8::Handle<v8::Object> creationContext = v8::Handle<v8::Object>(), v8::Isolate* isolate = 0)
+inline v8::Handle<v8::Value> toV8(TestNamedConstructor* impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate = 0)
 {
     if (UNLIKELY(!impl))
         return v8NullWithCheck(isolate);
@@ -93,7 +93,7 @@ inline v8::Handle<v8::Value> toV8Fast(PassRefPtr< TestNamedConstructor > impl, c
     return toV8Fast(impl.get(), container, wrappable);
 }
 
-inline v8::Handle<v8::Value> toV8(PassRefPtr< TestNamedConstructor > impl, v8::Handle<v8::Object> creationContext = v8::Handle<v8::Object>(), v8::Isolate* isolate = 0)
+inline v8::Handle<v8::Value> toV8(PassRefPtr< TestNamedConstructor > impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate = 0)
 {
     return toV8(impl.get(), creationContext, isolate);
 }
index de93d2dad0d0d3217bdb0efeca7da50fdeb930d2..7df42048e66b72a7c3c1c8220e1adac616bc2791 100644 (file)
@@ -60,7 +60,7 @@ inline v8::Handle<v8::Object> wrap(TestNode* impl, v8::Handle<v8::Object> creati
     return V8TestNode::createWrapper(impl, creationContext, isolate);
 }
 
-inline v8::Handle<v8::Value> toV8(TestNode* impl, v8::Handle<v8::Object> creationContext = v8::Handle<v8::Object>(), v8::Isolate* isolate = 0)
+inline v8::Handle<v8::Value> toV8(TestNode* impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate = 0)
 {
     if (UNLIKELY(!impl))
         return v8NullWithCheck(isolate);
@@ -87,7 +87,7 @@ inline v8::Handle<v8::Value> toV8Fast(PassRefPtr< TestNode > impl, const HolderC
     return toV8Fast(impl.get(), container, wrappable);
 }
 
-inline v8::Handle<v8::Value> toV8(PassRefPtr< TestNode > impl, v8::Handle<v8::Object> creationContext = v8::Handle<v8::Object>(), v8::Isolate* isolate = 0)
+inline v8::Handle<v8::Value> toV8(PassRefPtr< TestNode > impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate = 0)
 {
     return toV8(impl.get(), creationContext, isolate);
 }
index 14039ba8af4745f2296f116a0ee72070bc19f3cb..8d62bdcef93a594869a9327c1d304876e3bd0f7f 100644 (file)
@@ -65,7 +65,7 @@ inline v8::Handle<v8::Object> wrap(TestObj* impl, v8::Handle<v8::Object> creatio
     return V8TestObj::createWrapper(impl, creationContext, isolate);
 }
 
-inline v8::Handle<v8::Value> toV8(TestObj* impl, v8::Handle<v8::Object> creationContext = v8::Handle<v8::Object>(), v8::Isolate* isolate = 0)
+inline v8::Handle<v8::Value> toV8(TestObj* impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate = 0)
 {
     if (UNLIKELY(!impl))
         return v8NullWithCheck(isolate);
@@ -92,7 +92,7 @@ inline v8::Handle<v8::Value> toV8Fast(PassRefPtr< TestObj > impl, const HolderCo
     return toV8Fast(impl.get(), container, wrappable);
 }
 
-inline v8::Handle<v8::Value> toV8(PassRefPtr< TestObj > impl, v8::Handle<v8::Object> creationContext = v8::Handle<v8::Object>(), v8::Isolate* isolate = 0)
+inline v8::Handle<v8::Value> toV8(PassRefPtr< TestObj > impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate = 0)
 {
     return toV8(impl.get(), creationContext, isolate);
 }
index b6e021914fe9d31ded6e9212bc8e023f18cfda31..f837649ce43e767410102b13797c75b3bfc91da6 100644 (file)
@@ -64,7 +64,7 @@ inline v8::Handle<v8::Object> wrap(TestOverloadedConstructors* impl, v8::Handle<
     return V8TestOverloadedConstructors::createWrapper(impl, creationContext, isolate);
 }
 
-inline v8::Handle<v8::Value> toV8(TestOverloadedConstructors* impl, v8::Handle<v8::Object> creationContext = v8::Handle<v8::Object>(), v8::Isolate* isolate = 0)
+inline v8::Handle<v8::Value> toV8(TestOverloadedConstructors* impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate = 0)
 {
     if (UNLIKELY(!impl))
         return v8NullWithCheck(isolate);
@@ -91,7 +91,7 @@ inline v8::Handle<v8::Value> toV8Fast(PassRefPtr< TestOverloadedConstructors > i
     return toV8Fast(impl.get(), container, wrappable);
 }
 
-inline v8::Handle<v8::Value> toV8(PassRefPtr< TestOverloadedConstructors > impl, v8::Handle<v8::Object> creationContext = v8::Handle<v8::Object>(), v8::Isolate* isolate = 0)
+inline v8::Handle<v8::Value> toV8(PassRefPtr< TestOverloadedConstructors > impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate = 0)
 {
     return toV8(impl.get(), creationContext, isolate);
 }
index 592b8329ef9db085e18bed4910f3117ef7b29175..3464a9c88061b5d89dd274c4bf1d47ea75aa76a7 100644 (file)
@@ -62,7 +62,7 @@ inline v8::Handle<v8::Object> wrap(TestSerializedScriptValueInterface* impl, v8:
     return V8TestSerializedScriptValueInterface::createWrapper(impl, creationContext, isolate);
 }
 
-inline v8::Handle<v8::Value> toV8(TestSerializedScriptValueInterface* impl, v8::Handle<v8::Object> creationContext = v8::Handle<v8::Object>(), v8::Isolate* isolate = 0)
+inline v8::Handle<v8::Value> toV8(TestSerializedScriptValueInterface* impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate = 0)
 {
     if (UNLIKELY(!impl))
         return v8NullWithCheck(isolate);
@@ -89,7 +89,7 @@ inline v8::Handle<v8::Value> toV8Fast(PassRefPtr< TestSerializedScriptValueInter
     return toV8Fast(impl.get(), container, wrappable);
 }
 
-inline v8::Handle<v8::Value> toV8(PassRefPtr< TestSerializedScriptValueInterface > impl, v8::Handle<v8::Object> creationContext = v8::Handle<v8::Object>(), v8::Isolate* isolate = 0)
+inline v8::Handle<v8::Value> toV8(PassRefPtr< TestSerializedScriptValueInterface > impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate = 0)
 {
     return toV8(impl.get(), creationContext, isolate);
 }
index e107ccf5d82664898e73e825b566a09186475f4c..74747a2ea53883e817e78c502709d69ebe67937d 100644 (file)
@@ -241,7 +241,7 @@ bool injectIDBKeyIntoScriptValue(DOMRequestState*, PassRefPtr<IDBKey> key, Scrip
     if (parent.IsEmpty())
         return false;
 
-    if (!set(parent, keyPathElements.last(), toV8(key.get())))
+    if (!set(parent, keyPathElements.last(), toV8(key.get(), v8::Handle<v8::Object>())))
         return false;
 
     return true;
@@ -267,7 +267,7 @@ ScriptValue idbKeyToScriptValue(DOMRequestState* state, PassRefPtr<IDBKey> key)
 {
     ASSERT(v8::Context::InContext());
     v8::HandleScope handleScope;
-    v8::Handle<v8::Value> v8Value(toV8(key.get()));
+    v8::Handle<v8::Value> v8Value(toV8(key.get(), v8::Handle<v8::Object>()));
     return ScriptValue(v8Value);
 }
 
index 172d4fbd76a8a31cbbc4f259ef843d79cddf1288..6d06c3a0f69f520c2213e2ca04af64f050e05274 100644 (file)
@@ -616,7 +616,7 @@ static NPObject* createScriptObject(Frame* frame)
 
     v8::Context::Scope scope(v8Context);
     DOMWindow* window = frame->document()->domWindow();
-    v8::Handle<v8::Value> global = toV8(window);
+    v8::Handle<v8::Value> global = toV8(window, v8::Handle<v8::Object>());
     ASSERT(global->IsObject());
     return npCreateV8ScriptObject(0, v8::Handle<v8::Object>::Cast(global), window);
 }
@@ -656,7 +656,7 @@ NPObject* ScriptController::createScriptObjectForPluginElement(HTMLPlugInElement
     v8::Context::Scope scope(v8Context);
 
     DOMWindow* window = m_frame->document()->domWindow();
-    v8::Handle<v8::Value> v8plugin = toV8(static_cast<HTMLEmbedElement*>(plugin));
+    v8::Handle<v8::Value> v8plugin = toV8(static_cast<HTMLEmbedElement*>(plugin), v8::Handle<v8::Object>());
     if (!v8plugin->IsObject())
         return createNoScriptObject();
 
index f1919b54deca6bf712bad3e4523218a3ec7dd7e2..3c11689b409187d2634a8f3be2b4d0fece2201c3 100644 (file)
@@ -385,7 +385,7 @@ ScriptValue ScriptDebugServer::currentCallFrame()
 
     RefPtr<JavaScriptCallFrame> currentCallFrame = JavaScriptCallFrame::create(v8::Debug::GetDebugContext(), v8::Handle<v8::Object>::Cast(currentCallFrameV8));
     v8::Context::Scope contextScope(m_pausedContext);
-    return ScriptValue(toV8(currentCallFrame.release()));
+    return ScriptValue(toV8(currentCallFrame.release(), v8::Handle<v8::Object>()));
 }
 
 void ScriptDebugServer::interruptAndRun(PassOwnPtr<Task> task, v8::Isolate* isolate)
index b01862dbb385b4043e84a7a4e317f472d8eb557d..18493d6743a91aedabc9a36a84909231845f9547 100644 (file)
@@ -73,14 +73,14 @@ bool ScriptGlobalObject::set(ScriptState* scriptState, const char* name, const S
 bool ScriptGlobalObject::set(ScriptState* scriptState, const char* name, InspectorFrontendHost* value)
 {
     ScriptScope scope(scriptState);
-    scope.global()->Set(v8::String::NewSymbol(name), toV8(value));
+    scope.global()->Set(v8::String::NewSymbol(name), toV8(value, v8::Handle<v8::Object>()));
     return scope.success();
 }
 
 bool ScriptGlobalObject::set(ScriptState* scriptState, const char* name, InjectedScriptHost* value)
 {
     ScriptScope scope(scriptState);
-    scope.global()->Set(v8::String::NewSymbol(name), toV8(value));
+    scope.global()->Set(v8::String::NewSymbol(name), toV8(value, v8::Handle<v8::Object>()));
     return scope.success();
 }
 #endif
index 727696eeb0470ae316a028bd6fea14f631fe913c..818cff8df033abb05225835d8d3494df562ddfb3 100644 (file)
@@ -96,7 +96,7 @@ void V8AbstractEventListener::handleEvent(ScriptExecutionContext* context, Event
     v8::Context::Scope scope(v8Context);
 
     // Get the V8 wrapper for the event object.
-    v8::Handle<v8::Value> jsEvent = toV8(event);
+    v8::Handle<v8::Value> jsEvent = toV8(event, v8::Handle<v8::Object>());
     ASSERT(!jsEvent.IsEmpty());
 
     invokeEventHandler(context, event, jsEvent);
@@ -188,7 +188,7 @@ v8::Local<v8::Object> V8AbstractEventListener::getReceiverObject(Event* event)
         return v8::Local<v8::Object>::New(m_listener.get());
 
     EventTarget* target = event->currentTarget();
-    v8::Handle<v8::Value> value = toV8(target);
+    v8::Handle<v8::Value> value = toV8(target, v8::Handle<v8::Object>());
     if (value.IsEmpty())
         return v8::Local<v8::Object>();
     return v8::Local<v8::Object>::New(v8::Handle<v8::Object>::Cast(value));
index 327862dfb25e7bf7efc34bc68ef77b088a3c8a89..30451c12c0557adfb3ec45dca03126c4ca6040aa 100644 (file)
@@ -354,7 +354,7 @@ void V8DOMWindowShell::updateDocumentProperty()
     // FIXME: Should we use a new Local handle here?
     v8::Context::Scope contextScope(m_context.get());
 
-    v8::Handle<v8::Value> documentWrapper = toV8(m_frame->document());
+    v8::Handle<v8::Value> documentWrapper = toV8(m_frame->document(), v8::Handle<v8::Object>());
     ASSERT(documentWrapper == m_document.get() || m_document.isEmpty());
     if (m_document.isEmpty())
         updateDocumentWrapper(v8::Handle<v8::Object>::Cast(documentWrapper));
index 938b109803ff0ad8e3da7a167fe9c17bb95c5155..b8df4d8efd1f9f6e518af21d5b161045b015bd9f 100644 (file)
@@ -67,7 +67,7 @@ v8::Handle<v8::Object> toObjectWrapper(T* domObject)
 {
     if (!domObject)
         return v8::Object::New();
-    v8::Handle<v8::Value> value = toV8(domObject);
+    v8::Handle<v8::Value> value = toV8(domObject, v8::Handle<v8::Object>());
     if (value.IsEmpty())
         return v8::Object::New();
     return value.As<v8::Object>();
index af05192e324821895bf897909c26d56ccffe0acd..bf283409775c47f1f10869a4913f594fb965506f 100644 (file)
@@ -63,9 +63,9 @@ bool V8MutationCallback::handleEvent(MutationRecordArray* mutations, MutationObs
 
     v8::Local<v8::Array> mutationsArray = v8::Array::New(mutations->size());
     for (size_t i = 0; i < mutations->size(); ++i)
-        mutationsArray->Set(deprecatedV8Integer(i), toV8(mutations->at(i).get()));
+        mutationsArray->Set(deprecatedV8Integer(i), toV8(mutations->at(i).get(), v8::Handle<v8::Object>()));
 
-    v8::Handle<v8::Value> observerHandle = toV8(observer);
+    v8::Handle<v8::Value> observerHandle = toV8(observer, v8::Handle<v8::Object>());
     if (observerHandle.IsEmpty()) {
         if (!isScriptControllerTerminating())
             CRASH();
index 9e8f687c6ff00fbeadbd5696a6869cb9231dd95d..cdf7681bf5b5a903622f0ad749244538af184c10 100644 (file)
@@ -72,7 +72,7 @@ short V8NodeFilterCondition::acceptNode(ScriptState* state, Node* node) const
 
     v8::Handle<v8::Object> object = v8::Context::GetCurrent()->Global();
     OwnArrayPtr<v8::Handle<v8::Value> > args = adoptArrayPtr(new v8::Handle<v8::Value>[1]);
-    args[0] = toV8(node);
+    args[0] = toV8(node, v8::Handle<v8::Object>());
 
     v8::Handle<v8::Value> result = ScriptController::callFunctionWithInstrumentation(0, callback, object, 1, args.get());
 
index 864530708fe7f68b88fd56c90a2ff3bf1fa23b4b..b54e280e40e641ca1ce9a0ced14b003d0c64583e 100644 (file)
@@ -75,7 +75,7 @@ void V8WorkerContextEventListener::handleEvent(ScriptExecutionContext* context,
     v8::Context::Scope scope(v8Context);
 
     // Get the V8 wrapper for the event object.
-    v8::Handle<v8::Value> jsEvent = toV8(event);
+    v8::Handle<v8::Value> jsEvent = toV8(event, v8::Handle<v8::Object>());
 
     invokeEventHandler(context, event, jsEvent);
 }
@@ -118,7 +118,7 @@ v8::Local<v8::Object> V8WorkerContextEventListener::getReceiverObject(ScriptExec
         return listener;
 
     EventTarget* target = event->currentTarget();
-    v8::Handle<v8::Value> value = toV8(target);
+    v8::Handle<v8::Value> value = toV8(target, v8::Handle<v8::Object>());
     if (value.IsEmpty())
         return v8::Local<v8::Object>();
     return v8::Local<v8::Object>::New(v8::Handle<v8::Object>::Cast(value));
index 7952398da34ee35af5feefc40bfabc6346661c2a..2b82522b387d000e2bf8a0433bd376c4e63679ad 100644 (file)
@@ -55,8 +55,8 @@ bool V8SQLStatementErrorCallback::handleEvent(SQLTransaction* transaction, SQLEr
 
     v8::Context::Scope scope(v8Context);
 
-    v8::Handle<v8::Value> transactionHandle = toV8(transaction);
-    v8::Handle<v8::Value> errorHandle = toV8(error);
+    v8::Handle<v8::Value> transactionHandle = toV8(transaction, v8::Handle<v8::Object>());
+    v8::Handle<v8::Value> errorHandle = toV8(error, v8::Handle<v8::Object>());
     if (transactionHandle.IsEmpty() || errorHandle.IsEmpty()) {
         if (!isScriptControllerTerminating())
             CRASH();
index 70e8ffb6d5374dd7f9cd304cb84f63121da02ec1..c9e291fc69f455cf385535e0b81d3f8a133f6c4f 100644 (file)
@@ -76,7 +76,7 @@ ScriptValue InjectedScriptHost::nodeAsScriptValue(ScriptState* state, Node* node
 
     if (!BindingSecurity::shouldAllowAccessToNode(BindingState::instance(), node))
         return ScriptValue(v8::Null());
-    return ScriptValue(toV8(node));
+    return ScriptValue(toV8(node, v8::Handle<v8::Object>()));
 }
 
 v8::Handle<v8::Value> V8InjectedScriptHost::inspectedObjectCallback(const v8::Arguments& args)
index 6f86bc2a4559ecccf2dc30452b7f16e29cb3333c..91016026bb4d7e275e2702419e854c9a3194e5d2 100644 (file)
@@ -42,7 +42,7 @@ void MediaQueryListListener::queryChanged(ScriptState* state, MediaQueryList* qu
     if (context.IsEmpty())
        return; // JS may not be enabled.
     v8::Context::Scope scope(context);
-    callback.appendArgument(toV8(query));
+    callback.appendArgument(toV8(query, v8::Handle<v8::Object>()));
 #endif
     callback.call();
 }
index 1dcd60675c87d44cda074e80cb61b09fcbc70d65..ca328e30b682cee87b76b7ee956419ad9f709186 100644 (file)
@@ -46,7 +46,7 @@ void injectInternalsObject(v8::Local<v8::Context> context)
 
     ScriptExecutionContext* scriptContext = getScriptExecutionContext();
     if (scriptContext->isDocument())
-        context->Global()->Set(v8::String::New(Internals::internalsId), toV8(Internals::create(static_cast<Document*>(scriptContext))));
+        context->Global()->Set(v8::String::New(Internals::internalsId), toV8(Internals::create(static_cast<Document*>(scriptContext)), v8::Handle<v8::Object>()));
 }
 
 void resetInternalsObject(v8::Local<v8::Context> context)
index aef2f45f57bef47816567dfa42f10db26e77d3f4..eefdc9503697dc244a4b679b0eb855938d75d77b 100644 (file)
@@ -1,3 +1,26 @@
+2013-01-16  Kentaro Hara  <haraken@chromium.org>
+
+        [V8] Make a creationContext parameter of toV8() mandatory
+        https://bugs.webkit.org/show_bug.cgi?id=107020
+
+        Reviewed by Adam Barth.
+
+        We pass Handle<Object>() to a creationContext parameter of
+        toV8() when we do not have a creationContext.
+
+        No tests. No change in behavior.
+
+        * src/InspectorFrontendClientImpl.cpp:
+        (WebKit::InspectorFrontendClientImpl::windowObjectCleared):
+        * src/WebArrayBuffer.cpp:
+        (WebKit::WebArrayBuffer::toV8Value):
+        * src/WebBlob.cpp:
+        (WebKit::WebBlob::toV8Value):
+        * src/WebFrameImpl.cpp:
+        (WebKit::WebFrameImpl::createFileSystem):
+        (WebKit::WebFrameImpl::createSerializableFileSystem):
+        (WebKit::WebFrameImpl::createFileEntry):
+
 2013-01-16  Mark Pilgrim  <pilgrim@chromium.org>
 
         [Chromium] Move WebArrayBufferView and WebSerializedScriptValue out of public/platform/
index b2be136895fc5b0c9776cd6f359900046b42cb84..2641b4b1dbaae5b9845cb7cb990163a709078a64 100644 (file)
@@ -68,7 +68,7 @@ void InspectorFrontendClientImpl::windowObjectCleared()
 
     ASSERT(!m_frontendHost);
     m_frontendHost = InspectorFrontendHost::create(this, m_frontendPage);
-    v8::Handle<v8::Value> frontendHostObj = toV8(m_frontendHost.get());
+    v8::Handle<v8::Value> frontendHostObj = toV8(m_frontendHost.get(), v8::Handle<v8::Object>());
     v8::Handle<v8::Object> global = frameContext->Global();
 
     global->Set(v8::String::New("InspectorFrontendHost"), frontendHostObj);
index 79835f398ffc023c046c15300dcb802bcb4bd495..5212730df746834400483669b5ce892891664cda 100644 (file)
@@ -74,7 +74,7 @@ v8::Handle<v8::Value> WebArrayBuffer::toV8Value()
 {
     if (!m_private.get())
         return v8::Handle<v8::Value>();
-    return toV8(m_private.get());
+    return toV8(m_private.get(), v8::Handle<v8::Object>());
 }
 
 WebArrayBuffer* WebArrayBuffer::createFromV8Value(v8::Handle<v8::Value> value)
index 963da16b07b67ccb2bbd2a8a5940ce4ff01309d3..7214508a3ff7bca7eb66d4a19bdec8c3205a999f 100644 (file)
@@ -63,7 +63,7 @@ v8::Handle<v8::Value>  WebBlob::toV8Value()
 {
     if (!m_private.get())
         return v8::Handle<v8::Value>();
-    return toV8(m_private.get());
+    return toV8(m_private.get(), v8::Handle<v8::Object>());
 }
 #endif
 
index 9e725288a0dc716abb864f02c192b9cd3e5b6a0f..347fa20388d73a3a0ab093bb799a8e641abe585c 100644 (file)
@@ -912,7 +912,7 @@ v8::Local<v8::Context> WebFrameImpl::mainWorldScriptContext() const
 v8::Handle<v8::Value> WebFrameImpl::createFileSystem(WebFileSystem::Type type, const WebString& name, const WebString& path)
 {
     ASSERT(frame());
-    return toV8(DOMFileSystem::create(frame()->document(), name, static_cast<WebCore::FileSystemType>(type), KURL(ParsedURLString, path.utf8().data()), AsyncFileSystemChromium::create()));
+    return toV8(DOMFileSystem::create(frame()->document(), name, static_cast<WebCore::FileSystemType>(type), KURL(ParsedURLString, path.utf8().data()), AsyncFileSystemChromium::create()), v8::Handle<v8::Object>());
 }
 
 v8::Handle<v8::Value> WebFrameImpl::createSerializableFileSystem(WebFileSystem::Type type, const WebString& name, const WebString& path)
@@ -920,7 +920,7 @@ v8::Handle<v8::Value> WebFrameImpl::createSerializableFileSystem(WebFileSystem::
     ASSERT(frame());
     RefPtr<DOMFileSystem> fileSystem = DOMFileSystem::create(frame()->document(), name, static_cast<WebCore::FileSystemType>(type), KURL(ParsedURLString, path.utf8().data()), AsyncFileSystemChromium::create());
     fileSystem->makeClonable();
-    return toV8(fileSystem.release());
+    return toV8(fileSystem.release(), v8::Handle<v8::Object>());
 }
 
 v8::Handle<v8::Value> WebFrameImpl::createFileEntry(WebFileSystem::Type type, const WebString& fileSystemName, const WebString& fileSystemPath, const WebString& filePath, bool isDirectory)
@@ -929,8 +929,8 @@ v8::Handle<v8::Value> WebFrameImpl::createFileEntry(WebFileSystem::Type type, co
 
     RefPtr<DOMFileSystemBase> fileSystem = DOMFileSystem::create(frame()->document(), fileSystemName, static_cast<WebCore::FileSystemType>(type), KURL(ParsedURLString, fileSystemPath.utf8().data()), AsyncFileSystemChromium::create());
     if (isDirectory)
-        return toV8(DirectoryEntry::create(fileSystem, filePath));
-    return toV8(FileEntry::create(fileSystem, filePath));
+        return toV8(DirectoryEntry::create(fileSystem, filePath), v8::Handle<v8::Object>());
+    return toV8(FileEntry::create(fileSystem, filePath), v8::Handle<v8::Object>());
 }
 
 void WebFrameImpl::reload(bool ignoreCache)