Closed Bug 897707 Opened 11 years ago Closed 11 years ago

Make more things weak in BEP

Categories

(Firefox OS Graveyard :: General, defect)

defect
Not set
normal

Tracking

(blocking-b2g:leo+)

RESOLVED INVALID
blocking-b2g leo+

People

(Reporter: khuey, Assigned: khuey)

References

Details

Attachments

(1 file)

Attached patch PatchSplinter Review
This also seems to be necessary to get rid of moar leaks.
Attachment #780614 - Flags: review?(justin.lebar+bug)
Comment on attachment 780614 [details] [diff] [review]
Patch

Why do we keep |let self = this| around?

defineMethod and defineDOMRequestMethod are short-lived functions, so they should be able to use |self| instead of |weakSelf|, except for the entraining problem.  So what you have is a reasonable solution, or alternatively you could use |self| in there and then null it out, as you do.

Either way, please add a comment.
Attachment #780614 - Flags: review?(justin.lebar+bug) → review-
Note that if this fixes leaks, then that means we're leaking these closure objects.
And so you may need to be more clever about how you remove the message listeners etc when you discover that the BEP has gone away.
blocking-b2g: leo? → leo+
Turns out these were just circular references.  Because we don't handle weak map values very well they appeared to chain up to a root, but the BrowserElementParent was not actually a root.  That is fixed in bug 897701.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: