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

Side by Side Diff: Source/bindings/tests/results/V8TestInterfaceWillBeGarbageCollected.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 "V8TestInterfaceWillBeGarbageCollected.h" 8 #include "V8TestInterfaceWillBeGarbageCollected.h"
9 9
10 #include "RuntimeEnabledFeatures.h" 10 #include "RuntimeEnabledFeatures.h"
(...skipping 27 matching lines...) Expand all
38 38
39 namespace WebCore { 39 namespace WebCore {
40 const WrapperTypeInfo V8TestInterfaceWillBeGarbageCollected::wrapperTypeInfo = { gin::kEmbedderBlink, V8TestInterfaceWillBeGarbageCollected::domTemplate, V8Test InterfaceWillBeGarbageCollected::derefObject, 0, V8TestInterfaceWillBeGarbageCol lected::toEventTarget, 0, V8TestInterfaceWillBeGarbageCollected::installPerConte xtEnabledMethods, &V8EventTarget::wrapperTypeInfo, WrapperTypeObjectPrototype, t rue }; 40 const WrapperTypeInfo V8TestInterfaceWillBeGarbageCollected::wrapperTypeInfo = { gin::kEmbedderBlink, V8TestInterfaceWillBeGarbageCollected::domTemplate, V8Test InterfaceWillBeGarbageCollected::derefObject, 0, V8TestInterfaceWillBeGarbageCol lected::toEventTarget, 0, V8TestInterfaceWillBeGarbageCollected::installPerConte xtEnabledMethods, &V8EventTarget::wrapperTypeInfo, WrapperTypeObjectPrototype, t rue };
41 41
42 namespace TestInterfaceWillBeGarbageCollectedV8Internal { 42 namespace TestInterfaceWillBeGarbageCollectedV8Internal {
43 43
44 template <typename T> void V8_USE(T) { } 44 template <typename T> void V8_USE(T) { }
45 45
46 static void attr1AttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info ) 46 static void attr1AttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info )
47 { 47 {
48 TestInterfaceWillBeGarbageCollected* impl = V8TestInterfaceWillBeGarbageColl ected::toNative(info.Holder()); 48 v8::Handle<v8::Object> holder = info.Holder();
49 TestInterfaceWillBeGarbageCollected* impl = V8TestInterfaceWillBeGarbageColl ected::toNative(holder);
49 v8SetReturnValueFast(info, WTF::getPtr(impl->attr1()), impl); 50 v8SetReturnValueFast(info, WTF::getPtr(impl->attr1()), impl);
50 } 51 }
51 52
52 static void attr1AttributeGetterCallback(v8::Local<v8::String>, const v8::Proper tyCallbackInfo<v8::Value>& info) 53 static void attr1AttributeGetterCallback(v8::Local<v8::String>, const v8::Proper tyCallbackInfo<v8::Value>& info)
53 { 54 {
54 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 55 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
55 TestInterfaceWillBeGarbageCollectedV8Internal::attr1AttributeGetter(info); 56 TestInterfaceWillBeGarbageCollectedV8Internal::attr1AttributeGetter(info);
56 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 57 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
57 } 58 }
58 59
59 static void attr1AttributeSetter(v8::Local<v8::Value> jsValue, const v8::Propert yCallbackInfo<void>& info) 60 static void attr1AttributeSetter(v8::Local<v8::Value> jsValue, const v8::Propert yCallbackInfo<void>& info)
60 { 61 {
61 TestInterfaceWillBeGarbageCollected* impl = V8TestInterfaceWillBeGarbageColl ected::toNative(info.Holder()); 62 v8::Handle<v8::Object> holder = info.Holder();
63 TestInterfaceWillBeGarbageCollected* impl = V8TestInterfaceWillBeGarbageColl ected::toNative(holder);
62 V8TRYCATCH_VOID(TestInterfaceWillBeGarbageCollected*, cppValue, V8TestInterf aceWillBeGarbageCollected::toNativeWithTypeCheck(info.GetIsolate(), jsValue)); 64 V8TRYCATCH_VOID(TestInterfaceWillBeGarbageCollected*, cppValue, V8TestInterf aceWillBeGarbageCollected::toNativeWithTypeCheck(info.GetIsolate(), jsValue));
63 impl->setAttr1(WTF::getPtr(cppValue)); 65 impl->setAttr1(WTF::getPtr(cppValue));
64 } 66 }
65 67
66 static void attr1AttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Va lue> jsValue, const v8::PropertyCallbackInfo<void>& info) 68 static void attr1AttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Va lue> jsValue, const v8::PropertyCallbackInfo<void>& info)
67 { 69 {
68 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 70 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
69 TestInterfaceWillBeGarbageCollectedV8Internal::attr1AttributeSetter(jsValue, info); 71 TestInterfaceWillBeGarbageCollectedV8Internal::attr1AttributeSetter(jsValue, info);
70 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 72 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
71 } 73 }
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 #endif // !ENABLE(OILPAN) 211 #endif // !ENABLE(OILPAN)
210 } 212 }
211 213
212 template<> 214 template<>
213 v8::Handle<v8::Value> toV8NoInline(TestInterfaceWillBeGarbageCollected* impl, v8 ::Handle<v8::Object> creationContext, v8::Isolate* isolate) 215 v8::Handle<v8::Value> toV8NoInline(TestInterfaceWillBeGarbageCollected* impl, v8 ::Handle<v8::Object> creationContext, v8::Isolate* isolate)
214 { 216 {
215 return toV8(impl, creationContext, isolate); 217 return toV8(impl, creationContext, isolate);
216 } 218 }
217 219
218 } // namespace WebCore 220 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/tests/results/V8TestInterfacePython.cpp ('k') | Source/bindings/tests/results/V8TestNode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698