Bug 106463

Summary: PluginPackage::freeLibraryTimerFired asserts if plugin got loaded again meanwhile
Product: WebKit Reporter: David Faure <faure>
Component: Plug-insAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: andersca, beidson, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Linux   
Bug Depends on:    
Bug Blocks: 106140    
Attachments:
Description Flags
patch
ap: review+, ap: commit-queue-
patch with style fix none

David Faure
Reported 2013-01-09 09:26:56 PST
When debugging why the patch in bug 106140 asserts in PluginPackage::freeLibraryTimerFired, it turns out that this is happening: PluginPackage::load libTestNetscapePlugIn.so m_loadCount=1 PluginPackage::unload libTestNetscapePlugIn.so m_loadCount now 0 PluginPackage::unloadWithoutShutdown libTestNetscapePlugIn.so m_loadCount=0 PluginPackage::freeLibrarySoon libTestNetscapePlugIn.so m_loadCount=0 (should be 0) PluginPackage::load libTestNetscapePlugIn.so m_loadCount=1 PluginPackage::freeLibraryTimerFired: unloading libTestNetscapePlugIn.so m_loadCount=1 (should be 0) If another webpage is loaded after the "scheduled unloading of the plugin via the timer", then we need to skip unloading the plugin.
Attachments
patch (1.33 KB, patch)
2013-01-09 09:30 PST, David Faure
ap: review+
ap: commit-queue-
patch with style fix (1.33 KB, patch)
2013-01-10 01:31 PST, David Faure
no flags
David Faure
Comment 1 2013-01-09 09:30:02 PST
WebKit Review Bot
Comment 2 2013-01-09 09:32:37 PST
Attachment 181936 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCor..." exit_code: 1 Source/WebCore/plugins/PluginPackage.cpp:71: Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons. [readability/comparison_to_zero] [5] Total errors found: 1 in 2 files If any of these errors are false positives, please file a bug against check-webkit-style.
Alexey Proskuryakov
Comment 3 2013-01-09 16:57:22 PST
Comment on attachment 181936 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=181936&action=review Looks reasonable. >> Source/WebCore/plugins/PluginPackage.cpp:71 >> + if (m_loadCount == 0) { > > Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons. [readability/comparison_to_zero] [5] This is correct, please fix.
David Faure
Comment 4 2013-01-10 01:31:20 PST
Created attachment 182085 [details] patch with style fix
WebKit Review Bot
Comment 5 2013-01-10 07:32:36 PST
Comment on attachment 182085 [details] patch with style fix Clearing flags on attachment: 182085 Committed r139318: <http://trac.webkit.org/changeset/139318>
WebKit Review Bot
Comment 6 2013-01-10 07:32:39 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.