Index: vm/exceptions.cc |
=================================================================== |
--- vm/exceptions.cc (revision 16583) |
+++ vm/exceptions.cc (working copy) |
@@ -393,58 +393,58 @@ |
RawObject* Exceptions::Create(ExceptionType type, const Array& arguments) { |
Library& library = Library::Handle(); |
- String& class_name = String::Handle(); |
+ const String* class_name = NULL; |
switch (type) { |
case kNone: |
UNREACHABLE(); |
break; |
case kRange: |
library = Library::CoreLibrary(); |
- class_name = Symbols::New("RangeError"); |
+ class_name = &Symbols::RangeError(); |
break; |
case kArgument: |
library = Library::CoreLibrary(); |
- class_name = Symbols::New("ArgumentError"); |
+ class_name = &Symbols::ArgumentError(); |
break; |
case kNoSuchMethod: |
library = Library::CoreLibrary(); |
- class_name = Symbols::New("NoSuchMethodError"); |
+ class_name = &Symbols::NoSuchMethodError(); |
break; |
case kFormat: |
library = Library::CoreLibrary(); |
- class_name = Symbols::New("FormatException"); |
+ class_name = &Symbols::FormatException(); |
break; |
case kStackOverflow: |
library = Library::CoreLibrary(); |
- class_name = Symbols::New("StackOverflowError"); |
+ class_name = &Symbols::StackOverflowError(); |
break; |
case kOutOfMemory: |
library = Library::CoreLibrary(); |
- class_name = Symbols::New("OutOfMemoryError"); |
+ class_name = &Symbols::OutOfMemoryError(); |
break; |
case kInternalError: |
library = Library::CoreLibrary(); |
- class_name = Symbols::New("InternalError"); |
+ class_name = &Symbols::InternalError(); |
break; |
case kNullThrown: |
library = Library::CoreLibrary(); |
- class_name = Symbols::New("NullThrownError"); |
+ class_name = &Symbols::NullThrownError(); |
break; |
case kIllegalJSRegExp: |
library = Library::CoreLibrary(); |
- class_name = Symbols::New("IllegalJSRegExpException"); |
+ class_name = &Symbols::IllegalJSRegExpException(); |
break; |
case kIsolateSpawn: |
library = Library::IsolateLibrary(); |
- class_name = Symbols::New("IsolateSpawnException"); |
+ class_name = &Symbols::IsolateSpawnException(); |
break; |
case kIsolateUnhandledException: |
library = Library::IsolateLibrary(); |
- class_name = Symbols::New("IsolateUnhandledException"); |
+ class_name = &Symbols::IsolateUnhandledException(); |
break; |
} |
- return DartLibraryCalls::ExceptionCreate(library, class_name, arguments); |
+ return DartLibraryCalls::ExceptionCreate(library, *class_name, arguments); |
} |
} // namespace dart |