Closed Bug 98285 Opened 23 years ago Closed 23 years ago

Add a possibility to access the service manager via NP (legacy plugin) API

Categories

(Core Graveyard :: Plug-ins, defect, P2)

x86
All
defect

Tracking

(Not tracked)

VERIFIED FIXED
mozilla0.9.5

People

(Reporter: serhunt, Assigned: serhunt)

Details

(Whiteboard: PDT+ [fixed on trunk][fixed on branch])

Attachments

(4 files)

We can use the NPN_GetValue back door to achieve this goal just by adding one
more variable to NPNVariable enumeration type.
Targeting for 0.9.4.
Status: NEW → ASSIGNED
Priority: -- → P2
Target Milestone: --- → mozilla0.9.4
One comment, even though 
nsServiceManager::GetGlobalServiceManager() doesn't AddRef the 
nsIServiceManager, I don't think we should adhere to that here. I think we 
should instead AddRef() the nsIServiceManager instance returned to the 
caller, so the caller can use Release() on the interface.
Here's a revised patch, that actually returns the reference to the service 
manager, and adds a reference to it.
Adding PDT to status whiteboard. + pending review of risk
Whiteboard: PDT
Can anybody comment, review, superreview etc. please?
r=beard
patrick, av, 

what is the |gServiceMgr| for?  Is _getvalue called prior to
ns4xPlugin::ns4xPlugin?  I guess I just don't understand why in some of the _XXX
functions, we are using |gServiceMgr| and in this one, we are calling the static
nsServiceManager function...
Doug, the idea is to provide a single hook to allow an NPAPI plugin to access
the service manager, and thus any services or components that we may choose to
freeze and encourage external developers to use. Without access to the
service/component manager, this is impossible. I cc'd you and dp to get your
input on this. We want to make non-XPCOM based plugins first class citizens in
future versions of the browser.
Doug, is there a better way to obtain a reference to the global service manager,
rather than through nsServiceManager::GetGlobalServiceManager()?
since you are already linking to xpcom for various reasons, and modules/plugin
(dispite is location under 'modules') is a core part of the browser, no.
I presume the idea is to not require plugins to link with the XPCOM DLL. If so,
sr=vidur.
Vidur, yes, that is the case. A classic NPAPI plugin must still be able to run
in other browsers, and hard linking against XPCOM would prevent that on many
platforms.
Whiteboard: PDT → PDT [fixed on trunk]
Let's please get this approved for checkin on the 0.9.4 branch.
Keywords: nsbranch
AV - This looks a good nomination. Pls work with you manager to get this one
nsbranch+ ASAP.
Missing the train :( Removing milestone and marking fixed.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Target Milestone: mozilla0.9.4 → mozilla0.9.5
Reopening as we still want it for the branch.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Target Milestone: mozilla0.9.5 → mozilla0.9.4
Status: REOPENED → ASSIGNED
Marking nsbranch+, I believe that this is an important feature of our plugin 
architecture to get into 0.9.4, so that our plugin developers can get earlier 
access to XPCOM services. The scriptable plugin support was added in 
0.9.2, and I would hate to see this complementary feature lag by yet 
another milestone.
Keywords: nsbranchnsbranch+
0.9.4 is out the door.
Target Milestone: mozilla0.9.4 → mozilla0.9.5
AV - Are you ready to check-in? - PDT
Yes, waiting for PDT+ in the status, as to my understanding of the process this 
is what the formal permission to check in is.
U GOT IT - PDT+ it is.
Whiteboard: PDT [fixed on trunk] → PDT+ [fixed on trunk]
Checked in to the branch. Marking fixed.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago23 years ago
Resolution: --- → FIXED
Whiteboard: PDT+ [fixed on trunk] → PDT+ [fixed on trunk][fixed on branch]
marking verif(stamp)
Status: RESOLVED → VERIFIED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: