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

Side by Side Diff: third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceNode.cpp

Issue 2733763003: Reimplement [PutForwards] per spec (Closed)
Patch Set: avoid using v8::Maybe Created 3 years, 7 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. 5 // This file has been auto-generated by code_generator_v8.py.
6 // DO NOT MODIFY! 6 // DO NOT MODIFY!
7 7
8 // This file has been generated from the Jinja2 template in 8 // This file has been generated from the Jinja2 template in
9 // third_party/WebKit/Source/bindings/templates/interface.cpp.tmpl 9 // third_party/WebKit/Source/bindings/templates/interface.cpp.tmpl
10 10
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 TestInterfaceNode* impl = V8TestInterfaceNode::toImpl(holder); 64 TestInterfaceNode* impl = V8TestInterfaceNode::toImpl(holder);
65 65
66 V8SetReturnValueString(info, impl->nodeName(), info.GetIsolate()); 66 V8SetReturnValueString(info, impl->nodeName(), info.GetIsolate());
67 } 67 }
68 68
69 static void nodeNameAttributeSetter(v8::Local<v8::Value> v8Value, const v8::Func tionCallbackInfo<v8::Value>& info) { 69 static void nodeNameAttributeSetter(v8::Local<v8::Value> v8Value, const v8::Func tionCallbackInfo<v8::Value>& info) {
70 v8::Isolate* isolate = info.GetIsolate(); 70 v8::Isolate* isolate = info.GetIsolate();
71 ALLOW_UNUSED_LOCAL(isolate); 71 ALLOW_UNUSED_LOCAL(isolate);
72 72
73 v8::Local<v8::Object> holder = info.Holder(); 73 v8::Local<v8::Object> holder = info.Holder();
74 ALLOW_UNUSED_LOCAL(holder);
75
74 TestInterfaceNode* impl = V8TestInterfaceNode::toImpl(holder); 76 TestInterfaceNode* impl = V8TestInterfaceNode::toImpl(holder);
75 77
76 // Prepare the value to be set. 78 // Prepare the value to be set.
77 V8StringResource<> cppValue = v8Value; 79 V8StringResource<> cppValue = v8Value;
78 if (!cppValue.Prepare()) 80 if (!cppValue.Prepare())
79 return; 81 return;
80 82
81 impl->setNodeName(cppValue); 83 impl->setNodeName(cppValue);
82 } 84 }
83 85
84 static void stringAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Va lue>& info) { 86 static void stringAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Va lue>& info) {
85 v8::Local<v8::Object> holder = info.Holder(); 87 v8::Local<v8::Object> holder = info.Holder();
86 88
87 TestInterfaceNode* impl = V8TestInterfaceNode::toImpl(holder); 89 TestInterfaceNode* impl = V8TestInterfaceNode::toImpl(holder);
88 90
89 V8SetReturnValueString(info, impl->stringAttribute(), info.GetIsolate()); 91 V8SetReturnValueString(info, impl->stringAttribute(), info.GetIsolate());
90 } 92 }
91 93
92 static void stringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v 8::FunctionCallbackInfo<v8::Value>& info) { 94 static void stringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v 8::FunctionCallbackInfo<v8::Value>& info) {
93 v8::Isolate* isolate = info.GetIsolate(); 95 v8::Isolate* isolate = info.GetIsolate();
94 ALLOW_UNUSED_LOCAL(isolate); 96 ALLOW_UNUSED_LOCAL(isolate);
95 97
96 v8::Local<v8::Object> holder = info.Holder(); 98 v8::Local<v8::Object> holder = info.Holder();
99 ALLOW_UNUSED_LOCAL(holder);
100
97 TestInterfaceNode* impl = V8TestInterfaceNode::toImpl(holder); 101 TestInterfaceNode* impl = V8TestInterfaceNode::toImpl(holder);
98 102
99 // Prepare the value to be set. 103 // Prepare the value to be set.
100 V8StringResource<> cppValue = v8Value; 104 V8StringResource<> cppValue = v8Value;
101 if (!cppValue.Prepare()) 105 if (!cppValue.Prepare())
102 return; 106 return;
103 107
104 impl->setStringAttribute(cppValue); 108 impl->setStringAttribute(cppValue);
105 } 109 }
106 110
(...skipping 13 matching lines...) Expand all
120 EventListener* cppValue(WTF::GetPtr(impl->eventHandlerAttribute())); 124 EventListener* cppValue(WTF::GetPtr(impl->eventHandlerAttribute()));
121 125
122 V8SetReturnValue(info, cppValue ? V8AbstractEventListener::Cast(cppValue)->Get ListenerOrNull(info.GetIsolate(), impl->GetExecutionContext()) : v8::Null(info.G etIsolate()).As<v8::Value>()); 126 V8SetReturnValue(info, cppValue ? V8AbstractEventListener::Cast(cppValue)->Get ListenerOrNull(info.GetIsolate(), impl->GetExecutionContext()) : v8::Null(info.G etIsolate()).As<v8::Value>());
123 } 127 }
124 128
125 static void eventHandlerAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c onst v8::FunctionCallbackInfo<v8::Value>& info) { 129 static void eventHandlerAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c onst v8::FunctionCallbackInfo<v8::Value>& info) {
126 v8::Isolate* isolate = info.GetIsolate(); 130 v8::Isolate* isolate = info.GetIsolate();
127 ALLOW_UNUSED_LOCAL(isolate); 131 ALLOW_UNUSED_LOCAL(isolate);
128 132
129 v8::Local<v8::Object> holder = info.Holder(); 133 v8::Local<v8::Object> holder = info.Holder();
134 ALLOW_UNUSED_LOCAL(holder);
135
130 TestInterfaceNode* impl = V8TestInterfaceNode::toImpl(holder); 136 TestInterfaceNode* impl = V8TestInterfaceNode::toImpl(holder);
131 137
132 // Prepare the value to be set. 138 // Prepare the value to be set.
133 139
134 impl->setEventHandlerAttribute(V8EventListenerHelper::GetEventListener(ScriptS tate::ForReceiverObject(info), v8Value, true, kListenerFindOrCreate)); 140 impl->setEventHandlerAttribute(V8EventListenerHelper::GetEventListener(ScriptS tate::ForReceiverObject(info), v8Value, true, kListenerFindOrCreate));
135 } 141 }
136 142
137 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetter(c onst v8::FunctionCallbackInfo<v8::Value>& info) { 143 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetter(c onst v8::FunctionCallbackInfo<v8::Value>& info) {
138 v8::Local<v8::Object> holder = info.Holder(); 144 v8::Local<v8::Object> holder = info.Holder();
139 145
(...skipping 16 matching lines...) Expand all
156 TestInterfaceNode* impl = V8TestInterfaceNode::toImpl(holder); 162 TestInterfaceNode* impl = V8TestInterfaceNode::toImpl(holder);
157 163
158 V8SetReturnValueString(info, impl->FastGetAttribute(HTMLNames::reflectstringat tributeAttr), info.GetIsolate()); 164 V8SetReturnValueString(info, impl->FastGetAttribute(HTMLNames::reflectstringat tributeAttr), info.GetIsolate());
159 } 165 }
160 166
161 static void reflectStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { 167 static void reflectStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
162 v8::Isolate* isolate = info.GetIsolate(); 168 v8::Isolate* isolate = info.GetIsolate();
163 ALLOW_UNUSED_LOCAL(isolate); 169 ALLOW_UNUSED_LOCAL(isolate);
164 170
165 v8::Local<v8::Object> holder = info.Holder(); 171 v8::Local<v8::Object> holder = info.Holder();
172 ALLOW_UNUSED_LOCAL(holder);
173
166 TestInterfaceNode* impl = V8TestInterfaceNode::toImpl(holder); 174 TestInterfaceNode* impl = V8TestInterfaceNode::toImpl(holder);
167 175
168 // Prepare the value to be set. 176 // Prepare the value to be set.
169 V8StringResource<> cppValue = v8Value; 177 V8StringResource<> cppValue = v8Value;
170 if (!cppValue.Prepare()) 178 if (!cppValue.Prepare())
171 return; 179 return;
172 180
173 impl->setAttribute(HTMLNames::reflectstringattributeAttr, cppValue); 181 impl->setAttribute(HTMLNames::reflectstringattributeAttr, cppValue);
174 } 182 }
175 183
176 static void reflectUrlStringAttributeAttributeGetter(const v8::FunctionCallbackI nfo<v8::Value>& info) { 184 static void reflectUrlStringAttributeAttributeGetter(const v8::FunctionCallbackI nfo<v8::Value>& info) {
177 v8::Local<v8::Object> holder = info.Holder(); 185 v8::Local<v8::Object> holder = info.Holder();
178 186
179 TestInterfaceNode* impl = V8TestInterfaceNode::toImpl(holder); 187 TestInterfaceNode* impl = V8TestInterfaceNode::toImpl(holder);
180 188
181 V8SetReturnValueString(info, impl->GetURLAttribute(HTMLNames::reflecturlstring attributeAttr), info.GetIsolate()); 189 V8SetReturnValueString(info, impl->GetURLAttribute(HTMLNames::reflecturlstring attributeAttr), info.GetIsolate());
182 } 190 }
183 191
184 static void reflectUrlStringAttributeAttributeSetter(v8::Local<v8::Value> v8Valu e, const v8::FunctionCallbackInfo<v8::Value>& info) { 192 static void reflectUrlStringAttributeAttributeSetter(v8::Local<v8::Value> v8Valu e, const v8::FunctionCallbackInfo<v8::Value>& info) {
185 v8::Isolate* isolate = info.GetIsolate(); 193 v8::Isolate* isolate = info.GetIsolate();
186 ALLOW_UNUSED_LOCAL(isolate); 194 ALLOW_UNUSED_LOCAL(isolate);
187 195
188 v8::Local<v8::Object> holder = info.Holder(); 196 v8::Local<v8::Object> holder = info.Holder();
197 ALLOW_UNUSED_LOCAL(holder);
198
189 TestInterfaceNode* impl = V8TestInterfaceNode::toImpl(holder); 199 TestInterfaceNode* impl = V8TestInterfaceNode::toImpl(holder);
190 200
191 // Prepare the value to be set. 201 // Prepare the value to be set.
192 V8StringResource<> cppValue = v8Value; 202 V8StringResource<> cppValue = v8Value;
193 if (!cppValue.Prepare()) 203 if (!cppValue.Prepare())
194 return; 204 return;
195 205
196 impl->setAttribute(HTMLNames::reflecturlstringattributeAttr, cppValue); 206 impl->setAttribute(HTMLNames::reflecturlstringattributeAttr, cppValue);
197 } 207 }
198 208
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
402 TestInterfaceNode* NativeValueTraits<TestInterfaceNode>::NativeValue(v8::Isolate * isolate, v8::Local<v8::Value> value, ExceptionState& exceptionState) { 412 TestInterfaceNode* NativeValueTraits<TestInterfaceNode>::NativeValue(v8::Isolate * isolate, v8::Local<v8::Value> value, ExceptionState& exceptionState) {
403 TestInterfaceNode* nativeValue = V8TestInterfaceNode::toImplWithTypeCheck(isol ate, value); 413 TestInterfaceNode* nativeValue = V8TestInterfaceNode::toImplWithTypeCheck(isol ate, value);
404 if (!nativeValue) { 414 if (!nativeValue) {
405 exceptionState.ThrowTypeError(ExceptionMessages::FailedToConvertJSValue( 415 exceptionState.ThrowTypeError(ExceptionMessages::FailedToConvertJSValue(
406 "TestInterfaceNode")); 416 "TestInterfaceNode"));
407 } 417 }
408 return nativeValue; 418 return nativeValue;
409 } 419 }
410 420
411 } // namespace blink 421 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698