Closed Bug 900089 Opened 11 years ago Closed 11 years ago

SessionStore.setTabState on pending tab doesn't call _resetTabRestoringState

Categories

(Firefox :: Session Restore, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 27

People

(Reporter: tabmix.onemen, Assigned: avp)

Details

(Whiteboard: [good first bug][mentor=ttaubert][lang=js])

Attachments

(1 file, 1 obsolete file)

SessionRetore.setTabState on pending tab doesn't call _resetTabRestoringState

_resetTabRestoringState comment is:
"Reset the restoring state for a particular tab. This will be called when removing a tab or when a tab needs to be reset (it's being overwritten)."
Summary: SessionRetore.setTabState on pending tab doesn't call _resetTabRestoringState → SessionStore.setTabState on pending tab doesn't call _resetTabRestoringState
Assignee: nobody → ttaubert
OS: Windows 7 → All
Oops, didn't mean to assign that to me.
Assignee: ttaubert → nobody
Whiteboard: [good first bug][mentor=ttaubert][lang=js]
Hi Tim,
I would like to work on this bug. Can you please help me get started with it?

Thanks.
Hey Abhishek, that's great to hear! This is what we need to do:

Right above the TabStateCache.delete() call [1] we want to reset the tab's restoring state but only if it currently is restoring. To do that we can just insert the following code:

  if (aTab.linkedBrowser.__SS_restoreState) {
    this._resetTabRestoringState(aTab);
  }

Should you have any more questions don't hesitate to ask here or on IRC.

[1] http://mxr.mozilla.org/mozilla-central/source/browser/components/sessionstore/src/SessionStore.jsm#1463
Attached patch bug-900089-fix.patch (obsolete) — Splinter Review
Assignee: nobody → abhishekp.bugzilla
Status: NEW → ASSIGNED
Attachment #811226 - Flags: review?(ttaubert)
Comment on attachment 811226 [details] [diff] [review]
bug-900089-fix.patch

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

Thanks, this looks great! Can you please prepare the patch for checkin-needed?

::: browser/components/sessionstore/src/SessionStore.jsm
@@ +1459,5 @@
>        debug("Default view of ownerDocument must have a unique identifier");
>        throw (Components.returnCode = Cr.NS_ERROR_INVALID_ARG);
>      }
> +  
> +    if (aTab.linkedBrowser.__SS_restoreState) {

Nit: the first line above the if statement has some white space in it, can you please remove that?
Attachment #811226 - Flags: review?(ttaubert) → review+
Comment on attachment 811701 [details] [diff] [review]
Added call to _resetTabRestoringState in SessionRestore.setTabState

Small hint: Please use the 'checkin-needed' keyword the next time. You can set is using the 'Keywords' field at the top. The checkin flag is only used for bugs with multiple patches that need to be landed.
Attachment #811701 - Flags: checkin?
https://hg.mozilla.org/mozilla-central/rev/8d198483ae3b
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 27
Thanks Tim, will take care about that from next time ! :)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: