Bug 1065881 - [e10s] Crash on child process shutdown in ShadowLayerForwarder::InWorkerThread
Had caused a crash in the test_streams_element_capture mochitest on Windows. The issue was that the audio decoder thread was destroying stale media frames by releasing a reference to them. This was causing the release of an Image on that thread, but that thread does not process a MessageLoop so the current MessageLoop is null. This is not a problem. Obviously, any thread that has no MessageLoop can't be the worker thread.
--- a/content/media/test/mochitest.ini
+++ b/content/media/test/mochitest.ini
@@ -455,17 +455,16 @@ skip-if = true # bug 1021673
[test_seekLies.html]
[test_source.html]
[test_source_media.html]
[test_source_null.html]
[test_source_write.html]
[test_standalone.html]
[test_streams_autoplay.html]
[test_streams_element_capture.html]
-skip-if = e10s && os == 'win' # Bug 1065881 - Crash on child process shutdown in ShadowLayerForwarder::InWorkerThread
[test_streams_element_capture_createObjectURL.html]
[test_streams_element_capture_playback.html]
[test_streams_element_capture_reset.html]
[test_streams_gc.html]
skip-if = buildapp == 'b2g' # bug 1021682
[test_streams_srcObject.html]
[test_streams_tracks.html]
[test_texttrack.html]
--- a/gfx/layers/ipc/ShadowLayers.cpp
+++ b/gfx/layers/ipc/ShadowLayers.cpp
@@ -489,17 +489,17 @@ ShadowLayerForwarder::RemoveTextureFromC
}
CompositableClient::HoldUntilComplete(aCompositable->GetIPDLActor(),
aAsyncTransactionTracker);
}
bool
ShadowLayerForwarder::InWorkerThread()
{
- return GetMessageLoop()->id() == MessageLoop::current()->id();
+ return MessageLoop::current() && (GetMessageLoop()->id() == MessageLoop::current()->id());
}
static void RemoveTextureWorker(TextureClient* aTexture, ReentrantMonitor* aBarrier, bool* aDone)
{
aTexture->ForceRemove();
ReentrantMonitorAutoEnter autoMon(*aBarrier);
*aDone = true;