Bug 1464061 - Return error immediately when plugin frame is destroyed. r=masayuki
authorMakoto Kato <m_kato@ga2.so-net.ne.jp>
Fri, 25 May 2018 10:20:00 -0400
changeset 419893 5be1985874a06d7a7192d8db04d07af2f436c41c
parent 419892 104f1728e3bcb12d677effe725a58f92e1709074
child 419894 ea19ea9820f496f682c71634a011991c28f6ab5d
push id34052
push userccoroiu@mozilla.com
push dateFri, 25 May 2018 17:52:14 +0000
treeherdermozilla-central@94d7f0e1c4d0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmasayuki
bugs1464061
milestone62.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 1464061 - Return error immediately when plugin frame is destroyed. r=masayuki
dom/plugins/base/nsPluginInstanceOwner.cpp
--- a/dom/plugins/base/nsPluginInstanceOwner.cpp
+++ b/dom/plugins/base/nsPluginInstanceOwner.cpp
@@ -897,16 +897,20 @@ nsPluginInstanceOwner::RequestCommitOrCa
     widget->NotifyIME(widget::REQUEST_TO_CANCEL_COMPOSITION);
   }
   return true;
 }
 
 bool
 nsPluginInstanceOwner::EnableIME(bool aEnable)
 {
+  if (NS_WARN_IF(!mPluginFrame)) {
+    return false;
+  }
+
   nsCOMPtr<nsIWidget> widget = GetContainingWidgetIfOffset();
   if (!widget) {
     widget = GetRootWidgetForPluginFrame(mPluginFrame);
     if (NS_WARN_IF(!widget)) {
       return false;
     }
   }