Closed
Bug 466681
Opened 17 years ago
Closed 17 years ago
nsIWebNavigation flags are pretty broken
Categories
(Core :: DOM: Navigation, defect)
Tracking
()
RESOLVED
FIXED
mozilla1.9.1b3
People
(Reporter: bzbarsky, Assigned: bzbarsky)
References
Details
(Keywords: fixed1.9.1)
Attachments
(1 file)
|
8.88 KB,
patch
|
jst
:
review+
jst
:
superreview+
|
Details | Diff | Splinter Review |
We seem to have shipped 1.9 with some serious breakage in our nsIWebNavigation flags:
1) LOAD_FLAGS_BYPASS_CLASSIFIER is outside the range of allowed flags (0xffff
max)
2) LOAD_FLAGS_ALLOW_POPUPS == LOAD_FLAGS_ERROR_PAGE. We don't mask off
LOAD_FLAGS_ALLOW_POPUPS as EXTRA_FLAGS, so anyone passing that flag will get
a LOAD_ERROR_PAGE load.
I think we should probably move LOAD_FLAGS_ERROR_PAGE into the IDL so that there are no more collisions with it, mask out LOAD_FLAGS_ALLOW_POPUPS via EXTRA_FLAGS, change the value of LOAD_FLAGS_BYPASS_CLASSIFIER to the free value at 0x0001.
Alternately, we could allow flags > 0xffff but only if they're always masked off via EXTRA_FLAGS, and leave BYPASS_CLASSIFIER as-is and document things better. This has the benefit of not changing existing flag values (other than LOAD_FLAGS_ERROR_PAGE, which could move into 0x0001 or something).
Thoughts? We probably want to do this for 1.9.1, since the resolution of this is sorta blocking what we do with flags in bug 437174.
Flags: blocking1.9.1?
Comment 1•17 years ago
|
||
(In reply to comment #0)
> 1) LOAD_FLAGS_BYPASS_CLASSIFIER is outside the range of allowed flags (0xffff
> max)
This is filed as bug 435297, FWIW.
Comment 2•17 years ago
|
||
Boris, your proposal sounds good to me, I can't think of anything better given the mess we're in.
Comment 3•17 years ago
|
||
And yes, we should fix this for 1.9.1 to stop the mess from spreading further than it has to.
Flags: blocking1.9.1? → blocking1.9.1+
| Assignee | ||
Comment 4•17 years ago
|
||
Most of this is straightforward, but double-check the 0xf flags being unused, please? I couldn't find a place where they're used...
Assignee: nobody → bzbarsky
Status: NEW → ASSIGNED
Attachment #350034 -
Flags: superreview?(jst)
Attachment #350034 -
Flags: review?(jst)
Updated•17 years ago
|
Attachment #350034 -
Flags: superreview?(jst)
Attachment #350034 -
Flags: superreview+
Attachment #350034 -
Flags: review?(jst)
Attachment #350034 -
Flags: review+
Comment 5•17 years ago
|
||
Comment on attachment 350034 [details] [diff] [review]
Like so should work, I think
Looks good to me.
| Assignee | ||
Comment 6•17 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
| Assignee | ||
Comment 7•17 years ago
|
||
Comment 8•17 years ago
|
||
Comment on attachment 350034 [details] [diff] [review]
Like so should work, I think
>+ * Load flag for error pages. This uses one of the reserved flag
>+ * values from nsIWebNabvigation.
Typo.
Comment 9•17 years ago
|
||
+ NS_PRECONDITION((aLoadFlags & 0xf) == 0, "Should have these flags set");
Should -> Should not?
| Assignee | ||
Updated•17 years ago
|
Target Milestone: --- → mozilla1.9.1b3
| Assignee | ||
Comment 10•17 years ago
|
||
Fixed both of those issues.
| Assignee | ||
Updated•17 years ago
|
Keywords: fixed1.9.1
Comment 11•17 years ago
|
||
At the risk of sounding dumb, is there a specific testcase or set of testcases that would be able to verify something like this?
| Assignee | ||
Comment 12•17 years ago
|
||
You could write some code that does a load with LOAD_FLAGS_ALLOW_POPUPS and check for broken resulting behavior (e.g. lack of progress events), I think.
Comment 13•17 years ago
|
||
Aakash, not that I know of. And after reading this bug it sounds more like we should have an automated test for that.
Flags: in-testsuite?
You need to log in
before you can comment on or make changes to this bug.
Description
•