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

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

Issue 27100003: Add support for nullable operation arguments in IDL files (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add test for optional argument Created 7 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « Source/bindings/tests/results/V8TestObject.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 This file is part of the Blink open source project. 2 This file is part of the Blink open source project.
3 This file has been auto-generated by CodeGeneratorV8.pm. DO NOT MODIFY! 3 This file has been auto-generated by CodeGeneratorV8.pm. DO NOT MODIFY!
4 4
5 This library is free software; you can redistribute it and/or 5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public 6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either 7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version. 8 version 2 of the License, or (at your option) any later version.
9 9
10 This library is distributed in the hope that it will be useful, 10 This library is distributed in the hope that it will be useful,
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 335 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
336 } 336 }
337 337
338 static void nullableArrayArgMethod(const v8::FunctionCallbackInfo<v8::Value>& ar gs) 338 static void nullableArrayArgMethod(const v8::FunctionCallbackInfo<v8::Value>& ar gs)
339 { 339 {
340 if (UNLIKELY(args.Length() < 1)) { 340 if (UNLIKELY(args.Length() < 1)) {
341 throwTypeError(ExceptionMessages::failedToExecute("nullableArrayArg", "T estTypedefs", ExceptionMessages::notEnoughArguments(1, args.Length())), args.Get Isolate()); 341 throwTypeError(ExceptionMessages::failedToExecute("nullableArrayArg", "T estTypedefs", ExceptionMessages::notEnoughArguments(1, args.Length())), args.Get Isolate());
342 return; 342 return;
343 } 343 }
344 TestTypedefs* imp = V8TestTypedefs::toNative(args.Holder()); 344 TestTypedefs* imp = V8TestTypedefs::toNative(args.Holder());
345 bool arrayArgIsNull = args[0]->IsNull();
345 V8TRYCATCH_VOID(Vector<String>, arrayArg, toNativeArray<String>(args[0], arg s.GetIsolate())); 346 V8TRYCATCH_VOID(Vector<String>, arrayArg, toNativeArray<String>(args[0], arg s.GetIsolate()));
346 imp->nullableArrayArg(arrayArg); 347 imp->nullableArrayArg(arrayArgIsNull ? 0 : &arrayArg);
347 348
348 return; 349 return;
349 } 350 }
350 351
351 static void nullableArrayArgMethodCallback(const v8::FunctionCallbackInfo<v8::Va lue>& args) 352 static void nullableArrayArgMethodCallback(const v8::FunctionCallbackInfo<v8::Va lue>& args)
352 { 353 {
353 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 354 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
354 TestTypedefsV8Internal::nullableArrayArgMethod(args); 355 TestTypedefsV8Internal::nullableArrayArgMethod(args);
355 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 356 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
356 } 357 }
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
592 V8DOMWrapper::associateObjectWithWrapper<V8TestTypedefs>(impl, &info, wrappe r, isolate, WrapperConfiguration::Independent); 593 V8DOMWrapper::associateObjectWithWrapper<V8TestTypedefs>(impl, &info, wrappe r, isolate, WrapperConfiguration::Independent);
593 return wrapper; 594 return wrapper;
594 } 595 }
595 596
596 void V8TestTypedefs::derefObject(void* object) 597 void V8TestTypedefs::derefObject(void* object)
597 { 598 {
598 fromInternalPointer(object)->deref(); 599 fromInternalPointer(object)->deref();
599 } 600 }
600 601
601 } // namespace WebCore 602 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/tests/results/V8TestObject.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698