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

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

Issue 466323002: IDL: Use Nullable for union type return value (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 4 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 "V8TestTypedefs.h" 8 #include "V8TestTypedefs.h"
9 9
10 #include "bindings/core/v8/ExceptionState.h" 10 #include "bindings/core/v8/ExceptionState.h"
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 static void uLongLongMethodTestInterfaceEmptyTypeSequenceArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) 189 static void uLongLongMethodTestInterfaceEmptyTypeSequenceArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
190 { 190 {
191 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 191 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
192 TestTypedefsV8Internal::uLongLongMethodTestInterfaceEmptyTypeSequenceArgMeth od(info); 192 TestTypedefsV8Internal::uLongLongMethodTestInterfaceEmptyTypeSequenceArgMeth od(info);
193 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 193 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
194 } 194 }
195 195
196 static void testInterfaceOrTestInterfaceEmptyMethodMethod(const v8::FunctionCall backInfo<v8::Value>& info) 196 static void testInterfaceOrTestInterfaceEmptyMethodMethod(const v8::FunctionCall backInfo<v8::Value>& info)
197 { 197 {
198 TestTypedefs* impl = V8TestTypedefs::toNative(info.Holder()); 198 TestTypedefs* impl = V8TestTypedefs::toNative(info.Holder());
199 bool result0Enabled = false; 199 Nullable<RefPtr<TestInterfaceImplementation> > result0;
200 RefPtr<TestInterfaceImplementation> result0; 200 Nullable<RefPtr<TestInterfaceEmpty> > result1;
201 bool result1Enabled = false; 201 impl->testInterfaceOrTestInterfaceEmptyMethod(result0, result1);
202 RefPtr<TestInterfaceEmpty> result1; 202 if (!result0.isNull()) {
203 impl->testInterfaceOrTestInterfaceEmptyMethod(result0Enabled, result0, resul t1Enabled, result1); 203 v8SetReturnValue(info, result0.get().release());
204 if (result0Enabled) {
205 v8SetReturnValue(info, result0.release());
206 return; 204 return;
207 } 205 }
208 if (result1Enabled) { 206 if (!result1.isNull()) {
209 v8SetReturnValue(info, result1.release()); 207 v8SetReturnValue(info, result1.get().release());
210 return; 208 return;
211 } 209 }
212 v8SetReturnValueNull(info); 210 v8SetReturnValueNull(info);
213 } 211 }
214 212
215 static void testInterfaceOrTestInterfaceEmptyMethodMethodCallback(const v8::Func tionCallbackInfo<v8::Value>& info) 213 static void testInterfaceOrTestInterfaceEmptyMethodMethodCallback(const v8::Func tionCallbackInfo<v8::Value>& info)
216 { 214 {
217 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 215 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
218 TestTypedefsV8Internal::testInterfaceOrTestInterfaceEmptyMethodMethod(info); 216 TestTypedefsV8Internal::testInterfaceOrTestInterfaceEmptyMethodMethod(info);
219 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 217 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
385 fromInternalPointer(internalPointer)->deref(); 383 fromInternalPointer(internalPointer)->deref();
386 } 384 }
387 385
388 template<> 386 template<>
389 v8::Handle<v8::Value> toV8NoInline(TestTypedefs* impl, v8::Handle<v8::Object> cr eationContext, v8::Isolate* isolate) 387 v8::Handle<v8::Value> toV8NoInline(TestTypedefs* impl, v8::Handle<v8::Object> cr eationContext, v8::Isolate* isolate)
390 { 388 {
391 return toV8(impl, creationContext, isolate); 389 return toV8(impl, creationContext, isolate);
392 } 390 }
393 391
394 } // namespace blink 392 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698