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

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: Fix test 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
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..3e1ebd411cf3a628c0adc59791cc46e8e8285a6c 100644
--- a/lib/dom/src/native_DOMPublic.dart
+++ b/lib/dom/src/native_DOMPublic.dart
@@ -3,14 +3,8 @@
// 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) {
Anton Muhin 2012/08/07 12:55:29 nit: arrow syntax, please
vsm 2012/08/10 00:06:43 Done.
+ return _Utils.spawnDomFunctionImpl(topLevelFunction);
}
// layoutTestController implementation.

Powered by Google App Engine
This is Rietveld 408576698