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

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

Issue 211333004: Tidy up error reporting for calling-constructor-as-function. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: re-use failedToConstruct() in constructorNotCallableAsFunction(). Created 6 years, 9 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 "V8TestInterfaceWillBeGarbageCollected.h" 8 #include "V8TestInterfaceWillBeGarbageCollected.h"
9 9
10 #include "RuntimeEnabledFeatures.h" 10 #include "RuntimeEnabledFeatures.h"
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 }; 110 };
111 111
112 static const V8DOMConfiguration::MethodConfiguration V8TestInterfaceWillBeGarbag eCollectedMethods[] = { 112 static const V8DOMConfiguration::MethodConfiguration V8TestInterfaceWillBeGarbag eCollectedMethods[] = {
113 {"func", TestInterfaceWillBeGarbageCollectedV8Internal::funcMethodCallback, 0, 1}, 113 {"func", TestInterfaceWillBeGarbageCollectedV8Internal::funcMethodCallback, 0, 1},
114 }; 114 };
115 115
116 void V8TestInterfaceWillBeGarbageCollected::constructorCallback(const v8::Functi onCallbackInfo<v8::Value>& info) 116 void V8TestInterfaceWillBeGarbageCollected::constructorCallback(const v8::Functi onCallbackInfo<v8::Value>& info)
117 { 117 {
118 TRACE_EVENT_SCOPED_SAMPLING_STATE("Blink", "DOMConstructor"); 118 TRACE_EVENT_SCOPED_SAMPLING_STATE("Blink", "DOMConstructor");
119 if (!info.IsConstructCall()) { 119 if (!info.IsConstructCall()) {
120 throwTypeError(ExceptionMessages::failedToConstruct("TestInterfaceWillBe GarbageCollected", "Please use the 'new' operator, this DOM object constructor c annot be called as a function."), info.GetIsolate()); 120 throwTypeError(ExceptionMessages::constructorNotCallableAsFunction("Test InterfaceWillBeGarbageCollected"), info.GetIsolate());
121 return; 121 return;
122 } 122 }
123 123
124 if (ConstructorMode::current() == ConstructorMode::WrapExistingObject) { 124 if (ConstructorMode::current() == ConstructorMode::WrapExistingObject) {
125 v8SetReturnValue(info, info.Holder()); 125 v8SetReturnValue(info, info.Holder());
126 return; 126 return;
127 } 127 }
128 128
129 TestInterfaceWillBeGarbageCollectedV8Internal::constructor(info); 129 TestInterfaceWillBeGarbageCollectedV8Internal::constructor(info);
130 } 130 }
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 #endif // !ENABLE(OILPAN) 209 #endif // !ENABLE(OILPAN)
210 } 210 }
211 211
212 template<> 212 template<>
213 v8::Handle<v8::Value> toV8NoInline(TestInterfaceWillBeGarbageCollected* impl, v8 ::Handle<v8::Object> creationContext, v8::Isolate* isolate) 213 v8::Handle<v8::Value> toV8NoInline(TestInterfaceWillBeGarbageCollected* impl, v8 ::Handle<v8::Object> creationContext, v8::Isolate* isolate)
214 { 214 {
215 return toV8(impl, creationContext, isolate); 215 return toV8(impl, creationContext, isolate);
216 } 216 }
217 217
218 } // namespace WebCore 218 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/tests/results/V8TestInterfacePython2.cpp ('k') | Source/bindings/tests/results/V8TestNode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698