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

Unified Diff: runtime/vm/isolate.cc

Issue 1012333002: Keep zone cached in SnapshotReader to allow removing ZoneHandle(Isolate*) interface. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 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
« no previous file with comments | « runtime/vm/isolate.h ('k') | runtime/vm/native_entry.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/isolate.cc
===================================================================
--- runtime/vm/isolate.cc (revision 44579)
+++ runtime/vm/isolate.cc (working copy)
@@ -357,7 +357,8 @@
}
// Parse the message.
- SnapshotReader reader(message->data(), message->len(), Snapshot::kMessage, I);
+ SnapshotReader reader(message->data(), message->len(), Snapshot::kMessage,
+ I, zone.GetZone());
const Object& msg_obj = Object::Handle(I, reader.ReadObject());
if (msg_obj.IsError()) {
// An error occurred while reading the message.
@@ -1221,8 +1222,8 @@
const Array& args = Array::Handle(Array::New(7));
args.SetAt(0, SendPort::Handle(SendPort::New(state->parent_port())));
args.SetAt(1, Instance::Handle(func.ImplicitStaticClosure()));
- args.SetAt(2, Instance::Handle(state->BuildArgs()));
- args.SetAt(3, Instance::Handle(state->BuildMessage()));
+ args.SetAt(2, Instance::Handle(state->BuildArgs(zone.GetZone())));
+ args.SetAt(3, Instance::Handle(state->BuildMessage(zone.GetZone())));
args.SetAt(4, is_spawn_uri ? Bool::True() : Bool::False());
args.SetAt(5, ReceivePort::Handle(
ReceivePort::New(isolate->main_port(), true /* control port */)));
@@ -1795,12 +1796,13 @@
static RawInstance* DeserializeObject(Isolate* isolate,
+ Zone* zone,
uint8_t* obj_data,
intptr_t obj_len) {
if (obj_data == NULL) {
return Instance::null();
}
- SnapshotReader reader(obj_data, obj_len, Snapshot::kMessage, isolate);
+ SnapshotReader reader(obj_data, obj_len, Snapshot::kMessage, isolate, zone);
const Object& obj = Object::Handle(isolate, reader.ReadObject());
ASSERT(!obj.IsError());
Instance& instance = Instance::Handle(isolate);
@@ -1959,13 +1961,14 @@
}
-RawInstance* IsolateSpawnState::BuildArgs() {
- return DeserializeObject(isolate_, serialized_args_, serialized_args_len_);
+RawInstance* IsolateSpawnState::BuildArgs(Zone* zone) {
+ return DeserializeObject(isolate_, zone,
+ serialized_args_, serialized_args_len_);
}
-RawInstance* IsolateSpawnState::BuildMessage() {
- return DeserializeObject(isolate_,
+RawInstance* IsolateSpawnState::BuildMessage(Zone* zone) {
+ return DeserializeObject(isolate_, zone,
serialized_message_, serialized_message_len_);
}
« no previous file with comments | « runtime/vm/isolate.h ('k') | runtime/vm/native_entry.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698