Closed Bug 1018661 Opened 6 years ago Closed 6 years ago

Closing zombified tab results in "closed about:blank" toast

Categories

(Firefox for Android :: General, defect)

Other
Android
defect
Not set

Tracking

()

RESOLVED FIXED
Firefox 32
Tracking Status
fennec 32+ ---

People

(Reporter: Margaret, Assigned: Margaret)

References

Details

Attachments

(1 file, 1 obsolete file)

Need to be smarter about getting the stored title or URL.
Assignee: nobody → margaret.leibovic
Blocks: 701725
tracking-fennec: --- → ?
I used the remote debugger to zombify some tabs to test, and this works.
Attachment #8432904 - Flags: review?(bnicholson)
Comment on attachment 8432904 [details] [diff] [review]
Use session store data instead of current browser data for undo close tab toast

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

::: mobile/android/chrome/content/browser.js
@@ +981,5 @@
>  
>      if (aShowUndoToast) {
> +      // Get a title for the undo close toast. Fall back to the URL if there is no title.
> +      let ss = Cc["@mozilla.org/browser/sessionstore;1"].getService(Ci.nsISessionStore);
> +      let closedTabData = JSON.parse(ss.getClosedTabData(window))[0];

Oh, I meant to bring it up on IRC, but I can ask here - should I change the session store API to return an actual object here instead of needing to do this JSON business? I'm not sure the history behind this API and if there are any external consumers who need it. I suppose I could also add a new method.
I decided to update the SessionStore API to turn getClosedTabData into getClosedTabs. I don't see us using getClosedTabData anywhere, so I think this should be fine. Let me know what you think.
Attachment #8432904 - Attachment is obsolete: true
Attachment #8432904 - Flags: review?(bnicholson)
Attachment #8433479 - Flags: review?(bnicholson)
Comment on attachment 8433479 [details] [diff] [review]
(v2)  Use session store data instead of current browser data for undo close tab toast

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

(In reply to :Margaret Leibovic from comment #2)
> Oh, I meant to bring it up on IRC, but I can ask here - should I change the
> session store API to return an actual object here instead of needing to do
> this JSON business?

Yeah, that's what I was suggesting back in https://bugzilla.mozilla.org/show_bug.cgi?id=1004850#c30. :)

I guess there's always the possibility of breaking add-ons, but add-ons (like this one [1]) are probably using the higher-level undoCloseTab method most of the time anyway.

[1] https://addons.mozilla.org/en-us/android/files/browse/184146/file/bootstrap.js
Attachment #8433479 - Flags: review?(bnicholson) → review+
https://hg.mozilla.org/mozilla-central/rev/80a57d37adcb
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 32
Blocks: 1018337
tracking-fennec: ? → 32+
You need to log in before you can comment on or make changes to this bug.