Closed Bug 1082790 Opened 5 years ago Closed 3 years ago

nsXMLHttpRequest::Init() does not use passed nsIScriptContext, it should be removed.

Categories

(Core :: DOM: Core & HTML, defect, minor)

defect
Not set
minor

Tracking

()

RESOLVED FIXED
mozilla50
Tracking Status
firefox50 --- fixed

People

(Reporter: nsm, Assigned: wisniewskit)

Details

Attachments

(1 file, 1 obsolete file)

Here's a patch passing try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=994e893ecd97
Assignee: nobody → wisniewskit
Status: NEW → ASSIGNED
Attachment #8771721 - Flags: review?(mrbkap)
Comment on attachment 8771721 [details] [diff] [review]
1082790-remove-nsIScriptContext-parameter-from-nsXMLHttpRequest::Init.diff

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

A couple of nits only. r=me with them addressed.

::: dom/xhr/nsIXMLHttpRequest.idl
@@ -291,5 @@
>     *                  This will be used even if the global has a window with a
>     *                  load group.
>     */
>    [noscript] void init(in nsIPrincipal principal,
> -                       in nsIScriptContext scriptContext,

The javadoc comment for scriptContext can be removed as well now.

::: dom/xul/templates/nsXULTemplateQueryProcessorXML.cpp
@@ +159,3 @@
>  
>      nsIScriptContext *context = scriptObject->GetContext();
>      NS_ENSURE_TRUE(context, NS_OK);

This is the only use of context, so we can remove it now.

@@ +168,1 @@
>                     scriptObject ? scriptObject : doc->GetScopeObject(),

We already NS_ENSURE_STATE()'d scriptObject where we got it, above, so this null check can go.
Attachment #8771721 - Flags: review?(mrbkap) → review+
Nits addressed, carrying over r+.
Attachment #8771721 - Attachment is obsolete: true
Keywords: checkin-needed
Pushed by cbook@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/2f06a834332a
Remove the nsIScriptContext parameter from nsXMLHttpRequest::Init(). r=mrbkap
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/2f06a834332a
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla50
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.