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

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

Side-by-side diff isn't available for this file because of its large size.
Issue 10837088: Implement spawnDomFunction (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix return type Created 8 years, 4 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
Index: lib/html/dartium/html_dartium.dart
diff --git a/lib/html/dartium/html_dartium.dart b/lib/html/dartium/html_dartium.dart
index 73e89b769b0bf86ec40b066cb2d08ca14ead32e3..a8f939092c0e244fdb88a46c0009cc9d6e37731b 100644
--- a/lib/html/dartium/html_dartium.dart
+++ b/lib/html/dartium/html_dartium.dart
@@ -41199,12 +41199,9 @@ class _Deserializer {
// BSD-style license that can be found in the LICENSE file.
// This API is exploratory.
-spawnDomIsolate(Window targetWindow, String entryPoint) {
- if (targetWindow is! _DOMWindowImpl && targetWindow is! _DOMWindowCrossFrameImpl) {
- throw 'Bad window argument: $targetWindow';
- }
+spawnDomFunction(Function topLevelFunction) {
final result = new Completer<SendPort>();
- final port = _Utils.spawnDomIsolateImpl(targetWindow, entryPoint);
+ final port = _Utils.spawnDomFunctionImpl(topLevelFunction);
window.setTimeout(() { result.complete(port); }, 0);
return result.future;
}
@@ -41265,7 +41262,7 @@ class _Utils {
}
static window() native "Utils_window";
- static SendPort spawnDomIsolateImpl(Window window, String entryPoint) native "Utils_spawnDomIsolate";
+ static SendPort spawnDomFunctionImpl(Function topLevelFunction) native "Utils_spawnDomFunction";
static int _getNewIsolateId() native "Utils_getNewIsolateId";
}

Powered by Google App Engine
This is Rietveld 408576698