Commit 97c83b29 authored by rossberg@chromium.org's avatar rossberg@chromium.org

Object.observe: disable freezing changeRecords until it can be made fast

R=rossberg,adamk
BUG=

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14569 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 66170c92
...@@ -138,7 +138,9 @@ function NotifyChange(type, object, name, oldValue) { ...@@ -138,7 +138,9 @@ function NotifyChange(type, object, name, oldValue) {
var changeRecord = (arguments.length < 4) ? var changeRecord = (arguments.length < 4) ?
{ type: type, object: object, name: name } : { type: type, object: object, name: name } :
{ type: type, object: object, name: name, oldValue: oldValue }; { type: type, object: object, name: name, oldValue: oldValue };
ObjectFreeze(changeRecord); // TODO(rafaelw): This breaks spec-compliance. Re-enable when freezing isn't
// slow.
// ObjectFreeze(changeRecord);
EnqueueChangeRecord(changeRecord, objectInfo.changeObservers); EnqueueChangeRecord(changeRecord, objectInfo.changeObservers);
} }
...@@ -164,7 +166,9 @@ function ObjectNotifierNotify(changeRecord) { ...@@ -164,7 +166,9 @@ function ObjectNotifierNotify(changeRecord) {
%DefineOrRedefineDataProperty(newRecord, prop, changeRecord[prop], %DefineOrRedefineDataProperty(newRecord, prop, changeRecord[prop],
READ_ONLY + DONT_DELETE); READ_ONLY + DONT_DELETE);
} }
ObjectFreeze(newRecord); // TODO(rafaelw): This breaks spec-compliance. Re-enable when freezing isn't
// slow.
// ObjectFreeze(newRecord);
EnqueueChangeRecord(newRecord, objectInfo.changeObservers); 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