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

Side by Side Diff: Source/bindings/tests/results/core/V8TestInterfaceNamedConstructor.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: 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 "V8TestInterfaceNamedConstructor.h" 8 #include "V8TestInterfaceNamedConstructor.h"
9 9
10 #include "bindings/core/v8/ExceptionState.h" 10 #include "bindings/core/v8/ExceptionState.h"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 exceptionState.throwIfNeeded(); 76 exceptionState.throwIfNeeded();
77 return; 77 return;
78 } 78 }
79 V8StringResource<> stringArg; 79 V8StringResource<> stringArg;
80 bool defaultUndefinedOptionalBooleanArg; 80 bool defaultUndefinedOptionalBooleanArg;
81 int defaultUndefinedOptionalLongArg; 81 int defaultUndefinedOptionalLongArg;
82 V8StringResource<> defaultUndefinedOptionalStringArg; 82 V8StringResource<> defaultUndefinedOptionalStringArg;
83 V8StringResource<> defaultNullStringOptionalstringArg; 83 V8StringResource<> defaultNullStringOptionalstringArg;
84 V8StringResource<> optionalStringArg; 84 V8StringResource<> optionalStringArg;
85 { 85 {
86 TOSTRING_VOID_INTERNAL(stringArg, info[0]); 86 TONATIVE_CONVERT((stringArg = info[0]).prepare(), return);
87 defaultUndefinedOptionalBooleanArg = info[1]->BooleanValue(); 87 defaultUndefinedOptionalBooleanArg = info[1]->BooleanValue();
88 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(defaultUndefinedOptionalLongArg, t oInt32(info[2], exceptionState), exceptionState); 88 TONATIVE_CONVERT(convertAndThrow(defaultUndefinedOptionalLongArg = toInt 32(info[2], exceptionState), exceptionState), return);
89 TOSTRING_VOID_INTERNAL(defaultUndefinedOptionalStringArg, info[3]); 89 TONATIVE_CONVERT((defaultUndefinedOptionalStringArg = info[3]).prepare() , return);
90 if (!info[4]->IsUndefined()) { 90 if (!info[4]->IsUndefined()) {
91 TOSTRING_VOID_INTERNAL(defaultNullStringOptionalstringArg, info[4]); 91 TONATIVE_CONVERT((defaultNullStringOptionalstringArg = info[4]).prep are(), return);
92 } else { 92 } else {
93 defaultNullStringOptionalstringArg = nullptr; 93 defaultNullStringOptionalstringArg = nullptr;
94 } 94 }
95 if (UNLIKELY(info.Length() <= 5)) { 95 if (UNLIKELY(info.Length() <= 5)) {
96 Document& document = *toDocument(currentExecutionContext(info.GetIso late())); 96 Document& document = *toDocument(currentExecutionContext(info.GetIso late()));
97 RefPtr<TestInterfaceNamedConstructor> impl = TestInterfaceNamedConst ructor::createForJSConstructor(document, stringArg, defaultUndefinedOptionalBool eanArg, defaultUndefinedOptionalLongArg, defaultUndefinedOptionalStringArg, defa ultNullStringOptionalstringArg, exceptionState); 97 RefPtr<TestInterfaceNamedConstructor> impl = TestInterfaceNamedConst ructor::createForJSConstructor(document, stringArg, defaultUndefinedOptionalBool eanArg, defaultUndefinedOptionalLongArg, defaultUndefinedOptionalStringArg, defa ultNullStringOptionalstringArg, exceptionState);
98 if (exceptionState.hadException()) { 98 if (exceptionState.hadException()) {
99 exceptionState.throwIfNeeded(); 99 exceptionState.throwIfNeeded();
100 return; 100 return;
101 } 101 }
102 v8::Local<v8::Object> wrapper = info.Holder(); 102 v8::Local<v8::Object> wrapper = info.Holder();
103 impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceNamedC onstructorConstructor::wrapperTypeInfo, wrapper); 103 impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceNamedC onstructorConstructor::wrapperTypeInfo, wrapper);
104 v8SetReturnValue(info, wrapper); 104 v8SetReturnValue(info, wrapper);
105 return; 105 return;
106 } 106 }
107 TOSTRING_VOID_INTERNAL(optionalStringArg, info[5]); 107 TONATIVE_CONVERT((optionalStringArg = info[5]).prepare(), return);
108 } 108 }
109 Document& document = *toDocument(currentExecutionContext(info.GetIsolate())) ; 109 Document& document = *toDocument(currentExecutionContext(info.GetIsolate())) ;
110 RefPtr<TestInterfaceNamedConstructor> impl = TestInterfaceNamedConstructor:: createForJSConstructor(document, stringArg, defaultUndefinedOptionalBooleanArg, defaultUndefinedOptionalLongArg, defaultUndefinedOptionalStringArg, defaultNullS tringOptionalstringArg, optionalStringArg, exceptionState); 110 RefPtr<TestInterfaceNamedConstructor> impl = TestInterfaceNamedConstructor:: createForJSConstructor(document, stringArg, defaultUndefinedOptionalBooleanArg, defaultUndefinedOptionalLongArg, defaultUndefinedOptionalStringArg, defaultNullS tringOptionalstringArg, optionalStringArg, exceptionState);
111 if (exceptionState.hadException()) { 111 if (exceptionState.hadException()) {
112 exceptionState.throwIfNeeded(); 112 exceptionState.throwIfNeeded();
113 return; 113 return;
114 } 114 }
115 v8::Local<v8::Object> wrapper = info.Holder(); 115 v8::Local<v8::Object> wrapper = info.Holder();
116 impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceNamedConstruct orConstructor::wrapperTypeInfo, wrapper); 116 impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceNamedConstruct orConstructor::wrapperTypeInfo, wrapper);
117 v8SetReturnValue(info, wrapper); 117 v8SetReturnValue(info, wrapper);
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 { 182 {
183 scriptWrappable->toImpl<TestInterfaceNamedConstructor>()->ref(); 183 scriptWrappable->toImpl<TestInterfaceNamedConstructor>()->ref();
184 } 184 }
185 185
186 void V8TestInterfaceNamedConstructor::derefObject(ScriptWrappable* scriptWrappab le) 186 void V8TestInterfaceNamedConstructor::derefObject(ScriptWrappable* scriptWrappab le)
187 { 187 {
188 scriptWrappable->toImpl<TestInterfaceNamedConstructor>()->deref(); 188 scriptWrappable->toImpl<TestInterfaceNamedConstructor>()->deref();
189 } 189 }
190 190
191 } // namespace blink 191 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698