Closed
Bug 586506
Opened 15 years ago
Closed 15 years ago
unregisterOpenPage should not come before registerOpenPage when removeTab is called before/during onLocationChange
Categories
(Firefox :: Tabbed Browser, defect)
Firefox
Tabbed Browser
Tracking
()
RESOLVED
FIXED
Firefox 4.0b4
People
(Reporter: mak, Assigned: mak)
References
Details
Attachments
(1 file, 4 obsolete files)
4.45 KB,
patch
|
Details | Diff | Splinter Review |
I've found this other glitch in switch-to-tab code that is causing a failure when i push bug 546253, since that bug is checking about:blank from previous tests too.
also makes the test wait for proper visit notification (to be sure data is in the db before looking for it).
Will need approval to land with bug 546253
Attachment #465011 -
Flags: review?(gavin.sharp)
Assignee | ||
Comment 1•15 years ago
|
||
to explain, lastURI is setup when page is registered, so it's a safer check to unregister.
Assignee | ||
Updated•15 years ago
|
Summary: unregisterOpenPage should not be called before registerOpenPage if removeTab is called immediately → unregisterOpenPage should not come before registerOpenPage when removeTab is called immediately
Assignee | ||
Updated•15 years ago
|
Flags: in-testsuite?
Assignee | ||
Updated•15 years ago
|
Assignee: nobody → mak77
Status: NEW → ASSIGNED
Assignee | ||
Comment 2•15 years ago
|
||
Comment on attachment 465011 [details] [diff] [review]
patch v1.0
Discussed with dao, the problem with this approach is that we would still fail if someone calls removeTab in a sub onLocationChange listener because lastURI is setup later. But at the same time if we set lastURI before the listeners will be unable to know previous uri.
So, the only best solution I can think of is to have a specific .registeredOpenURI property for this scope.
Attachment #465011 -
Attachment is obsolete: true
Attachment #465011 -
Flags: review?(gavin.sharp)
Assignee | ||
Updated•15 years ago
|
Summary: unregisterOpenPage should not come before registerOpenPage when removeTab is called immediately → unregisterOpenPage should not come before registerOpenPage when removeTab is called before/during onLocationChange
Comment 4•15 years ago
|
||
Comment on attachment 465673 [details] [diff] [review]
patch v1.1
s/registeredOpenURI/_registeredOpenURI/
I haven't really reviewed the test, but this can be a plain function thanks to bug 538920:
>+ let visitObserver = {
>+ observe: function(aSubject, aTopic, aData)
Attachment #465673 -
Flags: review?(dao) → review+
Assignee | ||
Comment 5•15 years ago
|
||
addressed comment
Attachment #465673 -
Attachment is obsolete: true
Comment 6•15 years ago
|
||
Comment on attachment 465681 [details] [diff] [review]
patch v1.2
>+ Services.obs.addObserver(
>+ function (aSubject, aTopic, aData) {
>+ if (url != aSubject.QueryInterface(Ci.nsIURI).spec)
>+ return;
>+ Services.obs.removeObserver(this, aTopic);
'this' needs to be arguments.callee instead
Assignee | ||
Updated•15 years ago
|
Attachment #465681 -
Flags: approval2.0?
Assignee | ||
Comment 7•15 years ago
|
||
wtf, yeah, I hate last minute changes (doing in seconds)
Assignee | ||
Comment 8•15 years ago
|
||
Attachment #465681 -
Attachment is obsolete: true
Attachment #465686 -
Flags: approval2.0?
Attachment #465681 -
Flags: approval2.0?
Updated•15 years ago
|
Attachment #465686 -
Flags: approval2.0? → approval2.0+
Assignee | ||
Comment 9•15 years ago
|
||
with correct commit message
Attachment #465686 -
Attachment is obsolete: true
Comment 10•15 years ago
|
||
Assignee | ||
Updated•15 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Flags: in-testsuite? → in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → Firefox 4.0b4
You need to log in
before you can comment on or make changes to this bug.
Description
•