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

Unified Diff: runtime/vm/object.cc

Issue 834233003: Fix for issue 21398 (only send "literal like" objects across isolates spawned using spawnURI (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 11 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.h ('k') | runtime/vm/raw_object.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.cc
===================================================================
--- runtime/vm/object.cc (revision 42788)
+++ runtime/vm/object.cc (working copy)
@@ -19945,7 +19945,8 @@
bool is_control_port,
Heap::Space space) {
Isolate* isolate = Isolate::Current();
- const SendPort& send_port = SendPort::Handle(isolate, SendPort::New(id));
+ const SendPort& send_port =
+ SendPort::Handle(isolate, SendPort::New(id, isolate->origin_id()));
ReceivePort& result = ReceivePort::Handle(isolate);
{
@@ -19976,6 +19977,13 @@
RawSendPort* SendPort::New(Dart_Port id, Heap::Space space) {
+ return New(id, Isolate::Current()->origin_id(), space);
+}
+
+
+RawSendPort* SendPort::New(Dart_Port id,
+ Dart_Port origin_id,
+ Heap::Space space) {
SendPort& result = SendPort::Handle();
{
RawObject* raw = Object::Allocate(SendPort::kClassId,
@@ -19984,6 +19992,7 @@
NoGCScope no_gc;
result ^= raw;
result.StoreNonPointer(&result.raw_ptr()->id_, id);
+ result.StoreNonPointer(&result.raw_ptr()->origin_id_, origin_id);
}
return result.raw();
}
« no previous file with comments | « runtime/vm/object.h ('k') | runtime/vm/raw_object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698