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

Side by Side Diff: runtime/lib/isolate.cc

Issue 93873015: - Remove the reply_port from the VM internal message object. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/bin/vmservice_impl.cc ('k') | runtime/lib/isolate_patch.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "platform/assert.h" 5 #include "platform/assert.h"
6 #include "vm/bootstrap_natives.h" 6 #include "vm/bootstrap_natives.h"
7 #include "vm/class_finalizer.h" 7 #include "vm/class_finalizer.h"
8 #include "vm/dart.h" 8 #include "vm/dart.h"
9 #include "vm/dart_api_impl.h" 9 #include "vm/dart_api_impl.h"
10 #include "vm/dart_entry.h" 10 #include "vm/dart_entry.h"
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 DEFINE_NATIVE_ENTRY(SendPortImpl_sendInternal_, 2) { 98 DEFINE_NATIVE_ENTRY(SendPortImpl_sendInternal_, 2) {
99 GET_NON_NULL_NATIVE_ARGUMENT(Smi, send_id, arguments->NativeArgAt(0)); 99 GET_NON_NULL_NATIVE_ARGUMENT(Smi, send_id, arguments->NativeArgAt(0));
100 // TODO(iposva): Allow for arbitrary messages to be sent. 100 // TODO(iposva): Allow for arbitrary messages to be sent.
101 GET_NON_NULL_NATIVE_ARGUMENT(Instance, obj, arguments->NativeArgAt(1)); 101 GET_NON_NULL_NATIVE_ARGUMENT(Instance, obj, arguments->NativeArgAt(1));
102 102
103 uint8_t* data = NULL; 103 uint8_t* data = NULL;
104 MessageWriter writer(&data, &allocator); 104 MessageWriter writer(&data, &allocator);
105 writer.WriteMessage(obj); 105 writer.WriteMessage(obj);
106 106
107 // TODO(turnidge): Throw an exception when the return value is false? 107 // TODO(turnidge): Throw an exception when the return value is false?
108 PortMap::PostMessage(new Message(send_id.Value(), Message::kIllegalPort, 108 PortMap::PostMessage(new Message(send_id.Value(),
109 data, writer.BytesWritten(), 109 data, writer.BytesWritten(),
110 Message::kNormalPriority)); 110 Message::kNormalPriority));
111 return Object::null(); 111 return Object::null();
112 } 112 }
113 113
114 114
115 static void ThrowIsolateSpawnException(const String& message) { 115 static void ThrowIsolateSpawnException(const String& message) {
116 const Array& args = Array::Handle(Array::New(1)); 116 const Array& args = Array::Handle(Array::New(1));
117 args.SetAt(0, message); 117 args.SetAt(0, message);
118 Exceptions::ThrowByType(Exceptions::kIsolateSpawn, args); 118 Exceptions::ThrowByType(Exceptions::kIsolateSpawn, args);
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 260
261 // The control port is being accessed as a regular port from Dart code. This 261 // The control port is being accessed as a regular port from Dart code. This
262 // is most likely due to the _startIsolate code in dart:isolate. Account for 262 // is most likely due to the _startIsolate code in dart:isolate. Account for
263 // this by increasing the number of open control ports. 263 // this by increasing the number of open control ports.
264 isolate->message_handler()->increment_control_ports(); 264 isolate->message_handler()->increment_control_ports();
265 265
266 return port.raw(); 266 return port.raw();
267 } 267 }
268 268
269 } // namespace dart 269 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/bin/vmservice_impl.cc ('k') | runtime/lib/isolate_patch.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698