Closed
Bug 544345
Opened 14 years ago
Closed 14 years ago
Utilize IPDL hang detection in PluginModuleParent and set timeout based on pref
Categories
(Core Graveyard :: Plug-ins, enhancement)
Core Graveyard
Plug-ins
Tracking
(status1.9.2 .4-fixed)
RESOLVED
FIXED
Tracking | Status | |
---|---|---|
status1.9.2 | --- | .4-fixed |
People
(Reporter: cjones, Assigned: cjones)
References
Details
(Whiteboard: [fixed-lorentz])
Attachments
(3 files)
8.49 KB,
patch
|
benjamin
:
review+
|
Details | Diff | Splinter Review |
6.89 KB,
patch
|
benjamin
:
review+
|
Details | Diff | Splinter Review |
6.89 KB,
patch
|
Details | Diff | Splinter Review |
How does "dom.ipc.plugins.timeoutSecs" sound? I'd also like to default its value to that of the JS slow-script timeout based on the assumption that that value was chosen after discussion/experience/UX considerations.
Assignee | ||
Comment 1•14 years ago
|
||
This isn't shippable code, just a stepping stone to bug 544095.
Assignee: nobody → jones.chris.g
Attachment #425328 -
Flags: review?(benjamin)
Assignee | ||
Comment 2•14 years ago
|
||
Requesting review because I don't feel 100% comfortable with mochitests. Don't want nondeterministic crud.
Attachment #425329 -
Flags: review?(benjamin)
Comment 3•14 years ago
|
||
Comment on attachment 425328 [details] [diff] [review] Kill plugins if they exceed the hang timeout. >diff --git a/dom/plugins/PluginModuleParent.cpp b/dom/plugins/PluginModuleParent.cpp >+static const char* kTimeoutPref = "dom.ipc.plugins.timeoutSecs"; This could be `static char const *const kTimeoutPref`, but it would be best as `static const char kTimeoutPref[]`; >+ nsContentUtils::RegisterPrefCallback(kTimeoutPref, TimeoutChanged, parent); >+ TimeoutChanged(kTimeoutPref, parent); The contentutils pref callback perpetuates the awful nsIPref callback design. But given that the only other option is an XPCOM object, I guess this is expedient. Why can't this be in the PluginModuleParent constructor, though, so that Register/Unregister are a matched pair, easy to find? r=me with those changes
Attachment #425328 -
Flags: review?(benjamin) → review+
Assignee | ||
Comment 4•14 years ago
|
||
(In reply to comment #3) > >+ nsContentUtils::RegisterPrefCallback(kTimeoutPref, TimeoutChanged, parent); > >+ TimeoutChanged(kTimeoutPref, parent); > > The contentutils pref callback perpetuates the awful nsIPref callback design. > But given that the only other option is an XPCOM object, I guess this is > expedient. Why can't this be in the PluginModuleParent constructor, though, so > that Register/Unregister are a matched pair, easy to find? > Alas, but the RPCChannel isn't usable until after toplevelActor.Open() has been called.
Assignee | ||
Comment 5•14 years ago
|
||
(In reply to comment #4) > (In reply to comment #3) > > >+ nsContentUtils::RegisterPrefCallback(kTimeoutPref, TimeoutChanged, parent); > > >+ TimeoutChanged(kTimeoutPref, parent); > > > > The contentutils pref callback perpetuates the awful nsIPref callback design. > > But given that the only other option is an XPCOM object, I guess this is > > expedient. Why can't this be in the PluginModuleParent constructor, though, so > > that Register/Unregister are a matched pair, easy to find? > > > > Alas, but the RPCChannel isn't usable until after toplevelActor.Open() has been > called. Ignore that. I'll Register() in the ctor, then do the initial TimeoutChanged() in LoadModule().
Updated•14 years ago
|
Attachment #425329 -
Flags: review?(benjamin) → review+
Assignee | ||
Comment 6•14 years ago
|
||
Assignee | ||
Comment 7•14 years ago
|
||
Pushed http://hg.mozilla.org/projects/electrolysis/rev/4bbb628d71c8 Pushed http://hg.mozilla.org/projects/electrolysis/rev/0f8a10cc7ca3
Whiteboard: [land m-c]
Assignee | ||
Comment 8•14 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/391018912b6c http://hg.mozilla.org/mozilla-central/rev/19d9c18c2a7a http://hg.mozilla.org/mozilla-central/rev/d991b15840a8
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Updated•14 years ago
|
Whiteboard: [land m-c]
Comment 9•14 years ago
|
||
http://hg.mozilla.org/projects/firefox-lorentz/rev/3478c15481bd
Whiteboard: [fixed-lorentz]
Comment 10•14 years ago
|
||
Blanket approval for Lorentz merge to mozilla-1.9.2 a=beltzner for 1.9.2.4 - please make sure to mark status1.9.2:.4-fixed
Comment 11•14 years ago
|
||
Merged into 1.9.2 at http://hg.mozilla.org/releases/mozilla-1.9.2/rev/84ba4d805430
status1.9.2:
--- → .4-fixed
Comment 12•14 years ago
|
||
(In reply to comment #0) > How does "dom.ipc.plugins.timeoutSecs" sound? I'd also like to default its > value to that of the JS slow-script timeout based on the assumption that that > value was chosen after discussion/experience/UX considerations. The 10 second wall-time default wasn't based on much more than gut check and then seeing if we got too many false positives. We do get false positives, even (until recent post-3.6 changes, I think) for our session restore chrome code. I'm way late here, but the obvious difference between the slow script watchdog timeout and this one is this one is fatal -- the slow script dialog lets the user continue or stop. That overrides any default timeout value consideration! /be
Assignee | ||
Comment 13•14 years ago
|
||
As comment 1 noted, these patches were a stepping stone to what I thought bug 544095 was to be, a "Should this plugin be killed?" dialog. But those patches were ui-r-'d, so the assumptions of comment 0 were invalid.
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
•