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

Side by Side Diff: Source/bindings/tests/results/V8TestInterfaceNamedConstructor2.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 "V8TestInterfaceNamedConstructor2.h" 8 #include "V8TestInterfaceNamedConstructor2.h"
9 9
10 #include "RuntimeEnabledFeatures.h" 10 #include "RuntimeEnabledFeatures.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 43
44 template <typename T> void V8_USE(T) { } 44 template <typename T> void V8_USE(T) { }
45 45
46 } // namespace TestInterfaceNamedConstructor2V8Internal 46 } // namespace TestInterfaceNamedConstructor2V8Internal
47 47
48 const WrapperTypeInfo V8TestInterfaceNamedConstructor2Constructor::wrapperTypeIn fo = { gin::kEmbedderBlink, V8TestInterfaceNamedConstructor2Constructor::domTemp late, V8TestInterfaceNamedConstructor2::derefObject, 0, 0, 0, V8TestInterfaceNam edConstructor2::installPerContextEnabledMethods, 0, WrapperTypeObjectPrototype, false }; 48 const WrapperTypeInfo V8TestInterfaceNamedConstructor2Constructor::wrapperTypeIn fo = { gin::kEmbedderBlink, V8TestInterfaceNamedConstructor2Constructor::domTemp late, V8TestInterfaceNamedConstructor2::derefObject, 0, 0, 0, V8TestInterfaceNam edConstructor2::installPerContextEnabledMethods, 0, WrapperTypeObjectPrototype, false };
49 49
50 static void V8TestInterfaceNamedConstructor2ConstructorCallback(const v8::Functi onCallbackInfo<v8::Value>& info) 50 static void V8TestInterfaceNamedConstructor2ConstructorCallback(const v8::Functi onCallbackInfo<v8::Value>& info)
51 { 51 {
52 if (!info.IsConstructCall()) { 52 if (!info.IsConstructCall()) {
53 throwTypeError(ExceptionMessages::failedToConstruct("Audio", "Please use the 'new' operator, this DOM object constructor cannot be called as a function. "), info.GetIsolate()); 53 throwTypeError(ExceptionMessages::constructorNotCallableAsFunction("Audi o"), info.GetIsolate());
54 return; 54 return;
55 } 55 }
56 56
57 if (ConstructorMode::current() == ConstructorMode::WrapExistingObject) { 57 if (ConstructorMode::current() == ConstructorMode::WrapExistingObject) {
58 v8SetReturnValue(info, info.Holder()); 58 v8SetReturnValue(info, info.Holder());
59 return; 59 return;
60 } 60 }
61 61
62 Document* document = currentDOMWindow(info.GetIsolate())->document(); 62 Document* document = currentDOMWindow(info.GetIsolate())->document();
63 ASSERT(document); 63 ASSERT(document);
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 fromInternalPointer(object)->deref(); 167 fromInternalPointer(object)->deref();
168 } 168 }
169 169
170 template<> 170 template<>
171 v8::Handle<v8::Value> toV8NoInline(TestInterfaceNamedConstructor2* impl, v8::Han dle<v8::Object> creationContext, v8::Isolate* isolate) 171 v8::Handle<v8::Value> toV8NoInline(TestInterfaceNamedConstructor2* impl, v8::Han dle<v8::Object> creationContext, v8::Isolate* isolate)
172 { 172 {
173 return toV8(impl, creationContext, isolate); 173 return toV8(impl, creationContext, isolate);
174 } 174 }
175 175
176 } // namespace WebCore 176 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698