Closed
Bug 45698
Opened 25 years ago
Closed 25 years ago
[PIDEV] XPCOM component registry should include keys to distinguish new plug-ins from ordinary XPCOM components
Categories
(Core Graveyard :: Plug-ins, defect, P3)
Tracking
(Not tracked)
VERIFIED
FIXED
M17
People
(Reporter: ekrock, Assigned: waterson)
References
Details
(Whiteboard: [nsbeta2+]FIX IN HAND)
Attachments
(8 files)
55.84 KB,
patch
|
Details | Diff | Splinter Review | |
57.22 KB,
patch
|
Details | Diff | Splinter Review | |
1.53 KB,
patch
|
Details | Diff | Splinter Review | |
56.93 KB,
patch
|
Details | Diff | Splinter Review | |
56.93 KB,
patch
|
Details | Diff | Splinter Review | |
2.37 KB,
text/plain
|
Details | |
2.84 KB,
text/plain
|
Details | |
1.15 KB,
text/plain
|
Details |
To enable high-performance loading of plug-ins and the population of the DOM
navigator.plugins array at startup (without having to scan every XPCOM component
to determine whether it's a plug-in), at installation, new plug-ins should
register themselves in the component registry as new-plugins using registry keys
TBD by Chris Waterson.
Under this system, Mozilla will create a wrapper for Nav4.x plug-ins at startup
and create an entry for them in the component registry, so they will have a
transient entry during runtime. New plug-ins will have explicitly registered
themselves here at installation and thus have a persistent entry across
sessions.
Chris estimates that implementation of this will require one person-week, a
significant resource hit at this phase in the development cycle. However,
solving this problem is necessary to deliver a complete, usable Mozilla Plug-in
API.
Adding [PIDEV] to Summary to flag plug-in API completion bugs that are blocking
plug-in developers in general (as opposed to the developer of a specific
plug-in).
Reporter | ||
Comment 1•25 years ago
|
||
PDT team: Nominating nsbeta2 (seeking authorization for Chris to check in the
fix he has ready to go, but not asking that we hold nsbeta2 for this if he
doesn't get it in the next few days) and nsbeta3 (for which this bug is a
stopper if we want to have a usable Mozilla Plug-in API in the product and
backward compatibility with existing content that sniffs using the
navigator.plugins array). I recognize that we're past 7/17 and that "pulling off
the wire" is the criterion for true "nsbeta2 stopper" status. However, this bug
blocks 37522 which is nsbeta2+ approved. Both these bugs are key to achieving
our goal of N6 PR2 being a release against which plug-in vendors can develop
and test working Mozilla Plug-in API-based plug-ins. Please permit Chris to
check in if he has a reviewed fix believed to be low risk.
Assignee | ||
Updated•25 years ago
|
Status: NEW → ASSIGNED
Component: XPCOM Registry → Plug-ins
Whiteboard: FIX IN HAND
Comment 4•25 years ago
|
||
Putting on [nsbeta2-] radar. Not critical to beta2.
Whiteboard: FIX IN HAND → [nsbeta2-] FIX IN HAND
Reporter | ||
Comment 5•25 years ago
|
||
Clearing [nsbeta2-] to trigger re-evaluation. I need to clarify my comments
here. This is not some cool new whiz-bang end user feature that is a "nice to
have" and OK to check-in whenever. The lack of this functionality is blocking
our plug-in partners like RealNetworks, Macromedia, and others from being able
to upgrade their plug-ins that *must* be done in time for FCS. They cannot move
forward until we unblock them. One of the original key goals for N6 PR2 in the
beta2 criteria was to be feature-complete for the Plug-in API to enable plug-in
vendors to write to it and to test against it. If we do not check in this
functionality, we will fail to meet that goal. (Basically, I was too
accommodating of the "ship at any cost" mentality in my previous comments; we
need to draw a line on functionality on this one.) The bottom line is that we
need to deliver a product to our developers that they can write to so that they
are able to move forward quickly and find by running their upgraded plug-in on
PR2 with widespread testing the other Plug-in API bugs we don't know about which
will also have to be fixed during nsbeta3 and for rtm.
Bottom line: this *is* a "pull it off the wire" issue because of the external
partner code development dependency and the fact that not fixing this bug
is preventing our plug-in partners from uncovering other bugs we don't
know about yet. Please mark [nsbeta2+] and permit the check-in. Thanks!
Whiteboard: [nsbeta2-] FIX IN HAND → FIX IN HAND
Per today's PDT mtg, setting to [nsbeta2+]
Whiteboard: FIX IN HAND → [nsbeta2+]FIX IN HAND
Assignee | ||
Comment 7•25 years ago
|
||
Assignee | ||
Comment 8•25 years ago
|
||
Here are the salient changes:
- Add RegisterPlugin() and UnregisterPlugin() methods to nsIPluginManager.
Added at the end of the vtable so as not to disturb existing binaries.
- Add implementations of these methods to nsPluginHostImpl. RegisterPlugin()
adds persistent registry entries under nsIRegistry::Common/software/plugins,
one subtree per plugin CID. That subtree holds the plugin's "name" and
"description" attributes. Beneath that subtree are further subtrees, one per
MIME type that the plugin supports. Each of *those* subtrees has a "mimetype",
"description", and "extension" value.
- UnregisterPlugin() removes the plugin's subtree from the registry.
- Add XPCOM plugins to the plugin datastructurs when plugin manager is started
from nsIPluginManager::LoadPlugins().
- Refactor code shared between libgklayout.so and libgkplugin.so. Specifically,
move nsPluginViewer out of layout and into plugin DLL. Implement plugin
doc-loader factory, separate from layout's DLF.
- Update sample plugin to reflect API changes; uses nsIModule, no longer
requires nsIPlugin.
Assignee | ||
Comment 9•25 years ago
|
||
Also,
- Made libgkplugin.so into an XPCOM module. I have changes to
mozilla:build:mac:NGLayoutBuildList.pm (not in the above patch) to accomodate
for that.
Assignee | ||
Comment 10•25 years ago
|
||
Assignee | ||
Comment 11•25 years ago
|
||
Assignee | ||
Comment 12•25 years ago
|
||
Please ignore the first patch: it had merge conflicts. The second patch fixes
that, as well as some build ordering issues that are introduced (modules/plugin
now depends on GFX because nsPluginViewer now lives there). Finally, I included
nsPluginModule.cpp, a new file.
Assignee | ||
Comment 13•25 years ago
|
||
And look, pierre phaneuf has already contributed to it!
Assignee | ||
Comment 14•25 years ago
|
||
Comment 15•25 years ago
|
||
One comment about the patch so far. Rather than recording the plugins leafname
in the nsPluginTag struct can we record the whole path?
The is where the leafname is pulled out of nsIFile in nsPluginHostImpl.cpp:
if (NS_SUCCEEDED(rv)) {
file->GetLeafName(getter_Copies(filename));
}
If you display installed plugins using this link
http://bugzilla.mozilla.org/showattachment.cgi?attach_id=9156 you will see the
exact location of the installed plugin for 4x plugins but not for xpcom plugins.
Comment 16•25 years ago
|
||
One reason you want to see the whole path (as recorded in the registry) is that
on windows, if you want to unregister a plugin using regxpcom, you have to
match the case of the file path and name as it was originally registered.
Assignee | ||
Comment 17•25 years ago
|
||
sean: change "GetLeafName()" to "GetPath()". Does that work for you?
Comment 18•25 years ago
|
||
Yep - GetPath() does the trick.
Assignee | ||
Comment 19•25 years ago
|
||
Assignee | ||
Comment 20•25 years ago
|
||
Assignee | ||
Comment 21•25 years ago
|
||
Assignee | ||
Comment 22•25 years ago
|
||
Assignee | ||
Comment 23•25 years ago
|
||
Updated patch to include comments from av & sean; attach new files.
Assignee | ||
Updated•25 years ago
|
Target Milestone: --- → M17
Assignee | ||
Comment 24•25 years ago
|
||
checked in, r=av
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Reporter | ||
Comment 26•25 years ago
|
||
*** Bug 18641 has been marked as a duplicate of this bug. ***
Updated•3 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•