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

Side by Side Diff: Source/bindings/tests/results/V8TestNode.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 "V8TestNode.h" 8 #include "V8TestNode.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 V8TestNode::wrapperTypeInfo = { gin::kEmbedderBlink, V8Tes tNode::domTemplate, V8TestNode::derefObject, 0, V8TestNode::toEventTarget, 0, V8 TestNode::installPerContextEnabledMethods, &V8Node::wrapperTypeInfo, WrapperType ObjectPrototype, false }; 40 const WrapperTypeInfo V8TestNode::wrapperTypeInfo = { gin::kEmbedderBlink, V8Tes tNode::domTemplate, V8TestNode::derefObject, 0, V8TestNode::toEventTarget, 0, V8 TestNode::installPerContextEnabledMethods, &V8Node::wrapperTypeInfo, WrapperType ObjectPrototype, false };
41 41
42 namespace TestNodeV8Internal { 42 namespace TestNodeV8Internal {
43 43
44 template <typename T> void V8_USE(T) { } 44 template <typename T> void V8_USE(T) { }
45 45
46 static void hrefAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) 46 static void hrefAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
47 { 47 {
48 TestNode* impl = V8TestNode::toNative(info.Holder()); 48 v8::Handle<v8::Object> holder = info.Holder();
49 TestNode* impl = V8TestNode::toNative(holder);
49 v8SetReturnValueString(info, impl->href(), info.GetIsolate()); 50 v8SetReturnValueString(info, impl->href(), info.GetIsolate());
50 } 51 }
51 52
52 static void hrefAttributeGetterCallback(v8::Local<v8::String>, const v8::Propert yCallbackInfo<v8::Value>& info) 53 static void hrefAttributeGetterCallback(v8::Local<v8::String>, const v8::Propert yCallbackInfo<v8::Value>& info)
53 { 54 {
54 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 55 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
55 TestNodeV8Internal::hrefAttributeGetter(info); 56 TestNodeV8Internal::hrefAttributeGetter(info);
56 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 57 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
57 } 58 }
58 59
59 static void hrefAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Property CallbackInfo<void>& info) 60 static void hrefAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Property CallbackInfo<void>& info)
60 { 61 {
61 TestNode* impl = V8TestNode::toNative(info.Holder()); 62 v8::Handle<v8::Object> holder = info.Holder();
63 TestNode* impl = V8TestNode::toNative(holder);
62 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); 64 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue);
63 impl->setHref(cppValue); 65 impl->setHref(cppValue);
64 } 66 }
65 67
66 static void hrefAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Val ue> jsValue, const v8::PropertyCallbackInfo<void>& info) 68 static void hrefAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Val ue> 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 TestNodeV8Internal::hrefAttributeSetter(jsValue, info); 71 TestNodeV8Internal::hrefAttributeSetter(jsValue, info);
70 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 72 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
71 } 73 }
72 74
73 static void hrefThrowsAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) 75 static void hrefThrowsAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
74 { 76 {
75 TestNode* impl = V8TestNode::toNative(info.Holder()); 77 v8::Handle<v8::Object> holder = info.Holder();
78 TestNode* impl = V8TestNode::toNative(holder);
76 v8SetReturnValueString(info, impl->hrefThrows(), info.GetIsolate()); 79 v8SetReturnValueString(info, impl->hrefThrows(), info.GetIsolate());
77 } 80 }
78 81
79 static void hrefThrowsAttributeGetterCallback(v8::Local<v8::String>, const v8::P ropertyCallbackInfo<v8::Value>& info) 82 static void hrefThrowsAttributeGetterCallback(v8::Local<v8::String>, const v8::P ropertyCallbackInfo<v8::Value>& info)
80 { 83 {
81 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 84 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
82 TestNodeV8Internal::hrefThrowsAttributeGetter(info); 85 TestNodeV8Internal::hrefThrowsAttributeGetter(info);
83 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 86 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
84 } 87 }
85 88
86 static void hrefThrowsAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Pr opertyCallbackInfo<void>& info) 89 static void hrefThrowsAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Pr opertyCallbackInfo<void>& info)
87 { 90 {
88 ExceptionState exceptionState(ExceptionState::SetterContext, "hrefThrows", " TestNode", info.Holder(), info.GetIsolate()); 91 v8::Handle<v8::Object> holder = info.Holder();
89 TestNode* impl = V8TestNode::toNative(info.Holder()); 92 ExceptionState exceptionState(ExceptionState::SetterContext, "hrefThrows", " TestNode", holder, info.GetIsolate());
93 TestNode* impl = V8TestNode::toNative(holder);
90 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); 94 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue);
91 impl->setHrefThrows(cppValue, exceptionState); 95 impl->setHrefThrows(cppValue, exceptionState);
92 exceptionState.throwIfNeeded(); 96 exceptionState.throwIfNeeded();
93 } 97 }
94 98
95 static void hrefThrowsAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v 8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 99 static void hrefThrowsAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v 8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
96 { 100 {
97 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 101 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
98 TestNodeV8Internal::hrefThrowsAttributeSetter(jsValue, info); 102 TestNodeV8Internal::hrefThrowsAttributeSetter(jsValue, info);
99 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 103 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
100 } 104 }
101 105
102 static void hrefCallWithAttributeGetter(const v8::PropertyCallbackInfo<v8::Value >& info) 106 static void hrefCallWithAttributeGetter(const v8::PropertyCallbackInfo<v8::Value >& info)
103 { 107 {
104 TestNode* impl = V8TestNode::toNative(info.Holder()); 108 v8::Handle<v8::Object> holder = info.Holder();
109 TestNode* impl = V8TestNode::toNative(holder);
105 v8SetReturnValueString(info, impl->hrefCallWith(), info.GetIsolate()); 110 v8SetReturnValueString(info, impl->hrefCallWith(), info.GetIsolate());
106 } 111 }
107 112
108 static void hrefCallWithAttributeGetterCallback(v8::Local<v8::String>, const v8: :PropertyCallbackInfo<v8::Value>& info) 113 static void hrefCallWithAttributeGetterCallback(v8::Local<v8::String>, const v8: :PropertyCallbackInfo<v8::Value>& info)
109 { 114 {
110 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 115 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
111 TestNodeV8Internal::hrefCallWithAttributeGetter(info); 116 TestNodeV8Internal::hrefCallWithAttributeGetter(info);
112 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 117 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
113 } 118 }
114 119
115 static void hrefCallWithAttributeSetter(v8::Local<v8::Value> jsValue, const v8:: PropertyCallbackInfo<void>& info) 120 static void hrefCallWithAttributeSetter(v8::Local<v8::Value> jsValue, const v8:: PropertyCallbackInfo<void>& info)
116 { 121 {
117 TestNode* impl = V8TestNode::toNative(info.Holder()); 122 v8::Handle<v8::Object> holder = info.Holder();
123 TestNode* impl = V8TestNode::toNative(holder);
118 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); 124 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue);
119 impl->setHrefCallWith(callingDOMWindow(info.GetIsolate()), enteredDOMWindow( info.GetIsolate()), cppValue); 125 impl->setHrefCallWith(callingDOMWindow(info.GetIsolate()), enteredDOMWindow( info.GetIsolate()), cppValue);
120 } 126 }
121 127
122 static void hrefCallWithAttributeSetterCallback(v8::Local<v8::String>, v8::Local <v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 128 static void hrefCallWithAttributeSetterCallback(v8::Local<v8::String>, v8::Local <v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
123 { 129 {
124 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 130 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
125 TestNodeV8Internal::hrefCallWithAttributeSetter(jsValue, info); 131 TestNodeV8Internal::hrefCallWithAttributeSetter(jsValue, info);
126 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 132 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
127 } 133 }
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 fromInternalPointer(object)->deref(); 244 fromInternalPointer(object)->deref();
239 } 245 }
240 246
241 template<> 247 template<>
242 v8::Handle<v8::Value> toV8NoInline(TestNode* impl, v8::Handle<v8::Object> creati onContext, v8::Isolate* isolate) 248 v8::Handle<v8::Value> toV8NoInline(TestNode* impl, v8::Handle<v8::Object> creati onContext, v8::Isolate* isolate)
243 { 249 {
244 return toV8(impl, creationContext, isolate); 250 return toV8(impl, creationContext, isolate);
245 } 251 }
246 252
247 } // namespace WebCore 253 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698