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

Side by Side Diff: lib/isolate/frog/isolateimpl.dart

Issue 10389097: Move dart:dom to dart:dom_deprecated (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 7 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 /** 5 /**
6 * Concepts used here: 6 * Concepts used here:
7 * 7 *
8 * "manager" - A manager contains one or more isolates, schedules their 8 * "manager" - A manager contains one or more isolates, schedules their
9 * execution, and performs other plumbing on their behalf. The isolate 9 * execution, and performs other plumbing on their behalf. The isolate
10 * present at the creation of the manager is designated as its "root isolate". 10 * present at the creation of the manager is designated as its "root isolate".
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 void set id(int i) { throw new NotImplementedException(); } 323 void set id(int i) { throw new NotImplementedException(); }
324 void set onmessage(f) { 324 void set onmessage(f) {
325 throw new Exception("onmessage should not be set on MainManagerStub"); 325 throw new Exception("onmessage should not be set on MainManagerStub");
326 } 326 }
327 void postMessage(msg) native @"$globalThis.postMessage(msg);"; 327 void postMessage(msg) native @"$globalThis.postMessage(msg);";
328 void terminate() {} // Nothing useful to do here. 328 void terminate() {} // Nothing useful to do here.
329 } 329 }
330 330
331 /** 331 /**
332 * A stub for interacting with a manager built on a web worker. The type 332 * A stub for interacting with a manager built on a web worker. The type
333 * Worker is also defined in 'dart:dom', but we define it here to avoid 333 * Worker is also defined in 'dart:dom_deprecated', but we define it here to avo id
334 * introducing a dependency from corelib to dom. This definition uses a 334 * introducing a dependency from corelib to dom. This definition uses a
335 * 'hidden' type (* prefix on the native name) to enforce that the type is 335 * 'hidden' type (* prefix on the native name) to enforce that the type is
336 * defined dynamically only when web workers are actually available. 336 * defined dynamically only when web workers are actually available.
337 */ 337 */
338 class _WorkerStub implements _ManagerStub native "*Worker" { 338 class _WorkerStub implements _ManagerStub native "*Worker" {
339 get id() native "return this.id;"; 339 get id() native "return this.id;";
340 void set id(i) native "this.id = i;"; 340 void set id(i) native "this.id = i;";
341 void set onmessage(f) native "this.onmessage = f;"; 341 void set onmessage(f) native "this.onmessage = f;";
342 void postMessage(msg) native "return this.postMessage(msg);"; 342 void postMessage(msg) native "return this.postMessage(msg);";
343 // terminate() is implemented by Worker. 343 // terminate() is implemented by Worker.
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
647 'command': 'start2', 647 'command': 'start2',
648 'id': workerId, 648 'id': workerId,
649 // Note: we serialize replyPort twice because the child worker needs to 649 // Note: we serialize replyPort twice because the child worker needs to
650 // first deserialize the worker id, before it can correctly deserialize 650 // first deserialize the worker id, before it can correctly deserialize
651 // the port (port deserialization is sensitive to what is the current 651 // the port (port deserialization is sensitive to what is the current
652 // workerId). 652 // workerId).
653 'replyTo': _serializeMessage(replyPort), 653 'replyTo': _serializeMessage(replyPort),
654 'functionName': functionName })); 654 'functionName': functionName }));
655 } 655 }
656 } 656 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698