Closed Bug 627148 Opened 9 years ago Closed 6 years ago

Do not load JS components in the content process

Categories

(Core :: XPCOM, defect)

x86
Linux
defect
Not set

Tracking

()

RESOLVED WONTFIX
Tracking Status
fennec - ---

People

(Reporter: taras.mozilla, Unassigned)

Details

Attachments

(1 file)

As per https://bugzilla.mozilla.org/show_bug.cgi?id=626814#c10. Right now we are wasting cpu/ram on components we don't need.
tracking-fennec: --- → ?
what would this break?
Attached patch patchSplinter Review
Assignee: nobody → blassey.bugs
Attachment #507134 - Flags: review?(tglek)
Attachment #507134 - Flags: review?(gal)
Comment on attachment 507134 [details] [diff] [review]
patch

Just in case this has any stupid compatibility implications, jst (or mrbkap) should review this.
Attachment #507134 - Flags: review?(gal) → review?(jst)
Comment on attachment 507134 [details] [diff] [review]
patch

This seems reasonable, but I don't know this code.
Attachment #507134 - Flags: review?(tglek)
It would be nice to see what gs/ci's are called from the child process that fail due to the implementation not being in c++.  I worry that there are going to be things that break after we land this, and we will be in the dark.
How is a content policy (nsIContentPolicy) supposed to work in the e10s world after this lands? 
Manual component & category registration?
Giorgio, networking is in the parent process.  Not sure if that is enough for what you are trying to do.
nsIContentPolicy.shoulLoad() is called before any networking activity happens (actually, even before a channel is created) and gets passed, among other things, a DOM object which the load attempt is related to (aContext) and its type (script, object, media, font, image, XHR and so on).

Resolving at the DOM node level is especially important for plugin, media and framed content, in order to create "click to load" placeholders.

Retrieving at least the document originating the load is mandatory anyway for any relevant use case (e.g. Adblock Plus).

Finally, it must be able to veto the load before it starts.

All this seems to require a child process implementation, or at least a mixed approach, doesn't it?
Giorgio - See bug 629820 for an example of using nsIContentPolicy from child process. The example manually registers the JS component, which will still work after this bug is fixed.
That's what I was hoping in my comment 6, thanks.
tracking-fennec: ? → 2.0b5+
tracking-fennec: 2.0b5+ → 2.0-
Assignee: blassey.bugs → nobody
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.