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

Unified Diff: Source/bindings/v8/ExceptionMessages.cpp

Issue 216633002: Reduce type-impedance for ExceptionMessages::failedTo* functions (Closed) Base URL: svn://svn.chromium.org/blink/trunk
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 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 483e778ddadcf3dd75b9dcd9e1133ff1280d1952..6106e6d0d5a063eae70cc3143d5aeb90c11501df 100644
--- a/Source/bindings/v8/ExceptionMessages.cpp
+++ b/Source/bindings/v8/ExceptionMessages.cpp
@@ -36,52 +36,52 @@
namespace WebCore {
-String ExceptionMessages::failedToConstruct(const String& type, const String& detail)
+String ExceptionMessages::failedToConstruct(const char* type, const String& detail)
{
- return "Failed to construct '" + type + (!detail.isEmpty() ? String("': " + detail) : String("'"));
+ return "Failed to construct '" + String(type) + (!detail.isEmpty() ? String("': " + detail) : String("'"));
}
-String ExceptionMessages::failedToEnumerate(const String& type, const String& detail)
+String ExceptionMessages::failedToEnumerate(const char* type, const String& detail)
{
- return "Failed to enumerate the properties of '" + type + (!detail.isEmpty() ? String("': " + detail) : String("'"));
+ return "Failed to enumerate the properties of '" + String(type) + (!detail.isEmpty() ? String("': " + detail) : String("'"));
}
-String ExceptionMessages::failedToExecute(const String& method, const String& type, const String& detail)
+String ExceptionMessages::failedToExecute(const char* method, const char* type, const String& detail)
{
- return "Failed to execute '" + method + "' on '" + type + (!detail.isEmpty() ? String("': " + detail) : String("'"));
+ return "Failed to execute '" + String(method) + "' on '" + String(type) + (!detail.isEmpty() ? String("': " + detail) : String("'"));
}
-String ExceptionMessages::failedToGet(const String& property, const String& type, const String& detail)
+String ExceptionMessages::failedToGet(const char* property, const char* type, const String& detail)
{
- return "Failed to read the '" + property + "' property from '" + type + "': " + detail;
+ return "Failed to read the '" + String(property) + "' property from '" + String(type) + "': " + detail;
}
-String ExceptionMessages::failedToSet(const String& property, const String& type, const String& detail)
+String ExceptionMessages::failedToSet(const char* property, const char* type, const String& detail)
{
- return "Failed to set the '" + property + "' property on '" + type + "': " + detail;
+ return "Failed to set the '" + String(property) + "' property on '" + String(type) + "': " + detail;
}
-String ExceptionMessages::failedToDelete(const String& property, const String& type, const String& detail)
+String ExceptionMessages::failedToDelete(const char* property, const char* type, const String& detail)
{
- return "Failed to delete the '" + property + "' property from '" + type + "': " + detail;
+ return "Failed to delete the '" + String(property) + "' property from '" + String(type) + "': " + detail;
}
-String ExceptionMessages::failedToGetIndexed(const String& type, const String& detail)
+String ExceptionMessages::failedToGetIndexed(const char* type, const String& detail)
{
- return "Failed to read an indexed property from '" + type + "': " + detail;
+ return "Failed to read an indexed property from '" + String(type) + "': " + detail;
}
-String ExceptionMessages::failedToSetIndexed(const String& type, const String& detail)
+String ExceptionMessages::failedToSetIndexed(const char* type, const String& detail)
{
- return "Failed to set an indexed property on '" + type + "': " + detail;
+ return "Failed to set an indexed property on '" + String(type) + "': " + detail;
}
-String ExceptionMessages::failedToDeleteIndexed(const String& type, const String& detail)
+String ExceptionMessages::failedToDeleteIndexed(const char* type, const String& detail)
{
- return "Failed to delete an indexed property from '" + type + "': " + detail;
+ return "Failed to delete an indexed property from '" + String(type) + "': " + detail;
}
-String ExceptionMessages::constructorNotCallableAsFunction(const String& type)
+String ExceptionMessages::constructorNotCallableAsFunction(const char* type)
{
return failedToConstruct(type, "Please use the 'new' operator, this DOM object constructor cannot be called as a function.");
}
« 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