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

Side by Side Diff: content/ppapi_plugin/ppapi_thread.cc

Issue 12793004: [Mac] Do not unload base::NativeLibary-ies if they contain ObjC segments. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: The never ending review! Created 7 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
« base/native_library_mac.mm ('K') | « base/native_library_mac.mm ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "content/ppapi_plugin/ppapi_thread.h" 5 #include "content/ppapi_plugin/ppapi_thread.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 AddRoute(ppapi::API_ID_PPB_NETWORKMANAGER_PRIVATE, 110 AddRoute(ppapi::API_ID_PPB_NETWORKMANAGER_PRIVATE,
111 &dispatcher_message_listener_); 111 &dispatcher_message_listener_);
112 } 112 }
113 113
114 PpapiThread::~PpapiThread() { 114 PpapiThread::~PpapiThread() {
115 ppapi::proxy::PluginGlobals::Get()->set_plugin_proxy_delegate(NULL); 115 ppapi::proxy::PluginGlobals::Get()->set_plugin_proxy_delegate(NULL);
116 if (plugin_entry_points_.shutdown_module) 116 if (plugin_entry_points_.shutdown_module)
117 plugin_entry_points_.shutdown_module(); 117 plugin_entry_points_.shutdown_module();
118 WebKit::shutdown(); 118 WebKit::shutdown();
119 119
120 #if defined(OS_MACOSX)
121 // TODO(shess): <http://crbug.com/172319> is about how modules
122 // cannot be unloaded when Objective-C is involved. interaction
123 // between the Objective-C runtime and module unloading. Leaking
124 // the module here to work around this, a later CL should autodetect
125 // the problem and leak in NativeLibrary.
126 if (is_broker_)
127 library_.Release();
128 #endif
129
130 #if defined(OS_WIN) 120 #if defined(OS_WIN)
131 if (permissions_.HasPermission(ppapi::PERMISSION_FLASH)) 121 if (permissions_.HasPermission(ppapi::PERMISSION_FLASH))
132 base::win::SetShouldCrashOnProcessDetach(false); 122 base::win::SetShouldCrashOnProcessDetach(false);
133 #endif 123 #endif
134 } 124 }
135 125
136 bool PpapiThread::Send(IPC::Message* msg) { 126 bool PpapiThread::Send(IPC::Message* msg) {
137 // Allow access from multiple threads. 127 // Allow access from multiple threads.
138 if (MessageLoop::current() == message_loop()) 128 if (MessageLoop::current() == message_loop())
139 return ChildThread::Send(msg); 129 return ChildThread::Send(msg);
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
466 456
467 // plugin() is NULL when in-process. Which is fine, because this is 457 // plugin() is NULL when in-process. Which is fine, because this is
468 // just a hook for setting the process name. 458 // just a hook for setting the process name.
469 if (GetContentClient()->plugin()) { 459 if (GetContentClient()->plugin()) {
470 GetContentClient()->plugin()->PluginProcessStarted( 460 GetContentClient()->plugin()->PluginProcessStarted(
471 path.BaseName().RemoveExtension().LossyDisplayName()); 461 path.BaseName().RemoveExtension().LossyDisplayName());
472 } 462 }
473 } 463 }
474 464
475 } // namespace content 465 } // namespace content
OLDNEW
« base/native_library_mac.mm ('K') | « base/native_library_mac.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698