Closed Bug 466681 Opened 17 years ago Closed 17 years ago

nsIWebNavigation flags are pretty broken

Categories

(Core :: DOM: Navigation, defect)

x86
macOS
defect
Not set
major

Tracking

()

RESOLVED FIXED
mozilla1.9.1b3

People

(Reporter: bzbarsky, Assigned: bzbarsky)

References

Details

(Keywords: fixed1.9.1)

Attachments

(1 file)

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?
(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.
Blocks: 435297
Boris, your proposal sounds good to me, I can't think of anything better given the mess we're in.
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+
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)
Attachment #350034 - Flags: superreview?(jst)
Attachment #350034 - Flags: superreview+
Attachment #350034 - Flags: review?(jst)
Attachment #350034 - Flags: review+
Comment on attachment 350034 [details] [diff] [review] Like so should work, I think Looks good to me.
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
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.
+ NS_PRECONDITION((aLoadFlags & 0xf) == 0, "Should have these flags set"); Should -> Should not?
Target Milestone: --- → mozilla1.9.1b3
Fixed both of those issues.
Keywords: fixed1.9.1
At the risk of sounding dumb, is there a specific testcase or set of testcases that would be able to verify something like this?
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.
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.

Attachment

General

Created:
Updated:
Size: