summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/bindings/scripts/test/V8
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/bindings/scripts/test/V8')
-rw-r--r--Source/WebCore/bindings/scripts/test/V8/V8TestCallback.cpp29
-rw-r--r--Source/WebCore/bindings/scripts/test/V8/V8TestCallback.h1
-rw-r--r--Source/WebCore/bindings/scripts/test/V8/V8TestInterface.cpp5
-rw-r--r--Source/WebCore/bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp5
-rw-r--r--Source/WebCore/bindings/scripts/test/V8/V8TestObj.cpp5
-rw-r--r--Source/WebCore/bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp5
6 files changed, 41 insertions, 9 deletions
diff --git a/Source/WebCore/bindings/scripts/test/V8/V8TestCallback.cpp b/Source/WebCore/bindings/scripts/test/V8/V8TestCallback.cpp
index 057302d..c17f73d 100644
--- a/Source/WebCore/bindings/scripts/test/V8/V8TestCallback.cpp
+++ b/Source/WebCore/bindings/scripts/test/V8/V8TestCallback.cpp
@@ -27,7 +27,7 @@
#include "V8Class1.h"
#include "V8Class2.h"
#include "V8CustomVoidCallback.h"
-#include "V8DOMString.h"
+#include "V8DOMStringList.h"
#include "V8Proxy.h"
#include <wtf/GetPtr.h>
#include <wtf/RefCounted.h>
@@ -131,6 +131,33 @@ bool V8TestCallback::callbackWithClass2Param(Class2* class2Param, const String&
return !invokeCallback(m_callback, 2, argv, callbackReturnValue, scriptExecutionContext());
}
+bool V8TestCallback::callbackWithStringList(PassRefPtr<DOMStringList> listParam)
+{
+ if (!canInvokeCallback())
+ return true;
+
+ v8::HandleScope handleScope;
+
+ v8::Handle<v8::Context> v8Context = toV8Context(scriptExecutionContext(), m_worldContext);
+ if (v8Context.IsEmpty())
+ return true;
+
+ v8::Context::Scope scope(v8Context);
+
+ v8::Handle<v8::Value> listParamHandle = toV8(listParam);
+ if (listParamHandle.IsEmpty()) {
+ CRASH();
+ return true;
+ }
+
+ v8::Handle<v8::Value> argv[] = {
+ listParamHandle
+ };
+
+ bool callbackReturnValue = false;
+ return !invokeCallback(m_callback, 1, argv, callbackReturnValue, scriptExecutionContext());
+}
+
} // namespace WebCore
#endif // ENABLE(DATABASE)
diff --git a/Source/WebCore/bindings/scripts/test/V8/V8TestCallback.h b/Source/WebCore/bindings/scripts/test/V8/V8TestCallback.h
index 8ff8c26..194f13c 100644
--- a/Source/WebCore/bindings/scripts/test/V8/V8TestCallback.h
+++ b/Source/WebCore/bindings/scripts/test/V8/V8TestCallback.h
@@ -50,6 +50,7 @@ public:
virtual bool callbackWithClass2Param(Class2* class2Param, const String& strArg);
COMPILE_ASSERT(false) virtual int callbackWithNonBoolReturnType(Class3* class3Param);
virtual int customCallback(Class5* class5Param, Class6* class6Param);
+ virtual bool callbackWithStringList(PassRefPtr<DOMStringList> listParam);
private:
V8TestCallback(v8::Local<v8::Object>, ScriptExecutionContext*);
diff --git a/Source/WebCore/bindings/scripts/test/V8/V8TestInterface.cpp b/Source/WebCore/bindings/scripts/test/V8/V8TestInterface.cpp
index 4c40d98..21c8804 100644
--- a/Source/WebCore/bindings/scripts/test/V8/V8TestInterface.cpp
+++ b/Source/WebCore/bindings/scripts/test/V8/V8TestInterface.cpp
@@ -33,7 +33,7 @@
namespace WebCore {
-WrapperTypeInfo V8TestInterface::info = { V8TestInterface::GetTemplate, V8TestInterface::derefObject, 0 };
+WrapperTypeInfo V8TestInterface::info = { V8TestInterface::GetTemplate, V8TestInterface::derefObject, 0, 0 };
namespace TestInterfaceInternal {
@@ -87,7 +87,8 @@ v8::Handle<v8::Object> V8TestInterface::wrapSlow(TestInterface* impl)
return wrapper;
impl->ref();
- getDOMObjectMap().set(impl, v8::Persistent<v8::Object>::New(wrapper));
+ v8::Persistent<v8::Object> wrapperHandle = v8::Persistent<v8::Object>::New(wrapper);
+ getDOMObjectMap().set(impl, wrapperHandle);
return wrapper;
}
diff --git a/Source/WebCore/bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp b/Source/WebCore/bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp
index ab9e6db..6d71ea7 100644
--- a/Source/WebCore/bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp
+++ b/Source/WebCore/bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp
@@ -33,7 +33,7 @@
namespace WebCore {
-WrapperTypeInfo V8TestMediaQueryListListener::info = { V8TestMediaQueryListListener::GetTemplate, V8TestMediaQueryListListener::derefObject, 0 };
+WrapperTypeInfo V8TestMediaQueryListListener::info = { V8TestMediaQueryListListener::GetTemplate, V8TestMediaQueryListListener::derefObject, 0, 0 };
namespace TestMediaQueryListListenerInternal {
@@ -94,7 +94,8 @@ v8::Handle<v8::Object> V8TestMediaQueryListListener::wrapSlow(TestMediaQueryList
return wrapper;
impl->ref();
- getDOMObjectMap().set(impl, v8::Persistent<v8::Object>::New(wrapper));
+ v8::Persistent<v8::Object> wrapperHandle = v8::Persistent<v8::Object>::New(wrapper);
+ getDOMObjectMap().set(impl, wrapperHandle);
return wrapper;
}
diff --git a/Source/WebCore/bindings/scripts/test/V8/V8TestObj.cpp b/Source/WebCore/bindings/scripts/test/V8/V8TestObj.cpp
index 4298756..5884e89 100644
--- a/Source/WebCore/bindings/scripts/test/V8/V8TestObj.cpp
+++ b/Source/WebCore/bindings/scripts/test/V8/V8TestObj.cpp
@@ -46,7 +46,7 @@
namespace WebCore {
-WrapperTypeInfo V8TestObj::info = { V8TestObj::GetTemplate, V8TestObj::derefObject, 0 };
+WrapperTypeInfo V8TestObj::info = { V8TestObj::GetTemplate, V8TestObj::derefObject, 0, 0 };
namespace TestObjInternal {
@@ -1380,7 +1380,8 @@ v8::Handle<v8::Object> V8TestObj::wrapSlow(TestObj* impl)
return wrapper;
impl->ref();
- getDOMObjectMap().set(impl, v8::Persistent<v8::Object>::New(wrapper));
+ v8::Persistent<v8::Object> wrapperHandle = v8::Persistent<v8::Object>::New(wrapper);
+ getDOMObjectMap().set(impl, wrapperHandle);
return wrapper;
}
diff --git a/Source/WebCore/bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp b/Source/WebCore/bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp
index fef8dbd..c6cc4d6 100644
--- a/Source/WebCore/bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp
+++ b/Source/WebCore/bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp
@@ -34,7 +34,7 @@
namespace WebCore {
-WrapperTypeInfo V8TestSerializedScriptValueInterface::info = { V8TestSerializedScriptValueInterface::GetTemplate, V8TestSerializedScriptValueInterface::derefObject, 0 };
+WrapperTypeInfo V8TestSerializedScriptValueInterface::info = { V8TestSerializedScriptValueInterface::GetTemplate, V8TestSerializedScriptValueInterface::derefObject, 0, 0 };
namespace TestSerializedScriptValueInterfaceInternal {
@@ -83,7 +83,8 @@ v8::Handle<v8::Object> V8TestSerializedScriptValueInterface::wrapSlow(TestSerial
impl->ref();
SerializedScriptValue::deserializeAndSetProperty(wrapper, "value", static_cast<v8::PropertyAttribute>(v8::DontDelete | v8::ReadOnly), impl->value());
- getDOMObjectMap().set(impl, v8::Persistent<v8::Object>::New(wrapper));
+ v8::Persistent<v8::Object> wrapperHandle = v8::Persistent<v8::Object>::New(wrapper);
+ getDOMObjectMap().set(impl, wrapperHandle);
return wrapper;
}