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

Side by Side Diff: Source/bindings/tests/results/V8TestNamedConstructor.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
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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 63
64 template <typename T> void V8_USE(T) { } 64 template <typename T> void V8_USE(T) { }
65 65
66 } // namespace TestNamedConstructorV8Internal 66 } // namespace TestNamedConstructorV8Internal
67 67
68 WrapperTypeInfo V8TestNamedConstructorConstructor::info = { V8TestNamedConstruct orConstructor::GetTemplate, V8TestNamedConstructor::derefObject, V8TestNamedCons tructor::toActiveDOMObject, 0, 0, V8TestNamedConstructor::installPerContextProto typeProperties, 0, WrapperTypeObjectPrototype }; 68 WrapperTypeInfo V8TestNamedConstructorConstructor::info = { V8TestNamedConstruct orConstructor::GetTemplate, V8TestNamedConstructor::derefObject, V8TestNamedCons tructor::toActiveDOMObject, 0, 0, V8TestNamedConstructor::installPerContextProto typeProperties, 0, WrapperTypeObjectPrototype };
69 69
70 static void V8TestNamedConstructorConstructorCallback(const v8::FunctionCallback Info<v8::Value>& args) 70 static void V8TestNamedConstructorConstructorCallback(const v8::FunctionCallback Info<v8::Value>& args)
71 { 71 {
72 if (!args.IsConstructCall()) { 72 if (!args.IsConstructCall()) {
73 throwTypeError("DOM object constructor cannot be called as a function.", args.GetIsolate()); 73 throwTypeError(ExceptionMessages::failedToConstruct("TestNamedConstructo r", "Please use the 'new' operator, this DOM object constructor cannot be called as a function."), args.GetIsolate());
74 return; 74 return;
75 } 75 }
76 76
77 if (ConstructorMode::current() == ConstructorMode::WrapExistingObject) { 77 if (ConstructorMode::current() == ConstructorMode::WrapExistingObject) {
78 args.GetReturnValue().Set(args.Holder()); 78 args.GetReturnValue().Set(args.Holder());
79 return; 79 return;
80 } 80 }
81 81
82 Document* document = currentDocument(); 82 Document* document = currentDocument();
83 ASSERT(document); 83 ASSERT(document);
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 V8DOMWrapper::associateObjectWithWrapper<V8TestNamedConstructor>(impl, &info , wrapper, isolate, WrapperConfiguration::Dependent); 192 V8DOMWrapper::associateObjectWithWrapper<V8TestNamedConstructor>(impl, &info , wrapper, isolate, WrapperConfiguration::Dependent);
193 return wrapper; 193 return wrapper;
194 } 194 }
195 195
196 void V8TestNamedConstructor::derefObject(void* object) 196 void V8TestNamedConstructor::derefObject(void* object)
197 { 197 {
198 fromInternalPointer(object)->deref(); 198 fromInternalPointer(object)->deref();
199 } 199 }
200 200
201 } // namespace WebCore 201 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/tests/results/V8TestInterface.cpp ('k') | Source/bindings/tests/results/V8TestNode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698