Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(205)

Unified Diff: Source/bindings/tests/results/V8TestCallbackInterface.cpp

Issue 185413023: Oilpan: move Touch related objects to the oilpan heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Avoid MSVC local class member function restriction Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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
« no previous file with comments | « Source/bindings/tests/results/V8TestCallbackInterface.h ('k') | Source/bindings/tests/results/V8TestObjectPython.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698