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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: Source/bindings/tests/results/V8TestInterfaceWillBeGarbageCollected.cpp
diff --git a/Source/bindings/tests/results/V8TestInterfaceWillBeGarbageCollected.cpp b/Source/bindings/tests/results/V8TestInterfaceWillBeGarbageCollected.cpp
index 87c317fc2debb3e817938f989ccbd59d783eeb6d..bd2a8458eec6f3f648103fd876119b3144ae121c 100644
--- a/Source/bindings/tests/results/V8TestInterfaceWillBeGarbageCollected.cpp
+++ b/Source/bindings/tests/results/V8TestInterfaceWillBeGarbageCollected.cpp
@@ -117,7 +117,7 @@ void V8TestInterfaceWillBeGarbageCollected::constructorCallback(const v8::Functi
{
TRACE_EVENT_SCOPED_SAMPLING_STATE("Blink", "DOMConstructor");
if (!info.IsConstructCall()) {
- throwTypeError(ExceptionMessages::failedToConstruct("TestInterfaceWillBeGarbageCollected", "Please use the 'new' operator, this DOM object constructor cannot be called as a function."), info.GetIsolate());
+ throwTypeError(ExceptionMessages::constructorNotCallableAsFunction("TestInterfaceWillBeGarbageCollected"), info.GetIsolate());
return;
}
« 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