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

Side by Side Diff: runtime/lib/isolate_patch.dart

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 unified diff | Download patch | Annotate | Revision Log
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 import "dart:collection" show HashMap; 5 import "dart:collection" show HashMap;
6 6
7 patch class ReceivePort { 7 patch class ReceivePort {
8 /* patch */ factory ReceivePort() = _ReceivePortImpl; 8 /* patch */ factory ReceivePort() = _ReceivePortImpl;
9 9
10 /* patch */ factory ReceivePort.fromRawReceivePort(RawReceivePort rawPort) = 10 /* patch */ factory ReceivePort.fromRawReceivePort(RawReceivePort rawPort) =
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 329
330 // TODO(iposva): Cleanup to have only one definition. 330 // TODO(iposva): Cleanup to have only one definition.
331 // These values need to be kept in sync with the class IsolateMessageHandler 331 // These values need to be kept in sync with the class IsolateMessageHandler
332 // in vm/isolate.cc. 332 // in vm/isolate.cc.
333 static const _PAUSE = 1; 333 static const _PAUSE = 1;
334 static const _RESUME = 2; 334 static const _RESUME = 2;
335 static const _PING = 3; 335 static const _PING = 3;
336 static const _KILL = 4; 336 static const _KILL = 4;
337 337
338 338
339 static SendPort _spawnFunction(SendPort readyPort, Function topLevelFunction, 339 static void _spawnFunction(SendPort readyPort, Function topLevelFunction,
340 var message, bool paused) 340 var message, bool paused)
341 native "Isolate_spawnFunction"; 341 native "Isolate_spawnFunction";
342 342
343 static SendPort _spawnUri(SendPort readyPort, String uri, 343 static void _spawnUri(SendPort readyPort, String uri,
344 List<String> args, var message, 344 List<String> args, var message,
345 bool paused, String packageRoot) 345 bool paused, String packageRoot)
346 native "Isolate_spawnUri"; 346 native "Isolate_spawnUri";
347 347
348 static void _sendOOB(port, msg) native "Isolate_sendOOB"; 348 static void _sendOOB(port, msg) native "Isolate_sendOOB";
349 349
350 /* patch */ void _pause(Capability resumeCapability) { 350 /* patch */ void _pause(Capability resumeCapability) {
351 var msg = new List(4) 351 var msg = new List(4)
352 ..[0] = 0 // Make room for OOB message type. 352 ..[0] = 0 // Make room for OOB message type.
353 ..[1] = _PAUSE 353 ..[1] = _PAUSE
354 ..[2] = pauseCapability 354 ..[2] = pauseCapability
355 ..[3] = resumeCapability; 355 ..[3] = resumeCapability;
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
406 static Isolate _getCurrentIsolate() { 406 static Isolate _getCurrentIsolate() {
407 List portAndCapabilities = _getPortAndCapabilitiesOfCurrentIsolate(); 407 List portAndCapabilities = _getPortAndCapabilitiesOfCurrentIsolate();
408 return new Isolate(portAndCapabilities[0], 408 return new Isolate(portAndCapabilities[0],
409 pauseCapability: portAndCapabilities[1], 409 pauseCapability: portAndCapabilities[1],
410 terminateCapability: portAndCapabilities[2]); 410 terminateCapability: portAndCapabilities[2]);
411 } 411 }
412 412
413 static List _getPortAndCapabilitiesOfCurrentIsolate() 413 static List _getPortAndCapabilitiesOfCurrentIsolate()
414 native "Isolate_getPortAndCapabilitiesOfCurrentIsolate"; 414 native "Isolate_getPortAndCapabilitiesOfCurrentIsolate";
415 } 415 }
OLDNEW
« no previous file with comments | « runtime/lib/isolate.cc ('k') | runtime/vm/benchmark_test.cc » ('j') | runtime/vm/service.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698