Open Bug 1268148 Opened 9 years ago Updated 2 months ago

Addon compartments in child processes not grouped under add-ons category

Categories

(Toolkit :: about:memory, defect, P3)

defect

Tracking

()

UNCONFIRMED

People

(Reporter: bugzilla.mozilla.org, Unassigned)

Details

(Whiteboard: [MemShrink:P3])

I'm seeing addon JSMs loaded through a framescript (i.e. loaded through addon main -> framescript -> JSM) properly categorized in the add-ons category in the parent process. The same JSM is just lumped under the top-level js-non-window category in the child process.
Nils, any idea why this might be happening, and how to fix it?
Flags: needinfo?(maierman)
Whiteboard: [MemShrink]
This is split out by the XPCJSRuntime ReportCompartmentStats function [1]. It will report the compartment under 'explicit/add-ons' if the following conditions are met: - extras.location is not null (this is a URI) - addonManager is not null - extras.jsPathPrefix does not already start with 'add-ons' - addonManager->MapURIToAddonID must not fail So presumably one of these conditions is not met in the content process. [1] https://dxr.mozilla.org/mozilla-central/rev/6adc822f5e27a55551faeb6c47a9bd8b0859a23b/js/xpconnect/src/XPCJSRuntime.cpp#2258-2275
Looks like the call to |addonManager->MapURIToAddonID| is failing. If I'm reading correctly the AddonManager is implemented in js, the jsm indicates it shouldn't be used from the child process [1]. [1] https://dxr.mozilla.org/mozilla-central/rev/6adc822f5e27a55551faeb6c47a9bd8b0859a23b/toolkit/mozapps/extensions/AddonManager.jsm#20
Thank you for looking at this. > Looks like the call to |addonManager->MapURIToAddonID| is failing. If I'm > reading correctly the AddonManager is implemented in js, the jsm indicates > it shouldn't be used from the child process [1]. Ugh, so presumably we'd have to send a message to the parent process to get this info. That's no fun.
(In reply to Nicholas Nethercote [:njn] from comment #4) > Thank you for looking at this. > > > Looks like the call to |addonManager->MapURIToAddonID| is failing. If I'm > > reading correctly the AddonManager is implemented in js, the jsm indicates > > it shouldn't be used from the child process [1]. > > Ugh, so presumably we'd have to send a message to the parent process to get > this info. That's no fun. The other problem is it's called on every compartment that has a URI. If the call succeeds then we know it's an add-on compartment, so that would mean proxying a call for each compartment.
Whiteboard: [MemShrink] → [MemShrink:P3]
Flags: needinfo?(maierman)
Priority: -- → P3
Severity: normal → S3

Redirect a needinfo that is pending on an inactive user to the triage owner.
:edgar, since the bug has recent activity, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(hyderabadbeautiesbd) → needinfo?(echen)
Flags: needinfo?(echen)

Hi Friends,

Are you searching <a href="https://atdoorstep.ae/dubai/handyman">handyman services near me</a>. Don't worry, Atdoorstep provide the best handyman services for your home repair & home maintenance services.

You need to log in before you can comment on or make changes to this bug.