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

Unified Diff: lib/observe.dart

Issue 20863002: Introduce boot.js: this finally makes it possible to load and run Todomvc (Closed) Base URL: git@github.com:dart-lang/web-ui.git@master
Patch Set: Created 7 years, 5 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/observe.dart
diff --git a/lib/observe.dart b/lib/observe.dart
index 42144caba568d58fa378f1b7bc7c3bdca07fd504..926f624c6bdf06811d204396e41454d1c486542d 100644
--- a/lib/observe.dart
+++ b/lib/observe.dart
@@ -13,23 +13,6 @@ import 'dart:async';
import 'dart:html' show PathObserver;
import 'package:observe/observe.dart';
-/**
- * Use `@observable` to make a property observable.
- * The overhead will be minimal unless they are actually being observed.
- */
-const observable = const _ObservableAnnotation();
-
-/**
- * The type of the `@observable` annotation.
- *
- * Library private because you should be able to use the [observable] field
- * to get the one and only instance. We could make it public though, if anyone
- * needs it for some reason.
- */
-class _ObservableAnnotation {
- const _ObservableAnnotation();
-}
-
// Inspired by ArrayReduction at:
// https://raw.github.com/rafaelw/ChangeSummary/master/util/array_reduction.js
// The main difference is we support anything on the rich Dart Iterable API.
@@ -121,7 +104,7 @@ class ListPathObserver<E, P> extends ObservableBase {
void _scheduleReduce(_) {
if (_scheduled) return;
_scheduled = true;
- queueChangeRecords(_reduce);
+ runAsync(_reduce);
}
_observeItems(int lengthAdjust) {
@@ -129,7 +112,7 @@ class ListPathObserver<E, P> extends ObservableBase {
for (int i = 0; i < lengthAdjust; i++) {
int len = _observers.length;
var pathObs = new PathObserver(list, '$len.$_itemPath');
- _subs.add(pathObs.values.listen(_scheduleReduce));
+ _subs.add(pathObs.bindSync(_scheduleReduce));
Jennifer Messerly 2013/07/27 02:18:44 this should be: pathObs.changes.listen(_schedul
Siggi Cherem (dart-lang) 2013/07/30 00:10:29 Done. Thanks, I saw 'values' went away, but didn't
_observers.add(pathObs);
}
} else if (lengthAdjust < 0) {

Powered by Google App Engine
This is Rietveld 408576698