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

Side by Side Diff: Source/bindings/tests/results/V8TestInterface.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
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 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 static void implementsNodeAttributeSetterCallback(v8::Local<v8::String>, v8::Loc al<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 194 static void implementsNodeAttributeSetterCallback(v8::Local<v8::String>, v8::Loc al<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
195 { 195 {
196 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 196 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
197 TestInterfaceV8Internal::implementsNodeAttributeSetter(jsValue, info); 197 TestInterfaceV8Internal::implementsNodeAttributeSetter(jsValue, info);
198 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 198 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
199 } 199 }
200 200
201 static void eventHandlerAttributeAttributeGetter(const v8::PropertyCallbackInfo< v8::Value>& info) 201 static void eventHandlerAttributeAttributeGetter(const v8::PropertyCallbackInfo< v8::Value>& info)
202 { 202 {
203 TestInterface* imp = V8TestInterface::toNative(info.Holder()); 203 TestInterface* imp = V8TestInterface::toNative(info.Holder());
204 EventListener* jsValue = TestImplements::eventHandlerAttribute(imp, isolated WorldForIsolate(info.GetIsolate())); 204 RefPtr<EventListener> listener = TestImplements::eventHandlerAttribute(imp, isolatedWorldForIsolate(info.GetIsolate()));
205 v8SetReturnValue(info, jsValue ? v8::Handle<v8::Value>(V8AbstractEventListen er::cast(jsValue)->getListenerObject(imp->executionContext())) : v8::Handle<v8:: Value>(v8::Null(info.GetIsolate()))); 205 v8SetReturnValue(info, listener);
206 } 206 }
207 207
208 static void eventHandlerAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 208 static void eventHandlerAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
209 { 209 {
210 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 210 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
211 TestInterfaceV8Internal::eventHandlerAttributeAttributeGetter(info); 211 TestInterfaceV8Internal::eventHandlerAttributeAttributeGetter(info);
212 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 212 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
213 } 213 }
214 214
215 static void eventHandlerAttributeAttributeSetter(v8::Local<v8::Value> jsValue, c onst v8::PropertyCallbackInfo<void>& info) 215 static void eventHandlerAttributeAttributeSetter(v8::Local<v8::Value> jsValue, c onst v8::PropertyCallbackInfo<void>& info)
(...skipping 766 matching lines...) Expand 10 before | Expand all | Expand 10 after
982 } 982 }
983 983
984 template<> 984 template<>
985 v8::Handle<v8::Value> toV8NoInline(TestInterface* impl, v8::Handle<v8::Object> c reationContext, v8::Isolate* isolate) 985 v8::Handle<v8::Value> toV8NoInline(TestInterface* impl, v8::Handle<v8::Object> c reationContext, v8::Isolate* isolate)
986 { 986 {
987 return toV8(impl, creationContext, isolate); 987 return toV8(impl, creationContext, isolate);
988 } 988 }
989 989
990 } // namespace WebCore 990 } // namespace WebCore
991 #endif // ENABLE(Condition1) || ENABLE(Condition2) 991 #endif // ENABLE(Condition1) || ENABLE(Condition2)
OLDNEW
« no previous file with comments | « Source/bindings/scripts/code_generator_v8.pm ('k') | Source/bindings/tests/results/V8TestObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698