Closed Bug 1124703 Opened 10 years ago Closed 10 years ago

Page-Mod worker 'pageshow' event no longer fired in FF 36

Categories

(Add-on SDK Graveyard :: General, defect)

defect
Not set
normal

Tracking

(firefox35 unaffected, firefox36+ fixed, firefox37+ fixed, firefox38+ fixed, firefox-esr31 unaffected)

RESOLVED FIXED
mozilla38
Tracking Status
firefox35 --- unaffected
firefox36 + fixed
firefox37 + fixed
firefox38 + fixed
firefox-esr31 --- unaffected

People

(Reporter: raymond, Assigned: mossop)

References

Details

(Keywords: addon-compat, regression)

Attachments

(2 files)

7.66 KB, application/zip
Details
46 bytes, text/x-github-pull-request
jsantell
: review+
Details | Review
Attached file ff-worker-bug.xpi
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.91 Safari/537.36 Steps to reproduce: Attach an event listener for pageshow for workers for scripts injected into web pages. We use this event in our Add to Wunderlist extension in order to track and communicate with the correct active tab worker. The example addon logs several events from pagemod workers, on FF 35 the pageshow event is logged correctly. Actual results: pageshow event never fired in FF 36 or later Expected results: pageshow event should be fired in FF 36 as it was in FF 35
This bug breaks our extension here and we have already received a review mentioning this issue from a user: https://addons.mozilla.org/en-US/firefox/addon/add-to-wunderlist/
STR: 1) Set extensions.sdk.console.logLevel to "all". 2) Install the sample extension. 3) Open the Browser Console. 4) Visit any site, like example.com Actual: Three log entries: onAttach, injected. Expected: Three log entries: onAttach, pageshow, injected.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Any idea what caused this zombie?
Flags: needinfo?(tomica+amo)
This appears to be a timing issue with the switch to asynchronous attachment to support e10s. When the page starts loading we notify the parent (I think synchronously), which then checks if a page-mod matches and asynchronously attaches the worker-child. That races against the page loading and so the worker can attach after the page has already loaded and fired its pageshow event. Subsequent pageshow and pagehide events come through just fine. We can probably fix this by checking if the page has already loaded when attaching a worker and if so firing a mock pageshow event.
Flags: needinfo?(tomica+amo)
Assignee: nobody → dtownsend
Flags: needinfo?(dtownsend)
Attached file pull request
Attachment #8556749 - Flags: review?(rFobic)
Dave, as we are getting closer and closer to the release, could you request the review from someone else? Thanks
Flags: needinfo?(dtownsend)
Depends on: 1129003
Comment on attachment 8556749 [details] [review] pull request Looks good, r+
Attachment #8556749 - Flags: review?(rFobic) → review+
Commits pushed to master at https://github.com/mozilla/addon-sdk https://github.com/mozilla/addon-sdk/commit/e8c43203c424255b77176bdb9fe61945949b8baf Bug 1124703: Send synthetic pageshow events when asynchronous message passing mean that we miss the real ones. https://github.com/mozilla/addon-sdk/commit/0ddcbe6ac53eded4864feac6921aa50273437bd2 Merge pull request #1852 from Mossop/bug1124703 Bug 1124703: Send synthetic pageshow events when asynchronous message passing mean that we miss the real ones. r=jsantell
Flags: needinfo?(dtownsend)
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla38
Dave, could you fill the uplift request? Thanks
Flags: needinfo?(dtownsend)
(In reply to Sylvestre Ledru [:sylvestre] from comment #13) > Dave, could you fill the uplift request? Thanks We should take bug 1129567 instead which will fix this.
Flags: needinfo?(dtownsend)
OK, I guess this is the same for 37.
Fixed on aurora and beta by reverting page-mod in bug 1129567
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: