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

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
« no previous file with comments | « runtime/lib/isolate.cc ('k') | runtime/vm/benchmark_test.cc » ('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 import "dart:collection" show HashMap; 5 import "dart:collection" show HashMap;
6 import "dart:_internal"; 6 import "dart:_internal";
7 7
8 patch class ReceivePort { 8 patch class ReceivePort {
9 /* patch */ factory ReceivePort() = _ReceivePortImpl; 9 /* patch */ factory ReceivePort() = _ReceivePortImpl;
10 10
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 335
336 // TODO(iposva): Cleanup to have only one definition. 336 // TODO(iposva): Cleanup to have only one definition.
337 // These values need to be kept in sync with the class IsolateMessageHandler 337 // These values need to be kept in sync with the class IsolateMessageHandler
338 // in vm/isolate.cc. 338 // in vm/isolate.cc.
339 static const _PAUSE = 1; 339 static const _PAUSE = 1;
340 static const _RESUME = 2; 340 static const _RESUME = 2;
341 static const _PING = 3; 341 static const _PING = 3;
342 static const _KILL = 4; 342 static const _KILL = 4;
343 343
344 344
345 static SendPort _spawnFunction(SendPort readyPort, Function topLevelFunction, 345 static void _spawnFunction(SendPort readyPort, Function topLevelFunction,
346 var message, bool paused) 346 var message, bool paused)
347 native "Isolate_spawnFunction"; 347 native "Isolate_spawnFunction";
348 348
349 static SendPort _spawnUri(SendPort readyPort, String uri, 349 static void _spawnUri(SendPort readyPort, String uri,
350 List<String> args, var message, 350 List<String> args, var message,
351 bool paused, String packageRoot) 351 bool paused, String packageRoot)
352 native "Isolate_spawnUri"; 352 native "Isolate_spawnUri";
353 353
354 static void _sendOOB(port, msg) native "Isolate_sendOOB"; 354 static void _sendOOB(port, msg) native "Isolate_sendOOB";
355 355
356 /* patch */ void _pause(Capability resumeCapability) { 356 /* patch */ void _pause(Capability resumeCapability) {
357 var msg = new List(4) 357 var msg = new List(4)
358 ..[0] = 0 // Make room for OOB message type. 358 ..[0] = 0 // Make room for OOB message type.
359 ..[1] = _PAUSE 359 ..[1] = _PAUSE
360 ..[2] = pauseCapability 360 ..[2] = pauseCapability
361 ..[3] = resumeCapability; 361 ..[3] = resumeCapability;
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 static Isolate _getCurrentIsolate() { 412 static Isolate _getCurrentIsolate() {
413 List portAndCapabilities = _getPortAndCapabilitiesOfCurrentIsolate(); 413 List portAndCapabilities = _getPortAndCapabilitiesOfCurrentIsolate();
414 return new Isolate(portAndCapabilities[0], 414 return new Isolate(portAndCapabilities[0],
415 pauseCapability: portAndCapabilities[1], 415 pauseCapability: portAndCapabilities[1],
416 terminateCapability: portAndCapabilities[2]); 416 terminateCapability: portAndCapabilities[2]);
417 } 417 }
418 418
419 static List _getPortAndCapabilitiesOfCurrentIsolate() 419 static List _getPortAndCapabilitiesOfCurrentIsolate()
420 native "Isolate_getPortAndCapabilitiesOfCurrentIsolate"; 420 native "Isolate_getPortAndCapabilitiesOfCurrentIsolate";
421 } 421 }
OLDNEW
« no previous file with comments | « runtime/lib/isolate.cc ('k') | runtime/vm/benchmark_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698