Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(663)

Unified Diff: content/renderer/pepper/pepper_plugin_instance_impl.cc

Issue 69363002: Pepper: Tighten GetLiveModule in PluginRegistry. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/renderer/pepper/pepper_plugin_instance_impl.cc
diff --git a/content/renderer/pepper/pepper_plugin_instance_impl.cc b/content/renderer/pepper/pepper_plugin_instance_impl.cc
index af198b42521ae213c424eb40917736c7f4ce39d2..08e22dc790a401e8b3fa3775319ae2ac2c3861e3 100644
--- a/content/renderer/pepper/pepper_plugin_instance_impl.cc
+++ b/content/renderer/pepper/pepper_plugin_instance_impl.cc
@@ -524,6 +524,7 @@ PepperPluginInstanceImpl::PepperPluginInstanceImpl(
external_document_load_(false),
npp_(new NPP_t),
isolate_(v8::Isolate::GetCurrent()),
+ is_deleted_(false),
view_change_weak_ptr_factory_(this),
weak_factory_(this) {
pp_instance_ = HostGlobals::Get()->AddInstance(this);
@@ -601,6 +602,8 @@ PepperPluginInstanceImpl::~PepperPluginInstanceImpl() {
// returned, then it needs to keep its own reference on the stack.
void PepperPluginInstanceImpl::Delete() {
+ is_deleted_ = true;
+
// Keep a reference on the stack. See NOTE above.
scoped_refptr<PepperPluginInstanceImpl> ref(this);
// Force the MessageChannel to release its "passthrough object" which should
@@ -631,6 +634,10 @@ void PepperPluginInstanceImpl::Delete() {
container_ = NULL;
}
+bool PepperPluginInstanceImpl::is_deleted() const {
+ return is_deleted_;
+}
+
void PepperPluginInstanceImpl::Paint(WebCanvas* canvas,
const gfx::Rect& plugin_rect,
const gfx::Rect& paint_rect) {
« no previous file with comments | « content/renderer/pepper/pepper_plugin_instance_impl.h ('k') | content/renderer/pepper/pepper_plugin_registry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698