Index: sky/engine/tonic/dart_exception_factory.cc |
diff --git a/sky/engine/tonic/dart_exception_factory.cc b/sky/engine/tonic/dart_exception_factory.cc |
index e439a45393cad0e5d3af5b42fedb5ecc60d850fa..e8c348588ca768bc7b770f9ff3e4ae7f80ff0dd6 100644 |
--- a/sky/engine/tonic/dart_exception_factory.cc |
+++ b/sky/engine/tonic/dart_exception_factory.cc |
@@ -6,7 +6,6 @@ |
#include "sky/engine/tonic/dart_converter.h" |
#include "sky/engine/tonic/dart_builtin.h" |
-#include "sky/engine/wtf/text/StringBuilder.h" |
namespace blink { |
@@ -18,23 +17,23 @@ DartExceptionFactory::~DartExceptionFactory() { |
} |
Dart_Handle DartExceptionFactory::CreateNullArgumentException(int index) { |
- StringBuilder message; |
- message.appendLiteral("Argument "); |
- message.appendNumber(index); |
- message.appendLiteral(" cannot be null."); |
- return CreateException("ArgumentError", message.toString()); |
+ std::string message; |
+ message.append("Argument "); |
+ message.append(std::to_string(index)); |
+ message.append(" cannot be null."); |
abarth-chromium
2015/07/15 20:42:52
This is super inefficient. Is there no StringBuil
|
+ return CreateException("ArgumentError", message); |
} |
-Dart_Handle DartExceptionFactory::CreateException(const String& class_name, |
- const String& message) { |
+Dart_Handle DartExceptionFactory::CreateException(const std::string& class_name, |
+ const std::string& message) { |
if (core_library_.is_empty()) { |
Dart_Handle library = DartBuiltin::LookupLibrary("dart:core"); |
core_library_.Set(dart_state_, library); |
} |
Dart_Handle exception_class = Dart_GetType( |
- core_library_.value(), StringToDart(dart_state_, class_name), 0, 0); |
- Dart_Handle message_handle = StringToDart(dart_state_, message); |
+ core_library_.value(), StdStringToDart(class_name), 0, 0); |
+ Dart_Handle message_handle = StdStringToDart(message); |
return Dart_New(exception_class, Dart_EmptyString(), 1, &message_handle); |
} |