Commit e8775db3 authored by rossberg@chromium.org's avatar rossberg@chromium.org

Re-enable freezing of Object.observe changeRecords now that freezing is faster.

Review URL: https://codereview.chromium.org/15898004

Patch from Rafael Weinstein <rafaelw@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14848 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 6fa98719
......@@ -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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment