Closed Bug 1182112 Opened 9 years ago Closed 9 years ago

Test loading XML documents if XSLT loading fails

Categories

(Core :: DOM: Service Workers, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla44
Tracking Status
firefox42 --- affected
firefox44 --- fixed

People

(Reporter: noemi, Assigned: baku)

References

Details

Attachments

(1 file, 1 obsolete file)

      No description provided.
Target Milestone: --- → FxOS-S3 (24Jul)
Target Milestone: FxOS-S3 (24Jul) → FxOS-S4 (07Aug)
Target Milestone: FxOS-S4 (07Aug) → ---
releasing this since I don’t have time to work on it, so letting someone else to take it.
Assignee: alberto.crespell → nobody
Status: ASSIGNED → NEW
https://dxr.mozilla.org/mozilla-central/source/dom/xslt/base/txURIUtils.cpp#60

Ehsan and jdm think this case happens with XML documents at data URLs.
Attached patch force.patch (obsolete) — Splinter Review
Me and Ehsan discussed this on IRC and we agreed that only data: documents are without channels. For this reason, if we have to create a new channel, we should not intercept it with ServiceWorkers.
Flags: needinfo?(bugs)
Attachment #8664906 - Flags: review?(ehsan)
Assignee: nobody → amarchesini
Status: NEW → ASSIGNED
Comment on attachment 8664906 [details] [diff] [review]
force.patch

Review of attachment 8664906 [details] [diff] [review]:
-----------------------------------------------------------------

::: dom/xslt/base/txURIUtils.cpp
@@ +72,5 @@
>          }
> +
> +        nsCOMPtr<nsIHttpChannelInternal> internalChannel = do_QueryInterface(channel);
> +        if (internalChannel) {
> +            internalChannel->ForceNoIntercept();

Please add a comment explaining why this is needed.
Attachment #8664906 - Flags: review?(ehsan) → review+
I'm not too familiar with our xslt code, but is this about documents loaded from data: or 
data-documents (created for example using document.implementation.createHTMLDocument())?
I guess about the latter.

But I don't know what ForceNoIntercept() does and why it is needed here.
In fact, it isn't clear to me why we need the artificial channel there anymore.
It was added in https://bugzilla.mozilla.org/show_bug.cgi?id=322683.
Even if channel wasn't passed, correct principal is explicitly set.
Flags: needinfo?(bugs)
Attached patch 264237.diffSplinter Review
Attachment #8664906 - Attachment is obsolete: true
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/c281d27fbffc
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: