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

Side by Side Diff: ppapi/proxy/plugin_dispatcher.cc

Issue 9655019: Fix a crash related to PPAPI scripting. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix constructor init list order. Created 8 years, 9 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ppapi/proxy/plugin_dispatcher.h" 5 #include "ppapi/proxy/plugin_dispatcher.h"
6 6
7 #include <map> 7 #include <map>
8 8
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 static_cast<int32_t>(PP_ERROR_ABORTED)); 58 static_cast<int32_t>(PP_ERROR_ABORTED));
59 } 59 }
60 } 60 }
61 61
62 PluginDispatcher::PluginDispatcher(base::ProcessHandle remote_process_handle, 62 PluginDispatcher::PluginDispatcher(base::ProcessHandle remote_process_handle,
63 GetInterfaceFunc get_interface) 63 GetInterfaceFunc get_interface)
64 : Dispatcher(remote_process_handle, get_interface), 64 : Dispatcher(remote_process_handle, get_interface),
65 plugin_delegate_(NULL), 65 plugin_delegate_(NULL),
66 received_preferences_(false), 66 received_preferences_(false),
67 plugin_dispatcher_id_(0) { 67 plugin_dispatcher_id_(0) {
68 SetSerializationRules(new PluginVarSerializationRules); 68 SetSerializationRules(new PluginVarSerializationRules(AsWeakPtr()));
69 69
70 if (!g_live_dispatchers) 70 if (!g_live_dispatchers)
71 g_live_dispatchers = new DispatcherSet; 71 g_live_dispatchers = new DispatcherSet;
72 g_live_dispatchers->insert(this); 72 g_live_dispatchers->insert(this);
73 } 73 }
74 74
75 PluginDispatcher::~PluginDispatcher() { 75 PluginDispatcher::~PluginDispatcher() {
76 if (plugin_delegate_) 76 if (plugin_delegate_)
77 plugin_delegate_->Unregister(plugin_dispatcher_id_); 77 plugin_delegate_->Unregister(plugin_dispatcher_id_);
78 78
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 // once they're set. The user will have to restart to get new font prefs 288 // once they're set. The user will have to restart to get new font prefs
289 // propogated to plugins. 289 // propogated to plugins.
290 if (!received_preferences_) { 290 if (!received_preferences_) {
291 received_preferences_ = true; 291 received_preferences_ = true;
292 preferences_ = prefs; 292 preferences_ = prefs;
293 } 293 }
294 } 294 }
295 295
296 } // namespace proxy 296 } // namespace proxy
297 } // namespace ppapi 297 } // namespace ppapi
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698