diff --git a/dom/base/nsGlobalWindow.cpp b/dom/base/nsGlobalWindow.cpp index 3979a866b15..4675ea3d0be 100644 --- a/dom/base/nsGlobalWindow.cpp +++ b/dom/base/nsGlobalWindow.cpp @@ -605,12 +605,6 @@ nsDummyJavaPluginOwner::InvalidateRegion(NPRegion invalidRegion) return NS_ERROR_NOT_IMPLEMENTED; } -NS_IMETHODIMP -nsDummyJavaPluginOwner::ForceRedraw() -{ - return NS_ERROR_NOT_IMPLEMENTED; -} - NS_IMETHODIMP nsDummyJavaPluginOwner::GetNetscapeWindow(void *value) { diff --git a/dom/plugins/base/nsIPluginInstanceOwner.idl b/dom/plugins/base/nsIPluginInstanceOwner.idl index eb13982984e..9e5f8f87081 100644 --- a/dom/plugins/base/nsIPluginInstanceOwner.idl +++ b/dom/plugins/base/nsIPluginInstanceOwner.idl @@ -49,7 +49,9 @@ class nsPluginEvent; [ptr] native nsNPAPIPluginInstancePtr(nsNPAPIPluginInstance); -[uuid(17E89C1F-AE62-448E-83D5-C33FA6E07A19)] +// Do not make this interface scriptable, because the virtual functions in C++ +// blocks will make script call the wrong functions. +[uuid(23bd0a76-a5dc-4a1d-be76-13d7a0dfd9ff)] interface nsIPluginInstanceOwner : nsISupports { /** @@ -116,11 +118,6 @@ interface nsIPluginInstanceOwner : nsISupports */ void invalidateRegion(in NPRegion aRegion); - /** - * Force a redraw - */ - void forceRedraw(); - /** * Get NetscapeWindow, corresponds to NPNVnetscapeWindow */ diff --git a/dom/plugins/base/nsNPAPIPlugin.cpp b/dom/plugins/base/nsNPAPIPlugin.cpp index 109430b8ce8..ec99dcb58ff 100644 --- a/dom/plugins/base/nsNPAPIPlugin.cpp +++ b/dom/plugins/base/nsNPAPIPlugin.cpp @@ -1308,22 +1308,6 @@ _invalidateregion(NPP npp, NPRegion invalidRegion) void NP_CALLBACK _forceredraw(NPP npp) { - if (!NS_IsMainThread()) { - NPN_PLUGIN_LOG(PLUGIN_LOG_ALWAYS,("NPN_forceredraw called from the wrong thread\n")); - return; - } - NPN_PLUGIN_LOG(PLUGIN_LOG_NORMAL, ("NPN_ForceDraw: npp=%p\n", (void*)npp)); - - if (!npp || !npp->ndata) { - NS_WARNING("_forceredraw: npp or npp->ndata == 0"); - return; - } - - nsNPAPIPluginInstance *inst = (nsNPAPIPluginInstance*)npp->ndata; - - PluginDestructionGuard guard(inst); - - inst->ForceRedraw(); } NPObject* NP_CALLBACK diff --git a/dom/plugins/base/nsNPAPIPluginInstance.cpp b/dom/plugins/base/nsNPAPIPluginInstance.cpp index 3f81a3dff96..0f90ad6ded6 100644 --- a/dom/plugins/base/nsNPAPIPluginInstance.cpp +++ b/dom/plugins/base/nsNPAPIPluginInstance.cpp @@ -1349,20 +1349,6 @@ nsNPAPIPluginInstance::InvalidateRegion(NPRegion invalidRegion) return owner->InvalidateRegion(invalidRegion); } -nsresult -nsNPAPIPluginInstance::ForceRedraw() -{ - if (RUNNING != mRunning) - return NS_OK; - - nsCOMPtr owner; - GetOwner(getter_AddRefs(owner)); - if (!owner) - return NS_ERROR_FAILURE; - - return owner->ForceRedraw(); -} - nsresult nsNPAPIPluginInstance::GetMIMEType(const char* *result) { diff --git a/dom/plugins/base/nsNPAPIPluginInstance.h b/dom/plugins/base/nsNPAPIPluginInstance.h index c56439fb431..ca13f71accf 100644 --- a/dom/plugins/base/nsNPAPIPluginInstance.h +++ b/dom/plugins/base/nsNPAPIPluginInstance.h @@ -115,7 +115,6 @@ public: nsresult GetPluginAPIVersion(PRUint16* version); nsresult InvalidateRect(NPRect *invalidRect); nsresult InvalidateRegion(NPRegion invalidRegion); - nsresult ForceRedraw(); nsresult GetMIMEType(const char* *result); nsresult GetJSContext(JSContext* *outContext); nsresult GetOwner(nsIPluginInstanceOwner **aOwner); diff --git a/dom/plugins/base/nsPluginInstanceOwner.cpp b/dom/plugins/base/nsPluginInstanceOwner.cpp index c566b65e473..0479601da7d 100644 --- a/dom/plugins/base/nsPluginInstanceOwner.cpp +++ b/dom/plugins/base/nsPluginInstanceOwner.cpp @@ -674,11 +674,6 @@ NS_IMETHODIMP nsPluginInstanceOwner::InvalidateRegion(NPRegion invalidRegion) return NS_ERROR_NOT_IMPLEMENTED; } -NS_IMETHODIMP nsPluginInstanceOwner::ForceRedraw() -{ - return NS_OK; -} - NS_IMETHODIMP nsPluginInstanceOwner::GetNetscapeWindow(void *value) { if (!mObjectFrame) {