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

Unified Diff: src/object-observe.js

Issue 15898004: Re-enable freezing of Object.observe changeRecords now that freezing is faster. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 7 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 | « no previous file | no next file » | 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 b28f928a4849a7da49e4350dd493645c53b6c3cc..5ca70bcff565c8daf8fc15d8343aee3bbd0b59c8 100644
--- a/src/object-observe.js
+++ b/src/object-observe.js
@@ -308,10 +308,8 @@ function EnqueueSpliceRecord(array, index, removed, deleteCount, addedCount) {
};
changeRecord.removed.length = deleteCount;
- // TODO(rafaelw): This breaks spec-compliance. Re-enable when freezing isn't
- // slow.
- // ObjectFreeze(changeRecord);
- // ObjectFreeze(changeRecord.removed);
+ ObjectFreeze(changeRecord);
+ ObjectFreeze(changeRecord.removed);
adamk 2013/05/23 21:12:39 I'd leave this out for now, as it basically double
rafaelw 2013/05/23 22:53:18 I went back and tried as hard as I could to create
adamk 2013/05/23 22:55:49 Sounds good to me, thanks for doing the footwork t
EnqueueChangeRecord(changeRecord, objectInfo.changeObservers);
}
@@ -323,9 +321,7 @@ function NotifyChange(type, object, name, oldValue) {
var changeRecord = (arguments.length < 4) ?
{ type: type, object: object, name: name } :
{ type: type, object: object, name: name, oldValue: oldValue };
- // TODO(rafaelw): This breaks spec-compliance. Re-enable when freezing isn't
- // slow.
- // ObjectFreeze(changeRecord);
+ ObjectFreeze(changeRecord);
EnqueueChangeRecord(changeRecord, objectInfo.changeObservers);
}
@@ -351,9 +347,7 @@ function ObjectNotifierNotify(changeRecord) {
%DefineOrRedefineDataProperty(newRecord, prop, changeRecord[prop],
READ_ONLY + DONT_DELETE);
}
- // TODO(rafaelw): This breaks spec-compliance. Re-enable when freezing isn't
- // slow.
- // ObjectFreeze(newRecord);
+ ObjectFreeze(newRecord);
EnqueueChangeRecord(newRecord, objectInfo.changeObservers);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698