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

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

Issue 23440058: Improve generated TypeError exception messages in bindings. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 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/V8TestOverloadedConstructors.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 507 matching lines...) Expand 10 before | Expand all | Expand 10 after
518 {"immutablePointFunction", TestTypedefsV8Internal::immutablePointFunctionMet hodCallback, 0, 0}, 518 {"immutablePointFunction", TestTypedefsV8Internal::immutablePointFunctionMet hodCallback, 0, 0},
519 {"stringArrayFunction", TestTypedefsV8Internal::stringArrayFunctionMethodCal lback, 0, 1}, 519 {"stringArrayFunction", TestTypedefsV8Internal::stringArrayFunctionMethodCal lback, 0, 1},
520 {"stringArrayFunction2", TestTypedefsV8Internal::stringArrayFunction2MethodC allback, 0, 1}, 520 {"stringArrayFunction2", TestTypedefsV8Internal::stringArrayFunction2MethodC allback, 0, 1},
521 {"methodWithException", TestTypedefsV8Internal::methodWithExceptionMethodCal lback, 0, 0}, 521 {"methodWithException", TestTypedefsV8Internal::methodWithExceptionMethodCal lback, 0, 0},
522 }; 522 };
523 523
524 void V8TestTypedefs::constructorCallback(const v8::FunctionCallbackInfo<v8::Valu e>& args) 524 void V8TestTypedefs::constructorCallback(const v8::FunctionCallbackInfo<v8::Valu e>& args)
525 { 525 {
526 TRACE_EVENT_SCOPED_SAMPLING_STATE("Blink", "DOMConstructor"); 526 TRACE_EVENT_SCOPED_SAMPLING_STATE("Blink", "DOMConstructor");
527 if (!args.IsConstructCall()) { 527 if (!args.IsConstructCall()) {
528 throwTypeError("DOM object constructor cannot be called as a function.", args.GetIsolate()); 528 throwTypeError(ExceptionMessages::failedToConstruct("TestTypedefs", "Ple ase use the 'new' operator, this DOM object constructor cannot be called as a fu nction."), args.GetIsolate());
529 return; 529 return;
530 } 530 }
531 531
532 if (ConstructorMode::current() == ConstructorMode::WrapExistingObject) { 532 if (ConstructorMode::current() == ConstructorMode::WrapExistingObject) {
533 args.GetReturnValue().Set(args.Holder()); 533 args.GetReturnValue().Set(args.Holder());
534 return; 534 return;
535 } 535 }
536 536
537 TestTypedefsV8Internal::constructor(args); 537 TestTypedefsV8Internal::constructor(args);
538 } 538 }
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
604 V8DOMWrapper::associateObjectWithWrapper<V8TestTypedefs>(impl, &info, wrappe r, isolate, WrapperConfiguration::Independent); 604 V8DOMWrapper::associateObjectWithWrapper<V8TestTypedefs>(impl, &info, wrappe r, isolate, WrapperConfiguration::Independent);
605 return wrapper; 605 return wrapper;
606 } 606 }
607 607
608 void V8TestTypedefs::derefObject(void* object) 608 void V8TestTypedefs::derefObject(void* object)
609 { 609 {
610 fromInternalPointer(object)->deref(); 610 fromInternalPointer(object)->deref();
611 } 611 }
612 612
613 } // namespace WebCore 613 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/tests/results/V8TestOverloadedConstructors.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698