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

Unified Diff: src/object-observe.js

Issue 12183018: Create pre-frozen change records for Object.observe (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 10 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 | « src/heap.h ('k') | src/objects.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/object-observe.js
diff --git a/src/object-observe.js b/src/object-observe.js
index b35f547eda0b89f5a1530e39d552f8f86b55e601..e4a68759e6fc05654d79938023f2800d318f27bc 100644
--- a/src/object-observe.js
+++ b/src/object-observe.js
@@ -130,12 +130,8 @@ function EnqueueChangeRecord(changeRecord, observers) {
}
}
-function NotifyChange(type, object, name, oldValue) {
- var objectInfo = objectInfoMap.get(object);
- var changeRecord = (arguments.length < 4) ?
- { type: type, object: object, name: name } :
- { type: type, object: object, name: name, oldValue: oldValue };
- ObjectFreeze(changeRecord);
+function NotifyChange(changeRecord) {
+ var objectInfo = objectInfoMap.get(changeRecord.object);
EnqueueChangeRecord(changeRecord, objectInfo.changeObservers);
}
« no previous file with comments | « src/heap.h ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698