If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

Content symbiont destructor should not assume its frame was initialized

RESOLVED FIXED

Status

Add-on SDK
General
RESOLVED FIXED
7 years ago
7 years ago

People

(Reporter: adw, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Reporter)

Description

7 years ago
Created attachment 478586 [details]
error

I'm modifying the reddit-panel example so that it quits when finished (for bug 594076), but doing so results in the attached error.  The destructor assumes that this._frame has been initialized, but that's not the case if the module is unloaded before _initFrame has been called.

The reddit-panel example uses a contentURL, not a frame, so "frame" is not in the options object passed to the constructor, which means that _initFrame is called when the hidden frame is ready, which does not occur before the module is unloaded and the destructor is called.
(Reporter)

Comment 1

7 years ago
Created attachment 478587 [details] [diff] [review]
patch

This just sticks the destructor in an `if (this._frame)` conditional.
Attachment #478587 - Flags: review?(myk)
(Reporter)

Updated

7 years ago
Blocks: 594076
Comment on attachment 478587 [details] [diff] [review]
patch

Looks great!  I had the same fix in my patch for bug 596018, which I've just checked in, however, so this is now resolved.
Attachment #478587 - Flags: review?(myk) → review+
Status: NEW → RESOLVED
Last Resolved: 7 years ago
Depends on: 596018
Resolution: --- → FIXED
The Add-on SDK is no longer a Mozilla Labs experiment and has become a big enough project to warrant its own Bugzilla product, so the "Add-on SDK" product has been created for it, and I am moving its bugs to that product.

To filter bugmail related to this change, filter on the word "looptid".
Component: Jetpack SDK → General
Product: Mozilla Labs → Add-on SDK
QA Contact: jetpack-sdk → general
Version: Trunk → unspecified
You need to log in before you can comment on or make changes to this bug.