Closed Bug 711670 Opened 8 years ago Closed 4 years ago

If URL.clicked and Firefox.closed and Firefox.has_updates, URL is not opened

Categories

(Toolkit :: Application Update, defect)

x86
macOS
defect
Not set

Tracking

()

VERIFIED FIXED
mozilla48
Tracking Status
firefox48 --- verified

People

(Reporter: robhudson, Assigned: spohl)

Details

Attachments

(1 file, 1 obsolete file)

If Firefox is currently closed, and it has updates when it launches next (i.e. the little window appears saying it is installing updates), it loses the clicked link that spawned it and only opens the default Firefox page.

I expect the update to happen, and Firefox continue to open the link I clicked which originally opened Firefox.
This is particularly hurty on nightly.
Component: General → Application Update
Product: Firefox → Toolkit
I wasn't able to reproduce on Windows.

spohl, could you check out what is going on with this on Mac?
Flags: needinfo?(spohl.mozilla.bugs)
Attached patch Patch (obsolete) — Splinter Review
This issue arises because we don't have the Mac Application Delegate set up yet when we process an update, so we can't respond to the Apple event that notifies us of the clicked URL. Moving this from XRE_mainRun to XRE_mainInit appears to fix this, since updates are processed in XRE_mainStartup, which is executed after XRE_mainInit but before XRE_mainRun.

Verified this locally and launched a try run.
Assignee: nobody → spohl.mozilla.bugs
Status: NEW → ASSIGNED
Flags: needinfo?(spohl.mozilla.bugs)
Comment on attachment 8743656 [details] [diff] [review]
Patch

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

I've gone back to the beginning of mercurial history and I couldn't find a particular reason why setting up the application delegate had to occur after processing updates. Try came back green as well.
Attachment #8743656 - Flags: review?(mstange)
Comment on attachment 8743656 [details] [diff] [review]
Patch

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

Can you add a comment similar to the one you're removing? Something like "This must be done before the update so that we don't lose any URLs opened via the command line if we update"
Attachment #8743656 - Flags: review?(mstange) → review+
Attached patch PatchSplinter Review
Thanks, Markus! Added comment, carrying over r+.
Attachment #8743656 - Attachment is obsolete: true
Attachment #8744028 - Flags: review+
https://hg.mozilla.org/integration/fx-team/rev/b31b99289389a5e0ddab1ca9eccd4f03a6d81fe4
Bug 711670: Setup the Mac Application Delegate earlier to respond to URLs clicked in external applications when updates are pending. r=mstange
https://hg.mozilla.org/mozilla-central/rev/b31b99289389
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
I've tested this on OS X 10.11.
It doesn't seem to be fixed on 48b1, but looks ok on 49.0a2, 50.0a1.
Thougths?
Flags: needinfo?(spohl.mozilla.bugs)
Based on [1], this should be fixed in 48.0b1. Could you let me know the steps you used to verify this?

[1] https://hg.mozilla.org/releases/mozilla-beta/annotate/c6290de3ba99/toolkit/xre/nsAppRunner.cpp#l3394
Flags: needinfo?(spohl.mozilla.bugs) → needinfo?(paul.silaghi)
1. Start FX 47b7
2. Set as default browser
3. Go to About and check for updates
4. After the updates are downloaded, quit Firefox from the dock
5. Click on a www.google.com link in an external app
Actual results:
Firefox 48b1 starts, no google.com opened
Flags: needinfo?(paul.silaghi)
Okay, the problem here is that 47.0b7 does not have the fix. Please try to run this again with an update from 48.0b1 to 48.0b2 once available.
Flags: needinfo?(paul.silaghi)
Verified fixed FX 48b2, OS X 10.10.5.
Status: RESOLVED → VERIFIED
Flags: needinfo?(paul.silaghi)
You need to log in before you can comment on or make changes to this bug.