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

Side by Side 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 16 matching lines...) Expand all
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 // This file has been auto-generated by code_generator_v8.pm. DO NOT MODIFY! 31 // This file has been auto-generated by code_generator_v8.pm. DO NOT MODIFY!
32 32
33 #include "config.h" 33 #include "config.h"
34 #include "V8TestCallbackInterface.h" 34 #include "V8TestCallbackInterface.h"
35 35
36 #include "V8TestInterfaceEmpty.h" 36 #include "V8TestInterfaceEmpty.h"
37 #include "V8TestInterfaceWillBeGarbageCollected.h"
37 #include "bindings/v8/V8Binding.h" 38 #include "bindings/v8/V8Binding.h"
38 #include "bindings/v8/V8Callback.h" 39 #include "bindings/v8/V8Callback.h"
39 #include "core/dom/ExecutionContext.h" 40 #include "core/dom/ExecutionContext.h"
40 #include "wtf/Assertions.h" 41 #include "wtf/Assertions.h"
41 #include "wtf/GetPtr.h" 42 #include "wtf/GetPtr.h"
42 #include "wtf/RefPtr.h" 43 #include "wtf/RefPtr.h"
43 44
44 namespace WebCore { 45 namespace WebCore {
45 46
46 V8TestCallbackInterface::V8TestCallbackInterface(v8::Handle<v8::Function> callba ck, ExecutionContext* context) 47 V8TestCallbackInterface::V8TestCallbackInterface(v8::Handle<v8::Function> callba ck, ExecutionContext* context)
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 if (stringArgHandle.IsEmpty()) { 234 if (stringArgHandle.IsEmpty()) {
234 if (!isScriptControllerTerminating()) 235 if (!isScriptControllerTerminating())
235 CRASH(); 236 CRASH();
236 return; 237 return;
237 } 238 }
238 v8::Handle<v8::Value> argv[] = { stringArgHandle }; 239 v8::Handle<v8::Value> argv[] = { stringArgHandle };
239 240
240 invokeCallback(m_callback.newLocal(m_isolate), v8::Handle<v8::Object>::Cast( thisHandle), 1, argv, executionContext(), m_isolate); 241 invokeCallback(m_callback.newLocal(m_isolate), v8::Handle<v8::Object>::Cast( thisHandle), 1, argv, executionContext(), m_isolate);
241 } 242 }
242 243
244 void V8TestCallbackInterface::voidMethodWillBeGarbageCollectedSequenceArg(const WillBeHeapVector<RefPtrWillBeMember<TestInterfaceWillBeGarbageCollected> >& sequ enceArg)
245 {
246 if (!canInvokeCallback())
247 return;
248
249 v8::HandleScope handleScope(m_isolate);
250
251 v8::Handle<v8::Context> v8Context = toV8Context(executionContext(), m_world. get());
252 if (v8Context.IsEmpty())
253 return;
254
255 v8::Context::Scope scope(v8Context);
256 v8::Handle<v8::Value> sequenceArgHandle = v8Array(sequenceArg, m_isolate);
257 if (sequenceArgHandle.IsEmpty()) {
258 if (!isScriptControllerTerminating())
259 CRASH();
260 return;
261 }
262 v8::Handle<v8::Value> argv[] = { sequenceArgHandle };
263
264 invokeCallback(m_callback.newLocal(m_isolate), 1, argv, executionContext(), m_isolate);
265 }
266
267 void V8TestCallbackInterface::voidMethodWillBeGarbageCollectedArrayArg(const Wil lBeHeapVector<RefPtrWillBeMember<TestInterfaceWillBeGarbageCollected> >& arrayAr g)
268 {
269 if (!canInvokeCallback())
270 return;
271
272 v8::HandleScope handleScope(m_isolate);
273
274 v8::Handle<v8::Context> v8Context = toV8Context(executionContext(), m_world. get());
275 if (v8Context.IsEmpty())
276 return;
277
278 v8::Context::Scope scope(v8Context);
279 v8::Handle<v8::Value> arrayArgHandle = v8Array(arrayArg, m_isolate);
280 if (arrayArgHandle.IsEmpty()) {
281 if (!isScriptControllerTerminating())
282 CRASH();
283 return;
284 }
285 v8::Handle<v8::Value> argv[] = { arrayArgHandle };
286
287 invokeCallback(m_callback.newLocal(m_isolate), 1, argv, executionContext(), m_isolate);
288 }
289
243 } // namespace WebCore 290 } // namespace WebCore
OLDNEW
« 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