Closed Bug 907268 Opened 11 years ago Closed 11 years ago

Each access to same observable objects are wrapped with distinct wrappers

Categories

(DevTools Graveyard :: WebIDE, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 26

People

(Reporter: ochameau, Assigned: ochameau)

References

Details

Attachments

(1 file, 1 obsolete file)

Anytime we access an observable object attribute that is an object, we end up creating a new proxy for this object.
Comment on attachment 792912 [details] [diff] [review]
Each access to same observable objects are wrapped with distinct wrappers

No idea if that a nice way to address this issue, but it do fix it :p
Attachment #792912 - Flags: review?(paul)
Blocks: 907206
Comment on attachment 792912 [details] [diff] [review]
Each access to same observable objects are wrapped with distinct wrappers

Alex, can you add a string to the is()?

Brandon, can you look at this?
Attachment #792912 - Flags: review?(paul) → feedback?(bbenvie)
Comment on attachment 792912 [details] [diff] [review]
Each access to same observable objects are wrapped with distinct wrappers

Review of attachment 792912 [details] [diff] [review]:
-----------------------------------------------------------------

This looks good. I would just caution that this might make it harder for wrapped objects to be GCed, since there's now a two way reference between the wrapper and the value. It might be good to have a way method to dispose of an observable object (`this._values = this._wrappers = this._paths = null` or something) although I don't know how much a user of this is looking for memory efficiency.
Attachment #792912 - Flags: feedback?(bbenvie) → feedback+
I just added a message in the is() assertion.
Attachment #792912 - Attachment is obsolete: true
Attachment #797124 - Flags: review?(paul)
Attachment #797124 - Flags: review?(paul) → review+
https://hg.mozilla.org/mozilla-central/rev/4daa96d66d16
Assignee: nobody → poirot.alex
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 26
Depends on: 910830
Product: Firefox → DevTools
Product: DevTools → DevTools Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: