Closed Bug 1228801 Opened 9 years ago Closed 9 years ago

tab-content.js, line 518: NS_ERROR_MALFORMED_URI [PageStyleHandler::_filterStyleSheets]

Categories

(Firefox :: General, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 45
Tracking Status
firefox44 - wontfix
firefox45 --- fixed

People

(Reporter: jruderman, Unassigned)

References

Details

(Keywords: regression, testcase)

Attachments

(2 files)

Attached file testcase
JavaScript error: chrome://browser/content/tab-content.js, line 518: NS_ERROR_MALFORMED_URI: Component returned failure code: 0x804b000a (NS_ERROR_MALFORMED_URI) [nsIIOService2.newURI]

The throwing line was added to tab-content.js in:

changeset:   https://hg.mozilla.org/mozilla-central/rev/588505e93ed0
user:        Mike Conley
date:        Fri Oct 02 10:03:51 2015 -0400
summary:     Bug 1141041 - Stop using CPOWs for the Page Style menu. r=Gijs
Flags: needinfo?(mconley)
The throwing line is:

      let URI = Services.io.newURI(currentStyleSheet.href, null, null);

I'm assuming currentStyleSheet doesn't have an href because the testcase document has no stylesheets, only an inline style block. I'm guessing this creates an element inside document.styleSheets that has no href. It's all guessing because Firefox crashes when I try to use the js debugger to figure this out.
Thanks Jesse - should be a straight-forward patch. Coming up once I test it.
Flags: needinfo?(mconley)
Bug 1228801 - Handle malformed URIs in href for style tags in tab-content.js. r?Gijs
Attachment #8693607 - Flags: review?(gijskruitbosch+bugs)
Comment on attachment 8693607 [details]
MozReview Request: Bug 1228801 - Handle malformed URIs in href for style tags in tab-content.js. r?Gijs

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/26499/diff/1-2/
Comment on attachment 8693607 [details]
MozReview Request: Bug 1228801 - Handle malformed URIs in href for style tags in tab-content.js. r?Gijs

https://reviewboard.mozilla.org/r/26499/#review23929
Attachment #8693607 - Flags: review?(gijskruitbosch+bugs) → review+
Thanks for the fast review!
[Tracking Requested - why for this release]:

Bug 1141041 landed in 44, so this affects that version as well. I'm not sure this is serious enough to warrant an uplift[1], but requesting tracking just the same.

[1]: The only user-visible consequences I can think of is that we don't properly list alternative stylesheets for sites that include <style> tags with invalid URLs in their href attributes.
https://hg.mozilla.org/mozilla-central/rev/2356e43e24b8
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 45
Given the user impact mentioned in comment 8, I think we can let this one ride the Aurora45 -> Beta45 to release train. Untracked and wontfix for 44.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: