Closed Bug 614708 Opened 14 years ago Closed 14 years ago

Calling setTabValue too early causes correct values to be ignored when access early

Categories

(Firefox :: Session Restore, defect)

defect
Not set
normal

Tracking

()

VERIFIED FIXED
Firefox 4.0b8

People

(Reporter: zpao, Assigned: zpao)

References

Details

Attachments

(1 file, 1 obsolete file)

See bug 607016 comment 9 for the use case.

This probably should have been done as part of bug 590268 but I missed that particular use.

This will be slightly datalossy for consumers who set data too early. There isn't really any way around that though. They should either wait for SSTabRestoring or SSTabRestored to set that data.
Attached patch Patch v0.1 (obsolete) — Splinter Review
Fixes the test issues Ian had. It's a bit more correct regardless.

In an ideal world we'd check if we would be keeping track of "state" and not allow data to be set on the tab too early. But that's for sessionstore 2.0 :)

I don't really feel like writing a test since it's unintentionally covered by the test in 590268. I should be make that test explicitly test this though (listen for TabOpen, call setTabValue see if the test still passes).
Assignee: nobody → paul
Attachment #493145 - Flags: review?(dietrich)
Comment on attachment 493145 [details] [diff] [review]
Patch v0.1

The code change looks fine. However, SS is too finicky for me to r+ this without the test you suggested.
Attachment #493145 - Flags: review?(dietrich)
Attached patch Patch v0.2Splinter Review
Now with a test! This essentially simulates what Panorama is doing. I added a check that we wipe out the value of "foo" by the time SSTabRestoring is fired.
Attachment #493145 - Attachment is obsolete: true
Attachment #493719 - Flags: review?(dietrich)
This certainly fixes the test I've been having trouble with! My patches are not out of the woods yet (looks like we need bug 615394), but this is definitely a step in the right direction; let's land it.
Attachment #493719 - Flags: review?(dietrich) → review+
http://hg.mozilla.org/mozilla-central/rev/28066e5483fc
Status: NEW → RESOLVED
Closed: 14 years ago
Flags: in-testsuite+
OS: Mac OS X → All
Hardware: x86 → All
Resolution: --- → FIXED
Target Milestone: --- → Firefox 4.0b8
Is there a way I can verify this bug?
(In reply to comment #6)
> Is there a way I can verify this bug?

The tests are passing. Manually not really.
Status: RESOLVED → VERIFIED
Depends on: 633710
Blocks: 633710
No longer depends on: 633710
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: