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

Unified Diff: test/mjsunit/harmony/object-observe.js

Issue 36313002: [Object.observe] Implement implicit notification from performChange (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: moar Created 7 years, 2 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
« src/object-observe.js ('K') | « src/object-observe.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/harmony/object-observe.js
diff --git a/test/mjsunit/harmony/object-observe.js b/test/mjsunit/harmony/object-observe.js
index f94ab75e9a84d2cf0d819510782b23a660057bcc..5615d9e3fd1127696bc772c27baed714292116f1 100644
--- a/test/mjsunit/harmony/object-observe.js
+++ b/test/mjsunit/harmony/object-observe.js
@@ -434,12 +434,10 @@ Thingy.prototype = {
notifier.performChange(Thingy.INCREMENT, function() {
self.a += amount;
self.b += amount;
- });
- notifier.notify({
- object: this,
- type: Thingy.INCREMENT,
- incremented: amount
+ return {
+ incremented: amount
+ }; // implicit notify
});
},
@@ -450,12 +448,10 @@ Thingy.prototype = {
notifier.performChange(Thingy.MULTIPLY, function() {
self.a *= amount;
self.b *= amount;
- });
- notifier.notify({
- object: this,
- type: Thingy.MULTIPLY,
- multiplied: amount
+ return {
+ multiplied: amount
+ }; // implicit notify
});
},
@@ -466,13 +462,11 @@ Thingy.prototype = {
notifier.performChange(Thingy.INCREMENT_AND_MULTIPLY, function() {
self.increment(incAmount);
self.multiply(multAmount);
- });
- notifier.notify({
- object: this,
- type: Thingy.INCREMENT_AND_MULTIPLY,
- incremented: incAmount,
- multiplied: multAmount
+ return {
+ incremented: incAmount,
+ multiplied: multAmount
+ }; // implicit notify
});
}
}
@@ -545,7 +539,6 @@ RecursiveThingy.prototype = {
});
notifier.notify({
- object: this,
type: RecursiveThingy.MULTIPLY_FIRST_N,
multiplied: amount,
n: n
@@ -606,7 +599,6 @@ DeckSuit.prototype = {
});
notifier.notify({
- object: this,
type: DeckSuit.SHUFFLE
});
},
« src/object-observe.js ('K') | « src/object-observe.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698