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

Side by Side Diff: Source/bindings/tests/results/core/V8TestInterface3.cpp

Issue 946973005: IDL: Drop value conversion (V8 -> C++) macros from generated code (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: address comments Created 5 years, 10 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 "V8TestInterface3.h" 8 #include "V8TestInterface3.h"
9 9
10 #include "bindings/core/v8/ExceptionState.h" 10 #include "bindings/core/v8/ExceptionState.h"
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 } 87 }
88 Document* document; 88 Document* document;
89 double d; 89 double d;
90 { 90 {
91 document = V8Document::toImplWithTypeCheck(info.GetIsolate(), info[0]); 91 document = V8Document::toImplWithTypeCheck(info.GetIsolate(), info[0]);
92 if (!document) { 92 if (!document) {
93 exceptionState.throwTypeError("parameter 1 is not of type 'Document' ."); 93 exceptionState.throwTypeError("parameter 1 is not of type 'Document' .");
94 exceptionState.throwIfNeeded(); 94 exceptionState.throwIfNeeded();
95 return; 95 return;
96 } 96 }
97 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(d, toRestrictedDouble(info[1], exc eptionState), exceptionState); 97 d = toRestrictedDouble(info[1], exceptionState);
98 if (exceptionState.throwIfNeeded())
99 return;
98 } 100 }
99 TestPartialInterface4::voidMethodDocument(document, d); 101 TestPartialInterface4::voidMethodDocument(document, d);
100 } 102 }
101 #endif // ENABLE(BAR) 103 #endif // ENABLE(BAR)
102 104
103 #if ENABLE(BAR) 105 #if ENABLE(BAR)
104 static void voidMethodDocumentMethodCallback(const v8::FunctionCallbackInfo<v8:: Value>& info) 106 static void voidMethodDocumentMethodCallback(const v8::FunctionCallbackInfo<v8:: Value>& info)
105 { 107 {
106 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 108 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
107 TestInterface3V8Internal::voidMethodDocumentMethod(info); 109 TestInterface3V8Internal::voidMethodDocumentMethod(info);
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 setMinimumArityTypeError(exceptionState, 1, info.Length()); 158 setMinimumArityTypeError(exceptionState, 1, info.Length());
157 exceptionState.throwIfNeeded(); 159 exceptionState.throwIfNeeded();
158 return; 160 return;
159 } 161 }
160 TestInterface3* impl = V8TestInterface3::toImpl(info.Holder()); 162 TestInterface3* impl = V8TestInterface3::toImpl(info.Holder());
161 ScriptValue callback; 163 ScriptValue callback;
162 ScriptValue thisArg; 164 ScriptValue thisArg;
163 { 165 {
164 if (!info[0]->IsFunction()) { 166 if (!info[0]->IsFunction()) {
165 exceptionState.throwTypeError("The callback provided as parameter 1 is not a function."); 167 exceptionState.throwTypeError("The callback provided as parameter 1 is not a function.");
166 exceptionState.throwIfNeeded(); 168 exceptionState.throwIfNeeded();
167 return; 169 return;
168 } 170 }
169 callback = ScriptValue(ScriptState::current(info.GetIsolate()), info[0]) ; 171 callback = ScriptValue(ScriptState::current(info.GetIsolate()), info[0]) ;
170 thisArg = ScriptValue(ScriptState::current(info.GetIsolate()), info[1]); 172 thisArg = ScriptValue(ScriptState::current(info.GetIsolate()), info[1]);
171 } 173 }
172 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); 174 ScriptState* scriptState = ScriptState::current(info.GetIsolate());
173 impl->forEachForBinding(scriptState, ScriptValue(scriptState, info.This()), callback, thisArg, exceptionState); 175 impl->forEachForBinding(scriptState, ScriptValue(scriptState, info.This()), callback, thisArg, exceptionState);
174 if (exceptionState.hadException()) { 176 if (exceptionState.hadException()) {
175 exceptionState.throwIfNeeded(); 177 exceptionState.throwIfNeeded();
176 return; 178 return;
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 { 352 {
351 scriptWrappable->toImpl<TestInterface3>()->ref(); 353 scriptWrappable->toImpl<TestInterface3>()->ref();
352 } 354 }
353 355
354 void V8TestInterface3::derefObject(ScriptWrappable* scriptWrappable) 356 void V8TestInterface3::derefObject(ScriptWrappable* scriptWrappable)
355 { 357 {
356 scriptWrappable->toImpl<TestInterface3>()->deref(); 358 scriptWrappable->toImpl<TestInterface3>()->deref();
357 } 359 }
358 360
359 } // namespace blink 361 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698