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

Unified Diff: content/renderer/pepper/pepper_try_catch.h

Issue 596523002: Make PepperTryCatch hold a reference on PepperPluginInstanceImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 months 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/pepper/pepper_try_catch.h
diff --git a/content/renderer/pepper/pepper_try_catch.h b/content/renderer/pepper/pepper_try_catch.h
index dba90aa780a8be427c47900f42ab5af304a4e9a3..f562023ef2b06172a813865accc032ed3df56431 100644
--- a/content/renderer/pepper/pepper_try_catch.h
+++ b/content/renderer/pepper/pepper_try_catch.h
@@ -34,7 +34,14 @@ class CONTENT_EXPORT PepperTryCatch {
ppapi::ScopedPPVar FromV8(v8::Handle<v8::Value> v8_value);
protected:
- PepperPluginInstanceImpl* instance_;
+ // Make sure that |instance_| is alive for the lifetime of PepperTryCatch.
+ // PepperTryCatch is used mostly in Pepper scripting code, where it can be
+ // possible to enter JavaScript synchronously which can cause the plugin to
+ // be deleted.
+ //
+ // Note that PepperTryCatch objects should only ever be on the stack, so this
+ // shouldn't keep the instance around for too long.
bbudge 2014/09/22 19:38:50 Maybe a note on the constructor?
+ scoped_refptr<PepperPluginInstanceImpl> instance_;
// Whether To/FromV8 should convert object vars. If set to
// kDisallowObjectVars, an exception should be set if they are encountered
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698