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

Unified Diff: Source/bindings/core/v8/ExceptionMessages.h

Issue 482753002: Use StringBuilder::appendLiteral() / StringBuilder::append(char) when possible (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 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 | « no previous file | Source/core/css/CSSBasicShapes.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/core/v8/ExceptionMessages.h
diff --git a/Source/bindings/core/v8/ExceptionMessages.h b/Source/bindings/core/v8/ExceptionMessages.h
index 3712e7360e9770267ee022e519ced8cc2647affc..0ba8d7bfa6646792ca746150514eba3ad594b8e1 100644
--- a/Source/bindings/core/v8/ExceptionMessages.h
+++ b/Source/bindings/core/v8/ExceptionMessages.h
@@ -72,15 +72,15 @@ public:
{
bool eq = given == bound;
StringBuilder result;
- result.append("The ");
+ result.appendLiteral("The ");
result.append(name);
- result.append(" provided (");
+ result.appendLiteral(" provided (");
result.append(formatNumber(given));
- result.append(") is greater than ");
+ result.appendLiteral(") is greater than ");
result.append(eq ? "or equal to " : "");
- result.append("the maximum bound (");
+ result.appendLiteral("the maximum bound (");
result.append(formatNumber(bound));
- result.append(").");
+ result.appendLiteral(").");
return result.toString();
}
@@ -89,15 +89,15 @@ public:
{
bool eq = given == bound;
StringBuilder result;
- result.append("The ");
+ result.appendLiteral("The ");
result.append(name);
- result.append(" provided (");
+ result.appendLiteral(" provided (");
result.append(formatNumber(given));
- result.append(") is less than ");
+ result.appendLiteral(") is less than ");
result.append(eq ? "or equal to " : "");
- result.append("the minimum bound (");
+ result.appendLiteral("the minimum bound (");
result.append(formatNumber(bound));
- result.append(").");
+ result.appendLiteral(").");
return result.toString();
}
@@ -105,14 +105,14 @@ public:
static String indexOutsideRange(const char* name, NumberType given, NumberType lowerBound, BoundType lowerType, NumberType upperBound, BoundType upperType)
{
StringBuilder result;
- result.append("The ");
+ result.appendLiteral("The ");
result.append(name);
- result.append(" provided (");
+ result.appendLiteral(" provided (");
result.append(formatNumber(given));
- result.append(") is outside the range ");
+ result.appendLiteral(") is outside the range ");
result.append(lowerType == ExclusiveBound ? '(' : '[');
result.append(formatNumber(lowerBound));
- result.append(", ");
+ result.appendLiteral(", ");
result.append(formatNumber(upperBound));
result.append(upperType == ExclusiveBound ? ')' : ']');
result.append('.');
« no previous file with comments | « no previous file | Source/core/css/CSSBasicShapes.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698