summaryrefslogtreecommitdiffstats
path: root/remoting/client/plugin
diff options
context:
space:
mode:
authordmaclach@chromium.org <dmaclach@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-04 14:48:30 +0000
committerdmaclach@chromium.org <dmaclach@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-04 14:48:30 +0000
commitc52d1593936f3d84dca0c470002397190263bfe1 (patch)
treef33dbd6b6bfd2d109bc9a05cdf10b27fcc9a056f /remoting/client/plugin
parent001e6018c6d04eb687987eb4d2c3d5c28047a2c0 (diff)
downloadchromium_src-c52d1593936f3d84dca0c470002397190263bfe1.zip
chromium_src-c52d1593936f3d84dca0c470002397190263bfe1.tar.gz
chromium_src-c52d1593936f3d84dca0c470002397190263bfe1.tar.bz2
Future proof against things like http://crbug.com/91521
BUG=91521 TEST=Remove ffmpegsumo.so from a mac chrome build and attempt to use it as a client in a chromoting session. Check your logs. You should see Media library not initialized. Also, plugin shouldn't crash. Review URL: http://codereview.chromium.org/7562016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@95414 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/client/plugin')
-rw-r--r--remoting/client/plugin/chromoting_instance.cc12
1 files changed, 11 insertions, 1 deletions
diff --git a/remoting/client/plugin/chromoting_instance.cc b/remoting/client/plugin/chromoting_instance.cc
index 6fabb24..6a5e1bb 100644
--- a/remoting/client/plugin/chromoting_instance.cc
+++ b/remoting/client/plugin/chromoting_instance.cc
@@ -21,6 +21,7 @@
// crbug.com/74951
#include "content/renderer/p2p/ipc_network_manager.h"
#include "content/renderer/p2p/ipc_socket_factory.h"
+#include "media/base/media.h"
#include "ppapi/c/dev/ppb_query_policy_dev.h"
#include "ppapi/cpp/completion_callback.h"
#include "ppapi/cpp/input_event.h"
@@ -121,7 +122,9 @@ ChromotingInstance::~ChromotingInstance() {
// before we can call Detach() on |view_proxy_|.
context_.Stop();
- view_proxy_->Detach();
+ if (view_proxy_.get()) {
+ view_proxy_->Detach();
+ }
}
bool ChromotingInstance::Init(uint32_t argc,
@@ -132,6 +135,13 @@ bool ChromotingInstance::Init(uint32_t argc,
VLOG(1) << "Started ChromotingInstance::Init";
+ // Check to make sure the media library is initialized.
+ // http://crbug.com/91521.
+ if (!media::IsMediaLibraryInitialized()) {
+ logger_.Log(logging::LOG_ERROR, "Media library not initialized.");
+ return false;
+ }
+
// Start all the threads.
context_.Start();