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

Unified Diff: runtime/vm/exceptions.cc

Issue 14273021: Report OOM errors instead of asserting on allocation failures when sending (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 8 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
« no previous file with comments | « runtime/vm/exceptions.h ('k') | runtime/vm/object.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/exceptions.cc
===================================================================
--- runtime/vm/exceptions.cc (revision 21956)
+++ runtime/vm/exceptions.cc (working copy)
@@ -535,6 +535,22 @@
}
+void Exceptions::ThrowOOM() {
+ Isolate* isolate = Isolate::Current();
+ const Instance& oom = Instance::Handle(
+ isolate, isolate->object_store()->out_of_memory());
+ Throw(oom);
+}
+
+
+void Exceptions::ThrowStackOverflow() {
+ Isolate* isolate = Isolate::Current();
+ const Instance& stack_overflow = Instance::Handle(
+ isolate, isolate->object_store()->stack_overflow());
+ Throw(stack_overflow);
+}
+
+
RawObject* Exceptions::Create(ExceptionType type, const Array& arguments) {
Library& library = Library::Handle();
const String* class_name = NULL;
« no previous file with comments | « runtime/vm/exceptions.h ('k') | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698