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

Unified Diff: lib/dom/src/native_DOMPublic.dart

Issue 10837088: Implement spawnDomFunction (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Regen dart:html 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:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/dom/src/native_DOMImplementation.dart ('k') | lib/dom/templates/html/dart2js/html_dart2js.darttemplate » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/dom/src/native_DOMPublic.dart
diff --git a/lib/dom/src/native_DOMPublic.dart b/lib/dom/src/native_DOMPublic.dart
index fe76bea11d339f31e90d2ea4029d45bca0f21a49..9bfac9e241c2421f767bf4fee71ebe4317c3c255 100644
--- a/lib/dom/src/native_DOMPublic.dart
+++ b/lib/dom/src/native_DOMPublic.dart
@@ -3,15 +3,7 @@
// 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';
- }
- final result = new Completer<SendPort>();
- final port = _Utils.spawnDomIsolateImpl(targetWindow, entryPoint);
- window.setTimeout(() { result.complete(port); }, 0);
- return result.future;
-}
+spawnDomFunction(Function topLevelFunction) => _Utils.spawnDomFunctionImpl(topLevelFunction);
// layoutTestController implementation.
// FIXME: provide a separate lib for layoutTestController.
« no previous file with comments | « lib/dom/src/native_DOMImplementation.dart ('k') | lib/dom/templates/html/dart2js/html_dart2js.darttemplate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698