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

Unified Diff: chrome/renderer/extensions/bindings_utils.h

Issue 7717019: Do not dereference potentially invalid frame pointer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cleanup the hate Created 9 years, 4 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 | chrome/renderer/extensions/bindings_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/extensions/bindings_utils.h
diff --git a/chrome/renderer/extensions/bindings_utils.h b/chrome/renderer/extensions/bindings_utils.h
index 1246a1afc2b0aca4dc454217d2d949480dae1c13..c9b2422999de8407c26a0fc9a2c8059d8f5f39b0 100644
--- a/chrome/renderer/extensions/bindings_utils.h
+++ b/chrome/renderer/extensions/bindings_utils.h
@@ -91,10 +91,10 @@ struct ContextInfo {
// The extension ID this context is associated with.
std::string extension_id;
- // The frame the context is associated with. We can't always get this from
- // WebFrame::frameForContext() (in particular as the the frame is navigating
- // or being destroyed).
- WebKit::WebFrame* frame;
+ // 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.
+ void* unsafe_frame;
// A count of the number of events that are listening in this context. When
// this is zero, |context| will be a weak handle.
« no previous file with comments | « no previous file | chrome/renderer/extensions/bindings_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698