Reviewers: adamk, rossberg,
Description:
Re-enable freezing of Object.observe changeRecords now that freezing is
faster.
Please review this at https://codereview.chromium.org/15898004/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files:
M src/object-observe.js
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);
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);
}
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.