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

Unified Diff: Source/bindings/v8/ExceptionMessages.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
« no previous file with comments | « Source/bindings/v8/ExceptionMessages.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/v8/ExceptionMessages.cpp
diff --git a/Source/bindings/v8/ExceptionMessages.cpp b/Source/bindings/v8/ExceptionMessages.cpp
index 83e37797956b61a2f8990435dc0599cdbe5d04d8..483e778ddadcf3dd75b9dcd9e1133ff1280d1952 100644
--- a/Source/bindings/v8/ExceptionMessages.cpp
+++ b/Source/bindings/v8/ExceptionMessages.cpp
@@ -81,6 +81,11 @@ String ExceptionMessages::failedToDeleteIndexed(const String& type, const String
return "Failed to delete an indexed property from '" + type + "': " + detail;
}
+String ExceptionMessages::constructorNotCallableAsFunction(const String& type)
+{
+ return failedToConstruct(type, "Please use the 'new' operator, this DOM object constructor cannot be called as a function.");
+}
+
String ExceptionMessages::incorrectPropertyType(const String& property, const String& detail)
{
return "The '" + property + "' property " + detail;
« no previous file with comments | « Source/bindings/v8/ExceptionMessages.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698