Closed
Bug 90389
Opened 23 years ago
Closed 23 years ago
ns4xPluginInstance should not check for pdata != NULL.
Categories
(Core Graveyard :: Plug-ins, defect)
Core Graveyard
Plug-ins
Tracking
(Not tracked)
VERIFIED
FIXED
mozilla0.9.3
People
(Reporter: bnesse, Assigned: bnesse)
Details
Attachments
(1 file)
1.59 KB,
patch
|
Details | Diff | Splinter Review |
There are currently a number of places in ns4xPluginInstance where the plug-in private data member (pdata) of the plugin instance handle (NPP structure) is tested against NULL and NS_ERROR_FAILURE is returned if it is NULL. As this member is never accessed by us, other than when we initialize it to NULL, (rightfully so as it is plugin private information) we should not be throwing errors if it is NULL. If a vendor writes a plugin that never uses this field, their plugin will fail to work in Mozilla/Netscape 6 because we will throw an error on the NULL check.
Assignee | ||
Comment 1•23 years ago
|
||
There was a reason to add this check as it helped to resolve a lot of crashes. I beleive we should still check for it but may be you are right -- not return error.
Comment 3•23 years ago
|
||
After looking at this with Brian, I tend to agree with him. According to the spec, Navigator shouldn't ever care what's in pdata as this is private to the plugin. I think this is a side-effect that when pdata is null the plugin isn't running. I think we were using this to prevent random crashes. But, this isn't a very reliable way of checking if the plugin is running and should be removed. If a plugin crashes, we should try to find the root cause rather than trying to rely on this hack.
Assignee | ||
Comment 4•23 years ago
|
||
I've been running with this patch in my tree for a week and have tested it against every plugin I have. I have seen no related crashes. I can't really see how this would protect us against crashes because, as I noted above, we never access pdata. If the plugin is crashing because they are accessing their own private data without validating it, they need to revisit their own code. Besides which if we do check it, we have 2 options, 1) call the plugin with it being null, or not calling the plugin... which I have already suggested is incorrect.
I agree with this, but there is also a matter of taking responsibility for introducing a possible flood of crashers which will look like regressions. May it is right time to do it for the trunk only, so we can see how it is cooking over time.
Comment 6•23 years ago
|
||
I think the same. This is totaly great for the trunk, r=peterl, but not for the branch. Although I'm pretty sure this is the right thing to do, I think the risk of regressions, especially with Shrirang on vacation, is too high to put this in the branch.
Assignee | ||
Comment 7•23 years ago
|
||
Reassign to myself and add keywords.
Comment 8•23 years ago
|
||
sr=attinasi for the patch 41994
Assignee | ||
Comment 9•23 years ago
|
||
I am in total agreement that this shouldn't go on the branch. I had no intention of trying to land it there. For that matter I'll hold off on checking it in to the trunk for a while if you guys want to run with the patch installed in your trees for a bit first.
Comment 10•23 years ago
|
||
I don't know, I would land it on the trunk -- the earlier we see the problems the better.
Comment 11•23 years ago
|
||
I'd wait for Shrirang to get back next week before landing it but I don't think it'll hurt anything. Brian, have you run with this on Win32 too?
Assignee | ||
Comment 12•23 years ago
|
||
No, I just finished reformatting my HD and reinstalling Win2k, and all the build tools. Of course this also means I don't have any plugins installed either...
Assignee | ||
Comment 13•23 years ago
|
||
Fix checked in.
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Updated•2 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•