Bug 1316661 part 6. Get rid of nsIObjectLoadingContent.hasRunningPlugin, since it's unused. r=smaug
authorBoris Zbarsky <bzbarsky@mit.edu>
Tue, 15 Nov 2016 12:46:31 -0500
changeset 322738 7d6c3fc9d6e41ce030ff6714ab06f519c5f188f0
parent 322737 6bf41608a192873d72639a0e58450f3f14036f46
child 322739 600c55ee185b6a2a4e988c093f58e606949a64a6
push id30961
push userkwierso@gmail.com
push dateThu, 17 Nov 2016 01:08:03 +0000
treeherdermozilla-central@c27117f67fa3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs1316661
milestone53.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 1316661 part 6. Get rid of nsIObjectLoadingContent.hasRunningPlugin, since it's unused. r=smaug
dom/base/nsIObjectLoadingContent.idl
dom/base/nsObjectLoadingContent.cpp
dom/html/HTMLObjectElement.cpp
--- a/dom/base/nsIObjectLoadingContent.idl
+++ b/dom/base/nsIObjectLoadingContent.idl
@@ -171,21 +171,15 @@ interface nsIObjectLoadingContent : nsIS
 
   /**
    * The plugin's current state of fallback content. This property
    * only makes sense if the plugin is not activated.
    */
   readonly attribute unsigned long pluginFallbackType;
 
   /**
-   * If this object currently owns a running plugin, regardless of whether or
-   * not one is pending spawn/despawn.
-   */
-  readonly attribute bool hasRunningPlugin;
-
-  /**
    * If this plugin runs out-of-process, it has a runID to differentiate
    * between different times the plugin process has been instantiated.
    *
    * This throws NS_ERROR_NOT_IMPLEMENTED for in-process plugins.
    */
   readonly attribute unsigned long runID;
 };
--- a/dom/base/nsObjectLoadingContent.cpp
+++ b/dom/base/nsObjectLoadingContent.cpp
@@ -3343,24 +3343,16 @@ nsObjectLoadingContent::DefaultFallbackT
   bool go = ShouldPlay(reason, true);
   if (go) {
     return PLUGIN_ACTIVE;
   }
   return reason;
 }
 
 NS_IMETHODIMP
-nsObjectLoadingContent::GetHasRunningPlugin(bool *aHasPlugin)
-{
-  NS_ENSURE_TRUE(nsContentUtils::IsCallerChrome(), NS_ERROR_NOT_AVAILABLE);
-  *aHasPlugin = HasRunningPlugin();
-  return NS_OK;
-}
-
-NS_IMETHODIMP
 nsObjectLoadingContent::GetRunID(uint32_t* aRunID)
 {
   if (NS_WARN_IF(!nsContentUtils::IsCallerChrome())) {
     return NS_ERROR_NOT_AVAILABLE;
   }
   if (NS_WARN_IF(!aRunID)) {
     return NS_ERROR_INVALID_POINTER;
   }
--- a/dom/html/HTMLObjectElement.cpp
+++ b/dom/html/HTMLObjectElement.cpp
@@ -161,20 +161,16 @@ HTMLObjectElement::OnFocusBlurPlugin(Ele
   // Element that doesn't have a plugin running.  But if SetPluginFocused(true)
   // was just called for aElement while it had a plugin running, we want to
   // make sure nsIWidget::SetPluginFocused(false) gets called for it now, even
   // if aFocus is true.
   if (aFocus) {
     nsCOMPtr<nsIObjectLoadingContent> olc = do_QueryInterface(aElement);
     bool hasRunningPlugin = false;
     if (olc) {
-      // nsIObjectLoadingContent::GetHasRunningPlugin() fails when
-      // nsContentUtils::IsCallerChrome() returns false (which it can do even
-      // when we're processing a trusted focus event).  We work around this by
-      // calling nsObjectLoadingContent::HasRunningPlugin() directly.
       hasRunningPlugin =
         static_cast<nsObjectLoadingContent*>(olc.get())->HasRunningPlugin();
     }
     if (!hasRunningPlugin) {
       aFocus = false;
     }
   }