gecko-dev/dom
Chris Pearce 0901ad8256 Bug 1315850 - Ask the GMPService for the GMP thread in GMPParent::ChildTerminated. r=gerald
When we shutdown the browser while the GMPService is active we can end up
leaking a GMPParent, GeckoMediaPluginServiceParent, and a Runnable. I tracked
this down to the runnable dispatched to the GMP thread in
GMPParent::ChildTerminated(). The dispatch of this runnable is failing as we
are dispatching the runnable to a reference of the GMP thread which we have
previously acquired, but that thread is now shutdown. So the dispatch fails,
and if you look in nsThread::DispatchInternal() you'll see that we deliberately
leak the runnable if dispatch fails! The runnable leaking means that the
references it holds to the GMPParent and the GMP service parent leak.

The solution in this patch is to not cache a reference to the GMP thread on the
GMPParent; instead we re-request the GMP thread from the GMPService when we
want it. This means that in the case where the browser is shutting down,
GMPParent::GMPThread() will return null, and we'll not leak the runnable. We'll
then follow the (hacky) shutdown path added in bug 1163239.

We also need to change GMPParent::GMPThread() and GMPContentParent::GMPThread()
to return a reference to the GMP thread with a refcount held on it, in order
to ensure we don't race with the GMP service shutting down the GMP thread
while we're trying to dispatch to in on shutdown.

MozReview-Commit-ID: CXv9VZqTRzY

--HG--
extra : rebase_source : e507e48ee633cad8911287fb7296bbb1679a7bcb
2017-03-24 13:38:00 +13:00
..
animation Backed out 9 changesets (bug 1333482) for stylo test failures and this should be landed to autoland 2017-03-24 10:21:30 +08:00
asmjscache Bug 1348660 - Part 3: Separate the canceled state out of UsageInfo; r=btseng 2017-03-22 12:13:54 +01:00
audiochannel Bug 1348783 - use LazyLogModule for AudioChannel logging. r=baku 2017-03-21 10:38:48 +08:00
base Backed out 9 changesets (bug 1333482) for stylo test failures and this should be landed to autoland 2017-03-24 10:21:30 +08:00
battery
bindings Bug 1343933 - Renaming Principal classes - part 2 - NullPrincipal, r=qdot 2017-03-22 11:38:40 +01:00
broadcastchannel Bug 1311324 P2 Replace usage of ServiceWorkerMessageEvent with MessageEvent. r=bz 2017-03-09 20:50:13 -05:00
browser-element Bug 1151421 Part 3: Update tests of pageYOffset/scrollY to round off when checking expected results. r=smaug 2017-03-16 12:05:56 -07:00
cache Bug 1348660 - Part 3: Separate the canceled state out of UsageInfo; r=btseng 2017-03-22 12:13:54 +01:00
canvas Merge inbound to central, a=merge 2017-03-23 16:15:37 -07:00
commandhandler
console
crypto Bug 1342144 - Remove version parameter from the type attribute of script elements. r=jmaher 2017-02-23 06:10:07 +09:00
encoding Backed out changeset cc308a73ad05 (bug 1347314) for eslint failure in test_device.html. r=backout 2017-03-22 18:20:26 +01:00
events Backed out 9 changesets (bug 1333482) for stylo test failures and this should be landed to autoland 2017-03-24 10:21:30 +08:00
fetch Bug 1341738 - Implement FetchController and FetObserver - part 5 - Dispatching observer events, r=bkelly 2017-03-22 11:07:27 +01:00
file Bug 1344957 - Enabling File.createFromNsIFile and File.createFromFileName only for testing and file-content-process, r=ehsan, r=bobowen 2017-03-21 11:11:06 +01:00
filehandle
filesystem Bug 1344415 - Introduce a security check about which files can be opened by a content process, r=ehsan 2017-03-16 08:53:49 +01:00
flyweb Bug 1274343 - Add parent-to-child pipe streaming to IPCStream - part 2 - PParentToChild, r=smuag 2017-03-14 12:29:43 +01:00
gamepad
geolocation Backed out changeset 8b1c50cdb50c (bug 1072859) for failing devtools/client/responsive.html/test/browser/browser_permission_doorhanger.js. r=backout a=merge 2017-03-09 00:46:17 +01:00
grid
html Backed out 9 changesets (bug 1333482) for stylo test failures and this should be landed to autoland 2017-03-24 10:21:30 +08:00
imptests
indexedDB Bug 1349158 - Update Key Generator algorithm specified in IDB v2.0. r=janv 2017-03-22 15:21:08 +08:00
interfaces Bug 1337056 - Part 12: Send down permissions when calling createAboutBlankContentViewer, r=baku 2017-03-21 11:08:03 -04:00
ipc Bug 1315850 - Add media.eme.chromium-api.enabled to ContentPrefs.cpp. r=smaug 2017-02-22 16:12:47 +13:00
json Bug 1343933 - Renaming Principal classes - part 2 - NullPrincipal, r=qdot 2017-03-22 11:38:40 +01:00
jsurl Bug 1331662 part 2 - Replace nsJSUtils::EvaluateString calls by ExecutionContext scopes. r=bz 2017-03-22 13:42:27 +00:00
locales Bug 1344642 - Part 1: Cleanup dom.forms.datepicker related code. r=smaug 2017-03-17 11:01:57 +08:00
manifest Bug 1347154 - Set correct csp for icon fetching. r=marcosc 2017-03-17 10:55:59 +00:00
mathml
media Bug 1315850 - Ask the GMPService for the GMP thread in GMPParent::ChildTerminated. r=gerald 2017-03-24 13:38:00 +13:00
messagechannel
network Bug 1274343 - Add parent-to-child pipe streaming to IPCStream - part 2 - PParentToChild, r=smuag 2017-03-14 12:29:43 +01:00
notification Bug 1337056 - Part 6: Disable nsPermissionManager::GetEnumerator in the content process, r=kitcambridge 2017-03-21 11:08:03 -04:00
offline Backed out changeset ef22dba0dac5 (bug 1316683) for various test failures, e.g. xpcshell netwerk/test/unit/test_bug826063.js and browser-chrome browser/components/downloads/test/browser/browser_iframe_gone_mid_download.js. r=backout on a CLOSED TREE 2017-03-22 20:28:39 +01:00
performance merge mozilla-inbound to mozilla-central a=merge 2017-03-07 15:13:31 +01:00
permission Bug 1295877 - Remove accidentally added |debugger;|. r=marcosc 2017-02-28 20:26:53 +09:00
plugins merge autoland to mozilla-central a=merge 2017-03-23 13:42:40 +01:00
power Bug 1344629 - Part 6: Rewrite unnecessary uses of nsLiteralString. r=dbaron 2017-03-14 15:26:27 +13:00
presentation Bug 1337467 - Convert observers to bundle events; r=rbarker r=sebastian 2017-03-07 12:34:04 -05:00
promise Bug 1342060 - wasm: enable by default (r=bbouvier,sr=jorendorff) 2017-02-23 13:02:40 -06:00
push Bug 1300112 - Avoid duplicate push notifications by sending push messages to only one content process. r=kitcambridge 2017-03-09 11:12:49 +00:00
quota Bug 1348660 - Part 6: Rename QuotaManager::IsOriginWhitelistedForPersistentStorage() to QuotaManager::IsOriginInternal(); r=btseng 2017-03-22 12:14:09 +01:00
res
secureelement
security Bug 1316305 - Explicilty call .close() for websocket in test. r=baku 2017-03-22 13:04:02 +01:00
smil Bug 1062106 part 3 - Remove SMIL MappedAttribute mechanism. r=birtles 2017-03-21 15:45:58 +09:00
storage
svg Bug 1062106 part 4 - Remove GetTargetAttributeType() from svg element. r=birtles 2017-03-21 15:45:58 +09:00
system Bug 1344711 - script-generated patch to remove try blocks around get*Pref calls, r=jaws. 2017-03-07 15:29:48 +01:00
tests Backed out 9 changesets (bug 1333482) for stylo test failures and this should be landed to autoland 2017-03-24 10:21:30 +08:00
time
u2f Bug 1334388 - Disable intermittent dom/u2f/tests/test_multiple_keys.html. r=keeler 2017-03-14 18:41:51 -07:00
url Bug 1324243 - Normalize IPv6 r=manishearth 2017-03-09 00:55:05 +01:00
vr Bug 1306493 - Part 6: disable require gesture when running VR tests; r=kip 2017-03-16 11:46:22 +08:00
webauthn Backed out changeset 713c0a78c2c1 (bug 1260318) for leak issue 2017-03-08 14:01:56 +08:00
webbrowserpersist Bug 1274343 - Add parent-to-child pipe streaming to IPCStream - part 2 - PParentToChild, r=smuag 2017-03-14 12:29:43 +01:00
webidl Bug 1341738 - Implement FetchController and FetObserver - part 4 - FetchObserver WebIDL, r=bkelly 2017-03-22 11:06:23 +01:00
workers Bug 1348453 - Make the second argument to ImageBitmap::ExtensionsEnabled() optional; r=baku 2017-03-23 10:27:41 -04:00
worklet Bug 1331662 part 2 - Replace nsJSUtils::EvaluateString calls by ExecutionContext scopes. r=bz 2017-03-22 13:42:27 +00:00
xbl Bug 1331662 part 2 - Replace nsJSUtils::EvaluateString calls by ExecutionContext scopes. r=bz 2017-03-22 13:42:27 +00:00
xhr Bug 1331434 - Part 8: Avoid doing work after throwing in XMLHttpRequestWorker::SendInternal, r=baku 2017-03-07 19:06:48 -05:00
xml Bug 1333990: Part 2c.1 - Interrupt the XML flush loop after inserting document element. r=hsivonen 2017-03-15 14:04:37 -07:00
xslt Backed out changeset 421407ec02c0 (bug 1338277) for failing its own crashtest. r=backout 2017-03-22 23:47:25 +01:00
xul Backed out changeset cc308a73ad05 (bug 1347314) for eslint failure in test_device.html. r=backout 2017-03-22 18:20:26 +01:00
jar.mn
moz.build Bug 1299500 - Get rid of DeviceStorage API - part 10 - DeviceStorage, r=ehsan, r=billm 2017-03-08 20:15:45 +01:00