Closed
Bug 110781
Opened 23 years ago
Closed 23 years ago
plugin scanning doesn't always catch duplicates
Categories
(Core Graveyard :: Plug-ins, defect)
Core Graveyard
Plug-ins
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: peterlubczynski-bugs, Assigned: peterlubczynski-bugs)
References
Details
(Whiteboard: [possible 0.9.4 branch cadidate???])
Attachments
(1 file)
5.35 KB,
patch
|
serhunt
:
review+
beard
:
superreview+
|
Details | Diff | Splinter Review |
As we are now increasing the number of folders scanned for plugins, it is becoming more important that plugin code correctly identify duplicate plugins found during the scan. Currently, we use a static method called areTheSameFileNames in nsPluginHostImpl.cpp that attempts to weed out duplicates based on filename. I propse this be replaced by 3 checks: 1) compare nsPluginTag->mName (same name, same plugin) 2) compare nsPluginTag->mDescription 3) compare nsPlugingTag->mMimeTypeArray (same handlers, same plugin) The reason for those three checks is because filenames can change as with symlinks and on Mac. Quicktime updates the mName field with it's versions so 5.0 and 5.02 won't match. However, Java and Flash use mDescription, so we check for that next. Finally, there are some plugins that update neither of those fields on update new versions, so we need to check the mime type array as well.
Assignee | ||
Comment 1•23 years ago
|
||
*** Bug 110778 has been marked as a duplicate of this bug. ***
Assignee | ||
Comment 2•23 years ago
|
||
Assignee | ||
Updated•23 years ago
|
Attachment #58377 -
Attachment description: patch for deep copy → patch for deep compare
Comment on attachment 58377 [details] [diff] [review] patch for deep compare I like the patch, r=av You may want o add a null-check, like PRBool nsPluginTag::Equals(nsPluginTag *aPluginTag) { if(!aPluginTag) return PR_FALSE; Also, this code will not catch duplicates which are only different by the order of the mime type listed, but I think this kind of situation is not likely.
Attachment #58377 -
Flags: review+
Wcan we can also compare mLibrary on Unix, thus addressing bug 110768.
Comment 5•23 years ago
|
||
Comment on attachment 58377 [details] [diff] [review] patch for deep compare sr=beard
Attachment #58377 -
Flags: superreview+
Assignee | ||
Comment 6•23 years ago
|
||
*** Bug 110768 has been marked as a duplicate of this bug. ***
Assignee | ||
Comment 7•23 years ago
|
||
Thanks! I added a null pointer check/assertion but I think the mLibrary isn't needed. Checking the order of mime types should be enough to catch duplicates.
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Whiteboard: [possible 0.9.4 branch cadidate???]
Comment 8•22 years ago
|
||
plugins get scanned fine now and are listed according to version numbers.
Status: RESOLVED → VERIFIED
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
•