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

Unified Diff: runtime/vm/object_store.cc

Issue 388963003: Avoid allocating an exception object in the snapshot reader. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: addressed comments Created 6 years, 5 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/object_store.h ('k') | runtime/vm/raw_object_snapshot.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object_store.cc
===================================================================
--- runtime/vm/object_store.cc (revision 38227)
+++ runtime/vm/object_store.cc (working copy)
@@ -132,6 +132,13 @@
return false;
}
set_out_of_memory(Instance::Cast(result));
+
+ // Allocate pre-allocated unhandled exception object initialized with the
+ // pre-allocated OutOfMemoryError.
+ const UnhandledException& unhandled_exception = UnhandledException::Handle(
+ UnhandledException::New(Instance::Cast(result), Object::null_instance()));
+ set_preallocated_unhandled_exception(unhandled_exception);
+
const Array& code_array = Array::Handle(
isolate,
Array::New(Stacktrace::kPreallocatedStackdepth, Heap::kOld));
« no previous file with comments | « runtime/vm/object_store.h ('k') | runtime/vm/raw_object_snapshot.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698