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

Unified Diff: webkit/glue/webplugin_impl.cc

Issue 75026: Ensure we check the page pointer before using it after we come out of NPP_Han... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 8 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
Index: webkit/glue/webplugin_impl.cc
===================================================================
--- webkit/glue/webplugin_impl.cc (revision 13823)
+++ webkit/glue/webplugin_impl.cc (working copy)
@@ -863,9 +863,12 @@
if (!delegate_->HandleEvent(&np_event, &cursor))
event->setDefaultHandled();
+ WebCore::Page* page = parent_view->frame()->page();
+ if (!page)
+ return;
+
ChromeClientImpl* chrome_client =
- static_cast<ChromeClientImpl*>(
- parent_view->frame()->page()->chrome()->client());
+ static_cast<ChromeClientImpl*>(page->chrome()->client());
// A windowless plugin can change the cursor in response to the WM_MOUSEMOVE
// event. We need to reflect the changed cursor in the frame view as the

Powered by Google App Engine
This is Rietveld 408576698