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

Side by Side Diff: Source/bindings/tests/results/V8TestExtendedEvent.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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 options.get("location", eventInit.location); 130 options.get("location", eventInit.location);
131 if (options.get("keyLocation", eventInit.location)) 131 if (options.get("keyLocation", eventInit.location))
132 UseCounter::countDeprecation(activeScriptExecutionContext(), UseCounter: :KeyboardEventKeyLocation); 132 UseCounter::countDeprecation(activeScriptExecutionContext(), UseCounter: :KeyboardEventKeyLocation);
133 return true; 133 return true;
134 } 134 }
135 135
136 void V8TestExtendedEvent::constructorCallback(const v8::FunctionCallbackInfo<v8: :Value>& args) 136 void V8TestExtendedEvent::constructorCallback(const v8::FunctionCallbackInfo<v8: :Value>& args)
137 { 137 {
138 TRACE_EVENT_SCOPED_SAMPLING_STATE("Blink", "DOMConstructor"); 138 TRACE_EVENT_SCOPED_SAMPLING_STATE("Blink", "DOMConstructor");
139 if (!args.IsConstructCall()) { 139 if (!args.IsConstructCall()) {
140 throwTypeError("DOM object constructor cannot be called as a function.", args.GetIsolate()); 140 throwTypeError(ExceptionMessages::failedToConstruct("Event", "Please use the 'new' operator, this DOM object constructor cannot be called as a function. "), args.GetIsolate());
141 return; 141 return;
142 } 142 }
143 143
144 if (ConstructorMode::current() == ConstructorMode::WrapExistingObject) { 144 if (ConstructorMode::current() == ConstructorMode::WrapExistingObject) {
145 args.GetReturnValue().Set(args.Holder()); 145 args.GetReturnValue().Set(args.Holder());
146 return; 146 return;
147 } 147 }
148 148
149 EventV8Internal::constructor(args); 149 EventV8Internal::constructor(args);
150 } 150 }
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 } 217 }
218 218
219 void V8TestExtendedEvent::derefObject(void* object) 219 void V8TestExtendedEvent::derefObject(void* object)
220 { 220 {
221 fromInternalPointer(object)->deref(); 221 fromInternalPointer(object)->deref();
222 } 222 }
223 223
224 } // namespace WebCore 224 } // namespace WebCore
225 225
226 #endif // ENABLE(TEST) 226 #endif // ENABLE(TEST)
OLDNEW
« no previous file with comments | « Source/bindings/tests/results/V8TestEventConstructor.cpp ('k') | Source/bindings/tests/results/V8TestInterface.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698