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

Unified Diff: samples/swarm/swarm_ui_lib/observable/observable.dart

Issue 11361190: a === b -> identical(a, b) (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 8 years, 1 month 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 | « samples/swarm/swarm_ui_lib/base/Size.dart ('k') | samples/swarm/swarm_ui_lib/touch/ClickBuster.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samples/swarm/swarm_ui_lib/observable/observable.dart
diff --git a/samples/swarm/swarm_ui_lib/observable/observable.dart b/samples/swarm/swarm_ui_lib/observable/observable.dart
index c5a040142f16a0d4bd3a251004a2ec62d5b372f5..2010e99b942490b6c27ba15f37fa6986dd2b3446 100644
--- a/samples/swarm/swarm_ui_lib/observable/observable.dart
+++ b/samples/swarm/swarm_ui_lib/observable/observable.dart
@@ -215,7 +215,7 @@ class ObservableList<T>
}
int lastIndexOf(T element, [int start = null]) {
- if (start === null) start = length - 1;
+ if (start == null) start = length - 1;
return _internal.lastIndexOf(element, start);
}
@@ -285,10 +285,7 @@ class ObservableValue<T> extends AbstractObservable {
void set value(T newValue) {
// Only fire on an actual change.
- // TODO(terry): An object identity test === is needed. Each DataSource has
- // its own operator == which does a value compare. Which
- // equality check should be done?
- if (newValue !== _value) {
+ if (!identical(newValue, _value)) {
final oldValue = _value;
_value = newValue;
recordPropertyUpdate("value", newValue, oldValue);
« no previous file with comments | « samples/swarm/swarm_ui_lib/base/Size.dart ('k') | samples/swarm/swarm_ui_lib/touch/ClickBuster.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698