Closed
Bug 863447
Opened 11 years ago
Closed 11 years ago
Allow some time to complete async work if nsGlobalWindow appears leaked
Categories
(Testing :: Mochitest, defect)
Testing
Mochitest
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla23
People
(Reporter: mak, Assigned: mak)
References
Details
Attachments
(1 file)
2.86 KB,
patch
|
ttaubert
:
review+
|
Details | Diff | Splinter Review |
By introducing the first indexedDB mochitest browser test in bug 861308, I found that indexedDB keeps mainthread objects alive until pending off main-thread work is complete. This may last a few milliseconds, though it totally confuses our leak detection, that runs as soon as the test completes. This is a case I found, but I can easily see it may happen in other cases, especially now that we move towards more multi-threaded components, it may even be cause of some intermittent reported leaks. I suggest when a leak is detected we "sleep" a small timeframe (I suggest 1s) and then we retry the leak checking. This is not a perfect solution (we can't detect easily work completion on other threads), but should improve the situation without increasing much the time since it acts only when a globalwindow leak is detected. I will try making the change and see how it behaves in the indexedDB case.
Assignee | ||
Comment 1•11 years ago
|
||
Attachment #739512 -
Flags: review?(ttaubert)
Assignee | ||
Comment 2•11 years ago
|
||
https://tbpl.mozilla.org/?tree=Try&rev=1bbe1c1206fd
Assignee | ||
Comment 3•11 years ago
|
||
oh, well, looks like I must fix something in aboutHome.js, though should be part of bug 789348, I will do another try with just this patch.
Comment 4•11 years ago
|
||
Comment on attachment 739512 [details] [diff] [review] patch v1.0 Review of attachment 739512 [details] [diff] [review]: ----------------------------------------------------------------- Sounds reasonable to me as we're only waiting for a second when detecting a leak (which is the exception). Maybe we could also kick off a GC right before analyzing the CC graph again. smaug suggested doing this in another patch I was writing but I can't exactly remember why. Shouldn't hurt, though. Also, <3 fat arrow functions.
Attachment #739512 -
Flags: review?(ttaubert) → review+
Assignee | ||
Comment 5•11 years ago
|
||
(In reply to Tim Taubert [:ttaubert] from comment #4) > Maybe we could also kick off a GC right > before analyzing the CC graph again. afaict the analyzer already runs 3 gc before analyzing, am I wrong?
Comment 6•11 years ago
|
||
(In reply to Marco Bonardo [:mak] from comment #5) > (In reply to Tim Taubert [:ttaubert] from comment #4) > > Maybe we could also kick off a GC right > > before analyzing the CC graph again. > > afaict the analyzer already runs 3 gc before analyzing, am I wrong? Right! Was just testing you, carry on :)
Assignee | ||
Comment 7•11 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/bed3081376ca
Target Milestone: --- → mozilla23
Comment 8•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/bed3081376ca
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Updated•6 years ago
|
Component: BrowserTest → Mochitest
You need to log in
before you can comment on or make changes to this bug.
Description
•