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

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

Issue 353973002: IDL: fix code generation for attributes with [PutForwards] (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: the fix Created 6 years, 6 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
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 "bindings/v8/ExceptionState.h" 10 #include "bindings/v8/ExceptionState.h"
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 115 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
116 TestNodeV8Internal::hrefCallWithAttributeGetter(info); 116 TestNodeV8Internal::hrefCallWithAttributeGetter(info);
117 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 117 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
118 } 118 }
119 119
120 static void hrefCallWithAttributeSetter(v8::Local<v8::Value> v8Value, const v8:: PropertyCallbackInfo<void>& info) 120 static void hrefCallWithAttributeSetter(v8::Local<v8::Value> v8Value, const v8:: PropertyCallbackInfo<void>& info)
121 { 121 {
122 v8::Handle<v8::Object> holder = info.Holder(); 122 v8::Handle<v8::Object> holder = info.Holder();
123 TestNode* impl = V8TestNode::toNative(holder); 123 TestNode* impl = V8TestNode::toNative(holder);
124 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); 124 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value);
125 impl->setHrefCallWith(callingDOMWindow(info.GetIsolate()), enteredDOMWindow( info.GetIsolate()), cppValue); 125 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
126 impl->setHrefCallWith(executionContext, callingDOMWindow(info.GetIsolate()), enteredDOMWindow(info.GetIsolate()), cppValue);
126 } 127 }
127 128
128 static void hrefCallWithAttributeSetterCallback(v8::Local<v8::String>, v8::Local <v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) 129 static void hrefCallWithAttributeSetterCallback(v8::Local<v8::String>, v8::Local <v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
129 { 130 {
130 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 131 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
131 TestNodeV8Internal::hrefCallWithAttributeSetter(v8Value, info); 132 TestNodeV8Internal::hrefCallWithAttributeSetter(v8Value, info);
132 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 133 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
133 } 134 }
134 135
136 static void hrefByteStringAttributeGetter(const v8::PropertyCallbackInfo<v8::Val ue>& info)
137 {
138 v8::Handle<v8::Object> holder = info.Holder();
139 TestNode* impl = V8TestNode::toNative(holder);
140 v8SetReturnValueString(info, impl->hrefByteString(), info.GetIsolate());
141 }
142
143 static void hrefByteStringAttributeGetterCallback(v8::Local<v8::String>, const v 8::PropertyCallbackInfo<v8::Value>& info)
144 {
145 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
146 TestNodeV8Internal::hrefByteStringAttributeGetter(info);
147 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
148 }
149
150 static void hrefByteStringAttributeSetter(v8::Local<v8::Value> v8Value, const v8 ::PropertyCallbackInfo<void>& info)
151 {
152 v8::Handle<v8::Object> holder = info.Holder();
153 ExceptionState exceptionState(ExceptionState::SetterContext, "hrefByteString ", "TestNode", holder, info.GetIsolate());
154 TestNode* impl = V8TestNode::toNative(holder);
155 TONATIVE_VOID_EXCEPTIONSTATE(V8StringResource<>, cppValue, toByteString(v8Va lue, exceptionState), exceptionState);
156 impl->setHrefByteString(cppValue);
157 }
158
159 static void hrefByteStringAttributeSetterCallback(v8::Local<v8::String>, v8::Loc al<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
160 {
161 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
162 TestNodeV8Internal::hrefByteStringAttributeSetter(v8Value, info);
163 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
164 }
165
135 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) 166 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info)
136 { 167 {
137 v8::Isolate* isolate = info.GetIsolate(); 168 v8::Isolate* isolate = info.GetIsolate();
138 RefPtrWillBeRawPtr<TestNode> impl = TestNode::create(); 169 RefPtrWillBeRawPtr<TestNode> impl = TestNode::create();
139 170
140 v8::Handle<v8::Object> wrapper = info.Holder(); 171 v8::Handle<v8::Object> wrapper = info.Holder();
141 V8DOMWrapper::associateObjectWithWrapper<V8TestNode>(impl.release(), &V8Test Node::wrapperTypeInfo, wrapper, isolate, WrapperConfiguration::Dependent); 172 V8DOMWrapper::associateObjectWithWrapper<V8TestNode>(impl.release(), &V8Test Node::wrapperTypeInfo, wrapper, isolate, WrapperConfiguration::Dependent);
142 v8SetReturnValue(info, wrapper); 173 v8SetReturnValue(info, wrapper);
143 } 174 }
144 175
145 } // namespace TestNodeV8Internal 176 } // namespace TestNodeV8Internal
146 177
147 static const V8DOMConfiguration::AttributeConfiguration V8TestNodeAttributes[] = { 178 static const V8DOMConfiguration::AttributeConfiguration V8TestNodeAttributes[] = {
148 {"href", TestNodeV8Internal::hrefAttributeGetterCallback, TestNodeV8Internal ::hrefAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAU LT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, 179 {"href", TestNodeV8Internal::hrefAttributeGetterCallback, TestNodeV8Internal ::hrefAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAU LT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
149 {"hrefThrows", TestNodeV8Internal::hrefThrowsAttributeGetterCallback, TestNo deV8Internal::hrefThrowsAttributeSetterCallback, 0, 0, 0, static_cast<v8::Access Control>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on ins tance */}, 180 {"hrefThrows", TestNodeV8Internal::hrefThrowsAttributeGetterCallback, TestNo deV8Internal::hrefThrowsAttributeSetterCallback, 0, 0, 0, static_cast<v8::Access Control>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on ins tance */},
150 {"hrefCallWith", TestNodeV8Internal::hrefCallWithAttributeGetterCallback, Te stNodeV8Internal::hrefCallWithAttributeSetterCallback, 0, 0, 0, static_cast<v8:: AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, 181 {"hrefCallWith", TestNodeV8Internal::hrefCallWithAttributeGetterCallback, Te stNodeV8Internal::hrefCallWithAttributeSetterCallback, 0, 0, 0, static_cast<v8:: AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
182 {"hrefByteString", TestNodeV8Internal::hrefByteStringAttributeGetterCallback , TestNodeV8Internal::hrefByteStringAttributeSetterCallback, 0, 0, 0, static_cas t<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
151 }; 183 };
152 184
153 void V8TestNode::constructorCallback(const v8::FunctionCallbackInfo<v8::Value>& info) 185 void V8TestNode::constructorCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
154 { 186 {
155 TRACE_EVENT_SCOPED_SAMPLING_STATE("blink", "DOMConstructor"); 187 TRACE_EVENT_SCOPED_SAMPLING_STATE("blink", "DOMConstructor");
156 if (!info.IsConstructCall()) { 188 if (!info.IsConstructCall()) {
157 throwTypeError(ExceptionMessages::constructorNotCallableAsFunction("Test Node"), info.GetIsolate()); 189 throwTypeError(ExceptionMessages::constructorNotCallableAsFunction("Test Node"), info.GetIsolate());
158 return; 190 return;
159 } 191 }
160 192
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 #endif // !ENABLE(OILPAN) 276 #endif // !ENABLE(OILPAN)
245 } 277 }
246 278
247 template<> 279 template<>
248 v8::Handle<v8::Value> toV8NoInline(TestNode* impl, v8::Handle<v8::Object> creati onContext, v8::Isolate* isolate) 280 v8::Handle<v8::Value> toV8NoInline(TestNode* impl, v8::Handle<v8::Object> creati onContext, v8::Isolate* isolate)
249 { 281 {
250 return toV8(impl, creationContext, isolate); 282 return toV8(impl, creationContext, isolate);
251 } 283 }
252 284
253 } // namespace WebCore 285 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698