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

Side by Side Diff: Source/bindings/tests/results/V8TestInterfaceEventConstructor.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: 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 "V8TestInterfaceEventConstructor.h" 8 #include "V8TestInterfaceEventConstructor.h"
9 9
10 #include "RuntimeEnabledFeatures.h" 10 #include "RuntimeEnabledFeatures.h"
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 } else { 321 } else {
322 return false; 322 return false;
323 } 323 }
324 return true; 324 return true;
325 } 325 }
326 326
327 void V8TestInterfaceEventConstructor::constructorCallback(const v8::FunctionCall backInfo<v8::Value>& info) 327 void V8TestInterfaceEventConstructor::constructorCallback(const v8::FunctionCall backInfo<v8::Value>& info)
328 { 328 {
329 TRACE_EVENT_SCOPED_SAMPLING_STATE("Blink", "DOMConstructor"); 329 TRACE_EVENT_SCOPED_SAMPLING_STATE("Blink", "DOMConstructor");
330 if (!info.IsConstructCall()) { 330 if (!info.IsConstructCall()) {
331 throwTypeError(ExceptionMessages::failedToConstruct("TestInterfaceEventC onstructor", "Please use the 'new' operator, this DOM object constructor cannot be called as a function."), info.GetIsolate()); 331 throwTypeError(ExceptionMessages::constructorNotCallableAsFunction("Test InterfaceEventConstructor"), info.GetIsolate());
332 return; 332 return;
333 } 333 }
334 334
335 if (ConstructorMode::current() == ConstructorMode::WrapExistingObject) { 335 if (ConstructorMode::current() == ConstructorMode::WrapExistingObject) {
336 v8SetReturnValue(info, info.Holder()); 336 v8SetReturnValue(info, info.Holder());
337 return; 337 return;
338 } 338 }
339 339
340 TestInterfaceEventConstructorV8Internal::constructor(info); 340 TestInterfaceEventConstructorV8Internal::constructor(info);
341 } 341 }
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 fromInternalPointer(object)->deref(); 413 fromInternalPointer(object)->deref();
414 } 414 }
415 415
416 template<> 416 template<>
417 v8::Handle<v8::Value> toV8NoInline(TestInterfaceEventConstructor* impl, v8::Hand le<v8::Object> creationContext, v8::Isolate* isolate) 417 v8::Handle<v8::Value> toV8NoInline(TestInterfaceEventConstructor* impl, v8::Hand le<v8::Object> creationContext, v8::Isolate* isolate)
418 { 418 {
419 return toV8(impl, creationContext, isolate); 419 return toV8(impl, creationContext, isolate);
420 } 420 }
421 421
422 } // namespace WebCore 422 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698