Closed
Bug 1041691
Opened 10 years ago
Closed 10 years ago
Cleanup CheckPluginStopEvent, prevent possible leak of running plugin
Categories
(Core Graveyard :: Plug-ins, defect)
Core Graveyard
Plug-ins
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla34
People
(Reporter: johns, Assigned: johns)
Details
Attachments
(1 file)
5.63 KB,
patch
|
benjamin
:
review+
johns
:
checkin+
|
Details | Diff | Splinter Review |
While looking at the codepaths for bug 883134, I found yet-another-reentrance issue in this code-- we may clear mPendingCheckPluginStopEvent after calling StopPluginInstance in CheckPluginStopEvent::Run, but StopPluginInstance is re-entrant. This could lead to: > StopPluginInstance->Script->Setup New Plugin->Script->DestroyContent->QueueCheckPluginStopEvent
Assignee | ||
Comment 1•10 years ago
|
||
Attachment #8459728 -
Flags: review?(benjamin)
Assignee | ||
Comment 2•10 years ago
|
||
(In reply to John Schoenick [:johns] from comment #1) > Created attachment 8459728 [details] [diff] [review] > Cleanup CheckPluginStopEvent, prevent possible leak of running plugin Annnd the explanation I put in the commit message instead of the comment field by accident: Bug 1041691 - Cleanup CheckPluginStopEvent, prevent possible leak of running plugin So I don't think this is behind bug 883134, but it's more potential re-entrance insanity cleanup that can't hurt. The actual bug fixed here is nulling mPendingCheckPluginStopEvent at the end of CheckPluginStopEvent::Run, after StopPluginInstance(), which may have re-entered, thus potentially blocking a valid plugin stop event which could be the last-chance stop of a plugin when content is destroyed. This also stops calling UnloadObject() inside CheckPluginStopEvent, which just throws away extra state for no apparent reason, avoids queuing some unnecessary events, and cleans up the code a little.
Assignee | ||
Comment 3•10 years ago
|
||
https://tbpl.mozilla.org/?tree=Try&rev=1e3582848cfa
Updated•10 years ago
|
Attachment #8459728 -
Flags: review?(benjamin) → review+
Assignee | ||
Comment 4•10 years ago
|
||
Comment on attachment 8459728 [details] [diff] [review] Cleanup CheckPluginStopEvent, prevent possible leak of running plugin https://hg.mozilla.org/integration/mozilla-inbound/rev/445f556f7a98
Attachment #8459728 -
Flags: checkin+
Comment 5•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/445f556f7a98
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla34
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
•