Closed Bug 1241183 Opened 8 years ago Closed 8 years ago

nsScriptLoadRequest does not need to be threadsafe

Categories

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

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla46
Tracking Status
firefox46 --- fixed

People

(Reporter: jonco, Assigned: jonco)

References

Details

Attachments

(1 file)

There's a comment in dom/base/nsScriptLoader.cpp that says:

// The nsScriptLoadRequest is passed as the context to necko, and thus
// it needs to be threadsafe. Necko won't do anything with this
// context, but it will AddRef and Release it on other threads.

As far as I can see, this object is not used as a context since the changes in bug 1194526: the request object used be passed as the context parameter to nsIChannel::AsyncOpen(), but this was replaced with a call to AsyncOpen2() which doesn't take a context.

Is is OK to get rid of this?

The motivation for this is that it would be useful to make the request a cycle collected class for bug 1240072, so that it can contain a JS object pointer.
Attachment #8710039 - Flags: review?(jonas)
https://hg.mozilla.org/mozilla-central/rev/963e6373d20a
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla46
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: