Index: chrome/renderer/extensions/bindings_utils.h |
diff --git a/chrome/renderer/extensions/bindings_utils.h b/chrome/renderer/extensions/bindings_utils.h |
index 5318da95b88f930e57c0ec485e68ac6d4cb50f80..9f92184b1e24c923a8ea3fa11ab88ba0a5c84f05 100644 |
--- a/chrome/renderer/extensions/bindings_utils.h |
+++ b/chrome/renderer/extensions/bindings_utils.h |
@@ -30,14 +30,22 @@ struct ContextInfo { |
WebKit::WebFrame* frame); |
~ContextInfo(); |
+ // Returns the web frame associated with this context. Can also return NULL if |
+ // the context has been disassociated with the frame, and not GC'd yet. |
+ WebKit::WebFrame* GetWebFrame() const; |
+ |
+ // Returns the RenderView associated wit hthis context. Can also return NULL. |
+ RenderView* GetRenderView() const; |
+ |
v8::Persistent<v8::Context> context; |
// The extension ID this context is associated with. |
std::string extension_id; |
// The frame the context is associated with. ContextInfo can outlive its |
- // frame, so this should not be dereferenced. It is stored only for use for |
- // comparison. |
+ // frame, so this should not be dereferenced. Use GetWebFrame() instead for |
+ // most cases. This is used for comparisons during unload when GetWebFrame() |
+ // doesn't work. |
void* unsafe_frame; |
// A count of the number of events that are listening in this context. When |