Bug 617718. Don't process invalidates if we're stopping. r=bsmedberg a=bsmedberg
authorRobert O'Callahan <robert@ocallahan.org>
Tue, 21 Dec 2010 15:03:00 -0800
changeset 59576 6b98f6cf45899ad77115976ea1dd160eeff93ba8
parent 59575 95bbe1076dcb873cfed98fc30356bcc87a797b71
child 59577 046dada4fadce81561707a5a700d4c6371c90ebc
push id17673
push userdholbert@mozilla.com
push dateTue, 21 Dec 2010 23:04:38 +0000
treeherdermozilla-central@52b229f6a051 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbsmedberg, bsmedberg
bugs617718
milestone2.0b9pre
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 617718. Don't process invalidates if we're stopping. r=bsmedberg a=bsmedberg
modules/plugin/base/src/nsNPAPIPluginInstance.cpp
--- a/modules/plugin/base/src/nsNPAPIPluginInstance.cpp
+++ b/modules/plugin/base/src/nsNPAPIPluginInstance.cpp
@@ -1121,38 +1121,47 @@ nsNPAPIPluginInstance::GetDOMElement(nsI
     return tinfo->GetDOMElement(result);
 
   return NS_ERROR_FAILURE;
 }
 
 NS_IMETHODIMP
 nsNPAPIPluginInstance::InvalidateRect(NPRect *invalidRect)
 {
+  if (RUNNING != mRunning)
+    return NS_OK;
+
   nsCOMPtr<nsIPluginInstanceOwner> owner;
   GetOwner(getter_AddRefs(owner));
   if (!owner)
     return NS_ERROR_FAILURE;
 
   return owner->InvalidateRect(invalidRect);
 }
 
 NS_IMETHODIMP
 nsNPAPIPluginInstance::InvalidateRegion(NPRegion invalidRegion)
 {
+  if (RUNNING != mRunning)
+    return NS_OK;
+
   nsCOMPtr<nsIPluginInstanceOwner> owner;
   GetOwner(getter_AddRefs(owner));
   if (!owner)
     return NS_ERROR_FAILURE;
 
   return owner->InvalidateRegion(invalidRegion);
 }
 
 NS_IMETHODIMP
 nsNPAPIPluginInstance::ForceRedraw()
 {
+  if (RUNNING != mRunning)
+    return NS_OK;
+
   nsCOMPtr<nsIPluginInstanceOwner> owner;
   GetOwner(getter_AddRefs(owner));
   if (!owner)
     return NS_ERROR_FAILURE;
 
   return owner->ForceRedraw();
 }