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

Side by Side Diff: webkit/glue/plugins/webplugin_delegate_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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "webkit/glue/plugins/webplugin_delegate_impl.h" 5 #include "webkit/glue/plugins/webplugin_delegate_impl.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 213
214 if (!windowless_) 214 if (!windowless_)
215 WindowedDestroyWindow(); 215 WindowedDestroyWindow();
216 216
217 if (handle_event_pump_messages_event_) { 217 if (handle_event_pump_messages_event_) {
218 CloseHandle(handle_event_pump_messages_event_); 218 CloseHandle(handle_event_pump_messages_event_);
219 } 219 }
220 } 220 }
221 221
222 void WebPluginDelegateImpl::PluginDestroyed() { 222 void WebPluginDelegateImpl::PluginDestroyed() {
223 delete this; 223 if (handle_event_depth_) {
ananta 2009/04/16 16:37:24 Would we run into the same issue with windowed plu
jam 2009/04/16 17:56:13 no since only windowless plugins would use HandleE
224 MessageLoop::current()->DeleteSoon(FROM_HERE, this);
225 } else {
226 delete this;
227 }
224 } 228 }
225 229
226 bool WebPluginDelegateImpl::Initialize(const GURL& url, 230 bool WebPluginDelegateImpl::Initialize(const GURL& url,
227 char** argn, 231 char** argn,
228 char** argv, 232 char** argv,
229 int argc, 233 int argc,
230 WebPlugin* plugin, 234 WebPlugin* plugin,
231 bool load_manually) { 235 bool load_manually) {
232 plugin_ = plugin; 236 plugin_ = plugin;
233 237
(...skipping 955 matching lines...) Expand 10 before | Expand all | Expand 10 after
1189 1193
1190 // It is ok to pass NULL here to GetCursor as we are not looking for cursor 1194 // It is ok to pass NULL here to GetCursor as we are not looking for cursor
1191 // types defined by Webkit. 1195 // types defined by Webkit.
1192 HCURSOR previous_cursor = 1196 HCURSOR previous_cursor =
1193 g_current_plugin_instance->current_windowless_cursor_.GetCursor(NULL); 1197 g_current_plugin_instance->current_windowless_cursor_.GetCursor(NULL);
1194 1198
1195 g_current_plugin_instance->current_windowless_cursor_.InitFromExternalCursor( 1199 g_current_plugin_instance->current_windowless_cursor_.InitFromExternalCursor(
1196 cursor); 1200 cursor);
1197 return previous_cursor; 1201 return previous_cursor;
1198 } 1202 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698