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

Unified Diff: Source/bindings/core/dart/DartExceptionState.cpp

Issue 668733002: C++ overload resolution in bindings layer (Closed) Base URL: svn://svn.chromium.org/blink/branches/dart/dartium
Patch Set: Rebase fixups Created 6 years, 2 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
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);
« no previous file with comments | « no previous file | Source/bindings/core/dart/DartUtilities.h » ('j') | Source/bindings/core/dart/DartUtilities.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698