| Index: Source/bindings/core/dart/DartExceptionState.cpp
|
| diff --git a/Source/bindings/core/dart/DartExceptionState.cpp b/Source/bindings/core/dart/DartExceptionState.cpp
|
| index 9b671717a73410948f67b0bde4b46c74251cca6a..64af1de71c0eb93c4f4cb830961edfa79e6a56d5 100644
|
| --- a/Source/bindings/core/dart/DartExceptionState.cpp
|
| +++ b/Source/bindings/core/dart/DartExceptionState.cpp
|
| @@ -131,11 +131,7 @@ void DartExceptionState::throwDartCoreError(const String& className, const Strin
|
| setHadException(true);
|
| setMessage(message);
|
|
|
| - DartApiScope apiScope;
|
| - Dart_Handle coreLib = Dart_LookupLibrary(Dart_NewStringFromCString("dart:core"));
|
| - Dart_Handle errorClass = Dart_GetType(coreLib, DartUtilities::stringToDart(className), 0, 0);
|
| - Dart_Handle dartMessage = DartUtilities::stringToDart(message);
|
| - Dart_Handle error = Dart_New(errorClass, Dart_NewStringFromCString(""), 1, &dartMessage);
|
| + Dart_Handle error = DartUtilities::toDartCoreException(className, message);
|
|
|
| ASSERT(!m_exception);
|
| m_exception = Dart_NewPersistentHandle(error);
|
|
|