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

Side by Side Diff: Source/bindings/tests/results/V8TestObjectPython.cpp

Issue 115873003: EventHandler getters return RefPtr<EventListener> (not v8::Handle<v8::Value>) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years 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 | Annotate | Revision Log
« no previous file with comments | « Source/bindings/tests/results/V8TestObject.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1338 matching lines...) Expand 10 before | Expand all | Expand 10 after
1349 static void staticLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8 ::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 1349 static void staticLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8 ::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1350 { 1350 {
1351 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 1351 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1352 TestObjectPythonV8Internal::staticLongAttributeAttributeSetter(jsValue, info ); 1352 TestObjectPythonV8Internal::staticLongAttributeAttributeSetter(jsValue, info );
1353 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1353 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1354 } 1354 }
1355 1355
1356 static void eventHandlerAttributeAttributeGetter(const v8::PropertyCallbackInfo< v8::Value>& info) 1356 static void eventHandlerAttributeAttributeGetter(const v8::PropertyCallbackInfo< v8::Value>& info)
1357 { 1357 {
1358 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); 1358 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1359 EventListener* jsValue = imp->eventHandlerAttribute(isolatedWorldForIsolate( info.GetIsolate())); 1359 RefPtr<EventListener> listener = imp->eventHandlerAttribute(isolatedWorldFor Isolate(info.GetIsolate()));
1360 v8SetReturnValue(info, jsValue ? v8::Handle<v8::Value>(V8AbstractEventListen er::cast(jsValue)->getListenerObject(imp->executionContext())) : v8::Handle<v8:: Value>(v8::Null(info.GetIsolate()))); 1360 v8SetReturnValue(info, listener);
1361 } 1361 }
1362 1362
1363 static void eventHandlerAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 1363 static void eventHandlerAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1364 { 1364 {
1365 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 1365 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1366 TestObjectPythonV8Internal::eventHandlerAttributeAttributeGetter(info); 1366 TestObjectPythonV8Internal::eventHandlerAttributeAttributeGetter(info);
1367 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1367 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1368 } 1368 }
1369 1369
1370 static void eventHandlerAttributeAttributeSetter(v8::Local<v8::Value> jsValue, c onst v8::PropertyCallbackInfo<void>& info) 1370 static void eventHandlerAttributeAttributeSetter(v8::Local<v8::Value> jsValue, c onst v8::PropertyCallbackInfo<void>& info)
(...skipping 5182 matching lines...) Expand 10 before | Expand all | Expand 10 after
6553 fromInternalPointer(object)->deref(); 6553 fromInternalPointer(object)->deref();
6554 } 6554 }
6555 6555
6556 template<> 6556 template<>
6557 v8::Handle<v8::Value> toV8NoInline(TestObjectPython* impl, v8::Handle<v8::Object > creationContext, v8::Isolate* isolate) 6557 v8::Handle<v8::Value> toV8NoInline(TestObjectPython* impl, v8::Handle<v8::Object > creationContext, v8::Isolate* isolate)
6558 { 6558 {
6559 return toV8(impl, creationContext, isolate); 6559 return toV8(impl, creationContext, isolate);
6560 } 6560 }
6561 6561
6562 } // namespace WebCore 6562 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/tests/results/V8TestObject.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698