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

Unified Diff: sdk/lib/html/dartium/html_dartium.dart

Side-by-side diff isn't available for this file because of its large size.
Issue 23868034: Remove spawnDomFunction from dart:html (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 3 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:
Download patch
« no previous file with comments | « sdk/lib/html/dart2js/html_dart2js.dart ('k') | tests/html/dom_isolates_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/html/dartium/html_dartium.dart
diff --git a/sdk/lib/html/dartium/html_dartium.dart b/sdk/lib/html/dartium/html_dartium.dart
index 03151b8b676b6b9523dca4d2bbef2eb9bcdd2a3b..e110e62fd2c2e82a22f9a77133b5909a554e71bb 100644
--- a/sdk/lib/html/dartium/html_dartium.dart
+++ b/sdk/lib/html/dartium/html_dartium.dart
@@ -34440,25 +34440,6 @@ class Platform {
// BSD-style license that can be found in the LICENSE file.
-_makeSendPortFuture(spawnRequest) {
- final completer = new Completer<SendPort>.sync();
- final port = new ReceivePort();
- port.receive((result, _) {
- completer.complete(result);
- port.close();
- });
- // TODO: SendPort.hashCode is ugly way to access port id.
- spawnRequest(port.toSendPort().hashCode);
- return completer.future;
-}
-
-// This API is exploratory.
-Future<SendPort> spawnDomFunction(Function f) =>
- _makeSendPortFuture((portId) { _Utils.spawnDomFunction(f, portId); });
-
-Future<SendPort> spawnDomUri(String uri) =>
- _makeSendPortFuture((portId) { _Utils.spawnDomUri(uri, portId); });
-
// testRunner implementation.
// FIXME: provide a separate lib for testRunner.
@@ -34576,7 +34557,6 @@ class _Utils {
static window() native "Utils_window";
static forwardingPrint(String message) native "Utils_forwardingPrint";
static void spawnDomFunction(Function f, int replyTo) native "Utils_spawnDomFunction";
- static void spawnDomUri(String uri, int replyTo) native "Utils_spawnDomUri";
static int _getNewIsolateId() native "Utils_getNewIsolateId";
// The following methods were added for debugger integration to make working
@@ -34848,8 +34828,28 @@ class _DOMStringMap extends NativeFieldWrapperClass1 implements Map<String, Stri
bool get isNotEmpty => Maps.isNotEmpty(this);
}
+// TODO(vsm): Remove DOM isolate code. This is only used to support
+// printing and timers in background isolates. Background isolates
+// should just forward to the main DOM isolate instead of requiring a
+// special DOM isolate.
+
+_makeSendPortFuture(spawnRequest) {
+ final completer = new Completer<SendPort>.sync();
+ final port = new ReceivePort();
+ port.receive((result, _) {
+ completer.complete(result);
+ port.close();
+ });
+ // TODO: SendPort.hashCode is ugly way to access port id.
+ spawnRequest(port.toSendPort().hashCode);
+ return completer.future;
+}
+
+Future<SendPort> _spawnDomFunction(Function f) =>
+ _makeSendPortFuture((portId) { _Utils.spawnDomFunction(f, portId); });
+
final Future<SendPort> __HELPER_ISOLATE_PORT =
- spawnDomFunction(_helperIsolateMain);
+ _spawnDomFunction(_helperIsolateMain);
// Tricky part.
// Once __HELPER_ISOLATE_PORT gets resolved, it will still delay in .then
« no previous file with comments | « sdk/lib/html/dart2js/html_dart2js.dart ('k') | tests/html/dom_isolates_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698