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

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

Issue 6864020: linux: don't always print dlopen errors from LoadNativeLibrary (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/process_util.h" 9 #include "base/process_util.h"
10 #include "base/rand_util.h" 10 #include "base/rand_util.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 63
64 base::WaitableEvent* PpapiThread::GetShutdownEvent() { 64 base::WaitableEvent* PpapiThread::GetShutdownEvent() {
65 return ChildProcess::current()->GetShutDownEvent(); 65 return ChildProcess::current()->GetShutDownEvent();
66 } 66 }
67 67
68 std::set<PP_Instance>* PpapiThread::GetGloballySeenInstanceIDSet() { 68 std::set<PP_Instance>* PpapiThread::GetGloballySeenInstanceIDSet() {
69 return &globally_seen_instance_ids_; 69 return &globally_seen_instance_ids_;
70 } 70 }
71 71
72 void PpapiThread::OnMsgLoadPlugin(const FilePath& path) { 72 void PpapiThread::OnMsgLoadPlugin(const FilePath& path) {
73 base::ScopedNativeLibrary library(base::LoadNativeLibrary(path)); 73 base::ScopedNativeLibrary library(base::LoadNativeLibrary(path, NULL));
74 if (!library.is_valid()) 74 if (!library.is_valid())
75 return; 75 return;
76 76
77 if (is_broker_) { 77 if (is_broker_) {
78 // Get the InitializeBroker function (required). 78 // Get the InitializeBroker function (required).
79 InitializeBrokerFunc init_broker = 79 InitializeBrokerFunc init_broker =
80 reinterpret_cast<InitializeBrokerFunc>( 80 reinterpret_cast<InitializeBrokerFunc>(
81 library.GetFunctionPointer("PPP_InitializeBroker")); 81 library.GetFunctionPointer("PPP_InitializeBroker"));
82 if (!init_broker) { 82 if (!init_broker) {
83 LOG(WARNING) << "No PPP_InitializeBroker in plugin library"; 83 LOG(WARNING) << "No PPP_InitializeBroker in plugin library";
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 #if defined(OS_POSIX) 159 #if defined(OS_POSIX)
160 // On POSIX, pass the renderer-side FD. 160 // On POSIX, pass the renderer-side FD.
161 handle->socket = base::FileDescriptor(::dup(dispatcher->GetRendererFD()), 161 handle->socket = base::FileDescriptor(::dup(dispatcher->GetRendererFD()),
162 true); 162 true);
163 #endif 163 #endif
164 164
165 // From here, the dispatcher will manage its own lifetime according to the 165 // From here, the dispatcher will manage its own lifetime according to the
166 // lifetime of the attached channel. 166 // lifetime of the attached channel.
167 return true; 167 return true;
168 } 168 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698