Closed Bug 617836 Opened 15 years ago Closed 15 years ago

XBL re-creates wrappers to its injected prototype object from their prototype chains

Categories

(Core :: XBL, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: mrbkap, Assigned: mrbkap)

References

Details

(Whiteboard: fixed-in-tracemonkey)

Attachments

(2 files)

With the patch for bug 616992, I noticed that when we evict viewers from the bfcache, we detach XBL bindings that have been attached in those documents. In the process of detaching XBL bindings, we try to remove the prototype object that XBL inserts into their prototype chains. In order to get the JS object, we wrap the bound node. However, if the node was collected by GC, then we'll create a *new* wrapped native for the purpose of looking up its prototype chain and not finding the XBL binding. We can avoid some work by using a different API that returns null if the object doesn't exist (i.e. XPCWrappedNative::GetUsedOnly).
Attached patch Proposed fixSplinter Review
Assignee: nobody → mrbkap
Status: NEW → ASSIGNED
Attachment #496387 - Flags: review?(jst)
Attached patch diff -wSplinter Review
Comment on attachment 496387 [details] [diff] [review] Proposed fix r+a=jst (and while this isn't a blocker, it came out of an attempt to fix a blocker. This makes us do less work, so in some cases this can speed things up, and thus I think we should go ahead and take it anyways. But let's wait until beta8 is out the door)
Attachment #496387 - Flags: review?(jst)
Attachment #496387 - Flags: review+
Attachment #496387 - Flags: approval2.0?
Attachment #496387 - Flags: approval2.0? → approval2.0+
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: