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

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

Issue 214143003: Bindings: use |holder| local variable in attribute getters and setters (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY! 5 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY!
6 6
7 #include "config.h" 7 #include "config.h"
8 #include "V8SVGTestInterface.h" 8 #include "V8SVGTestInterface.h"
9 9
10 #include "RuntimeEnabledFeatures.h" 10 #include "RuntimeEnabledFeatures.h"
(...skipping 28 matching lines...) Expand all
39 39
40 namespace WebCore { 40 namespace WebCore {
41 const WrapperTypeInfo V8SVGTestInterface::wrapperTypeInfo = { gin::kEmbedderBlin k, V8SVGTestInterface::domTemplate, V8SVGTestInterface::derefObject, 0, 0, 0, V8 SVGTestInterface::installPerContextEnabledMethods, 0, WrapperTypeObjectPrototype , false }; 41 const WrapperTypeInfo V8SVGTestInterface::wrapperTypeInfo = { gin::kEmbedderBlin k, V8SVGTestInterface::domTemplate, V8SVGTestInterface::derefObject, 0, 0, 0, V8 SVGTestInterface::installPerContextEnabledMethods, 0, WrapperTypeObjectPrototype , false };
42 42
43 namespace SVGTestInterfaceV8Internal { 43 namespace SVGTestInterfaceV8Internal {
44 44
45 template <typename T> void V8_USE(T) { } 45 template <typename T> void V8_USE(T) { }
46 46
47 static void typeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) 47 static void typeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
48 { 48 {
49 SVGTestInterface* impl = V8SVGTestInterface::toNative(info.Holder()); 49 v8::Handle<v8::Object> holder = info.Holder();
50 SVGTestInterface* impl = V8SVGTestInterface::toNative(holder);
50 v8SetReturnValueString(info, impl->fastGetAttribute(SVGNames::typeAttr), inf o.GetIsolate()); 51 v8SetReturnValueString(info, impl->fastGetAttribute(SVGNames::typeAttr), inf o.GetIsolate());
51 } 52 }
52 53
53 static void typeAttributeGetterCallback(v8::Local<v8::String>, const v8::Propert yCallbackInfo<v8::Value>& info) 54 static void typeAttributeGetterCallback(v8::Local<v8::String>, const v8::Propert yCallbackInfo<v8::Value>& info)
54 { 55 {
55 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 56 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
56 SVGTestInterfaceV8Internal::typeAttributeGetter(info); 57 SVGTestInterfaceV8Internal::typeAttributeGetter(info);
57 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 58 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
58 } 59 }
59 60
60 static void typeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Property CallbackInfo<void>& info) 61 static void typeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Property CallbackInfo<void>& info)
61 { 62 {
62 SVGTestInterface* impl = V8SVGTestInterface::toNative(info.Holder()); 63 v8::Handle<v8::Object> holder = info.Holder();
64 SVGTestInterface* impl = V8SVGTestInterface::toNative(holder);
63 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); 65 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue);
64 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; 66 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
65 impl->setAttribute(SVGNames::typeAttr, cppValue); 67 impl->setAttribute(SVGNames::typeAttr, cppValue);
66 } 68 }
67 69
68 static void typeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Val ue> jsValue, const v8::PropertyCallbackInfo<void>& info) 70 static void typeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Val ue> jsValue, const v8::PropertyCallbackInfo<void>& info)
69 { 71 {
70 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 72 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
71 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; 73 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
72 SVGTestInterfaceV8Internal::typeAttributeSetter(jsValue, info); 74 SVGTestInterfaceV8Internal::typeAttributeSetter(jsValue, info);
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 fromInternalPointer(object)->deref(); 152 fromInternalPointer(object)->deref();
151 } 153 }
152 154
153 template<> 155 template<>
154 v8::Handle<v8::Value> toV8NoInline(SVGTestInterface* impl, v8::Handle<v8::Object > creationContext, v8::Isolate* isolate) 156 v8::Handle<v8::Value> toV8NoInline(SVGTestInterface* impl, v8::Handle<v8::Object > creationContext, v8::Isolate* isolate)
155 { 157 {
156 return toV8(impl, creationContext, isolate); 158 return toV8(impl, creationContext, isolate);
157 } 159 }
158 160
159 } // namespace WebCore 161 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/templates/attributes.cpp ('k') | Source/bindings/tests/results/V8TestException.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698