| Index: Source/bindings/tests/results/V8TestCallbackInterface.cpp
|
| diff --git a/Source/bindings/tests/results/V8TestCallbackInterface.cpp b/Source/bindings/tests/results/V8TestCallbackInterface.cpp
|
| index 9605c1478ee091aef1803816bae512e2615ed366..452b1fcc55ac918fae8e7e78768ef9a638519ec4 100644
|
| --- a/Source/bindings/tests/results/V8TestCallbackInterface.cpp
|
| +++ b/Source/bindings/tests/results/V8TestCallbackInterface.cpp
|
| @@ -34,6 +34,7 @@
|
| #include "V8TestCallbackInterface.h"
|
|
|
| #include "V8TestInterfaceEmpty.h"
|
| +#include "V8TestInterfaceWillBeGarbageCollected.h"
|
| #include "bindings/v8/V8Binding.h"
|
| #include "bindings/v8/V8Callback.h"
|
| #include "core/dom/ExecutionContext.h"
|
| @@ -240,4 +241,50 @@ void V8TestCallbackInterface::callbackWithThisValueVoidMethodStringArg(ScriptVal
|
| invokeCallback(m_callback.newLocal(m_isolate), v8::Handle<v8::Object>::Cast(thisHandle), 1, argv, executionContext(), m_isolate);
|
| }
|
|
|
| +void V8TestCallbackInterface::voidMethodWillBeGarbageCollectedSequenceArg(const WillBeHeapVector<RefPtrWillBeMember<TestInterfaceWillBeGarbageCollected> >& sequenceArg)
|
| +{
|
| + if (!canInvokeCallback())
|
| + return;
|
| +
|
| + v8::HandleScope handleScope(m_isolate);
|
| +
|
| + v8::Handle<v8::Context> v8Context = toV8Context(executionContext(), m_world.get());
|
| + if (v8Context.IsEmpty())
|
| + return;
|
| +
|
| + v8::Context::Scope scope(v8Context);
|
| + v8::Handle<v8::Value> sequenceArgHandle = v8Array(sequenceArg, m_isolate);
|
| + if (sequenceArgHandle.IsEmpty()) {
|
| + if (!isScriptControllerTerminating())
|
| + CRASH();
|
| + return;
|
| + }
|
| + v8::Handle<v8::Value> argv[] = { sequenceArgHandle };
|
| +
|
| + invokeCallback(m_callback.newLocal(m_isolate), 1, argv, executionContext(), m_isolate);
|
| +}
|
| +
|
| +void V8TestCallbackInterface::voidMethodWillBeGarbageCollectedArrayArg(const WillBeHeapVector<RefPtrWillBeMember<TestInterfaceWillBeGarbageCollected> >& arrayArg)
|
| +{
|
| + if (!canInvokeCallback())
|
| + return;
|
| +
|
| + v8::HandleScope handleScope(m_isolate);
|
| +
|
| + v8::Handle<v8::Context> v8Context = toV8Context(executionContext(), m_world.get());
|
| + if (v8Context.IsEmpty())
|
| + return;
|
| +
|
| + v8::Context::Scope scope(v8Context);
|
| + v8::Handle<v8::Value> arrayArgHandle = v8Array(arrayArg, m_isolate);
|
| + if (arrayArgHandle.IsEmpty()) {
|
| + if (!isScriptControllerTerminating())
|
| + CRASH();
|
| + return;
|
| + }
|
| + v8::Handle<v8::Value> argv[] = { arrayArgHandle };
|
| +
|
| + invokeCallback(m_callback.newLocal(m_isolate), 1, argv, executionContext(), m_isolate);
|
| +}
|
| +
|
| } // namespace WebCore
|
|
|