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

Unified Diff: runtime/vm/exceptions.cc

Issue 9691005: Implement spawnFunction from the new isolate api. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 9 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: runtime/vm/exceptions.cc
===================================================================
--- runtime/vm/exceptions.cc (revision 5367)
+++ runtime/vm/exceptions.cc (working copy)
@@ -298,47 +298,64 @@
RawObject* Exceptions::Create(
ExceptionType type, const GrowableArray<const Object*>& arguments) {
+ Library& library = Library::Handle();
String& class_name = String::Handle();
switch (type) {
case kIndexOutOfRange:
+ library = Library::CoreLibrary();
class_name = String::NewSymbol("IndexOutOfRangeException");
break;
case kIllegalArgument:
+ library = Library::CoreLibrary();
class_name = String::NewSymbol("IllegalArgumentException");
break;
case kNoSuchMethod:
+ library = Library::CoreLibrary();
class_name = String::NewSymbol("NoSuchMethodException");
break;
case kClosureArgumentMismatch:
+ library = Library::CoreLibrary();
class_name = String::NewSymbol("ClosureArgumentMismatchException");
break;
case kObjectNotClosure:
+ library = Library::CoreLibrary();
class_name = String::NewSymbol("ObjectNotClosureException");
break;
case kBadNumberFormat:
+ library = Library::CoreLibrary();
class_name = String::NewSymbol("BadNumberFormatException");
break;
case kStackOverflow:
+ library = Library::CoreLibrary();
class_name = String::NewSymbol("StackOverflowException");
break;
case kOutOfMemory:
+ library = Library::CoreLibrary();
class_name = String::NewSymbol("OutOfMemoryException");
break;
case kWrongArgumentCount:
+ library = Library::CoreLibrary();
class_name = String::NewSymbol("WrongArgumentCountException");
break;
case kInternalError:
+ library = Library::CoreLibrary();
class_name = String::NewSymbol("InternalError");
break;
case kNullPointer:
+ library = Library::CoreLibrary();
class_name = String::NewSymbol("NullPointerException");
break;
case kIllegalJSRegExp:
+ library = Library::CoreLibrary();
class_name = String::NewSymbol("IllegalJSRegExpException");
break;
+ case kIsolateSpawn:
+ library = Library::IsolateLibrary();
+ class_name = String::NewSymbol("IsolateSpawnException");
+ break;
}
- return DartLibraryCalls::ExceptionCreate(class_name, arguments);
+ return DartLibraryCalls::ExceptionCreate(library, class_name, arguments);
}
} // namespace dart
« lib/isolate/isolate_api.dart ('K') | « runtime/vm/exceptions.h ('k') | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698