Bug 1483240 - Disable plugins in recording/replaying processes, r=jimm.
authorBrian Hackett <bhackett1024@gmail.com>
Tue, 21 Aug 2018 00:56:47 +0000
changeset 487742 ea26467472df9849f0f59a2179493ca7295870ee
parent 487741 83c0cdea8a9fb6dafe8a646145cc63582772cb8e
child 487743 929bae71da4c94c8c74d5b8089fb87411ad24bf3
push id9719
push userffxbld-merge
push dateFri, 24 Aug 2018 17:49:46 +0000
treeherdermozilla-beta@719ec98fba77 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjimm
bugs1483240
milestone63.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1483240 - Disable plugins in recording/replaying processes, r=jimm.
dom/plugins/base/nsPluginHost.cpp
--- a/dom/plugins/base/nsPluginHost.cpp
+++ b/dom/plugins/base/nsPluginHost.cpp
@@ -788,16 +788,22 @@ nsPluginHost::InstantiatePluginInstance(
   PR_LogFlush();
 #endif
 
   if (aMimeType.IsEmpty()) {
     MOZ_ASSERT_UNREACHABLE("Attempting to spawn a plugin with no mime type");
     return NS_ERROR_FAILURE;
   }
 
+  // Plugins are not supported when recording or replaying executions.
+  // See bug 1483232.
+  if (recordreplay::IsRecordingOrReplaying()) {
+    return NS_ERROR_FAILURE;
+  }
+
   RefPtr<nsPluginInstanceOwner> instanceOwner = new nsPluginInstanceOwner();
   if (!instanceOwner) {
     return NS_ERROR_OUT_OF_MEMORY;
   }
 
   nsCOMPtr<nsIContent> ourContent = do_QueryInterface(static_cast<nsIImageLoadingContent*>(aContent));
   nsresult rv = instanceOwner->Init(ourContent);
   if (NS_FAILED(rv)) {