summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordmaclach@chromium.org <dmaclach@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-04 15:49:13 +0000
committerdmaclach@chromium.org <dmaclach@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-04 15:49:13 +0000
commitee571721e4d3140d1b508e26deeac3a5dd9ebbca (patch)
tree3e668922da42395951cefc91d64e7bb5e92314bc
parentad01dce76ee653ef93da27c42f3f7a1bb8603b17 (diff)
downloadchromium_src-ee571721e4d3140d1b508e26deeac3a5dd9ebbca.zip
chromium_src-ee571721e4d3140d1b508e26deeac3a5dd9ebbca.tar.gz
chromium_src-ee571721e4d3140d1b508e26deeac3a5dd9ebbca.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. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=95414 Review URL: http://codereview.chromium.org/7562016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@95421 0039d316-1c4b-4281-b951-d872f2087c98
-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..7429b4f 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()) {
+ LOG(ERROR) << "Media library not initialized.";
+ return false;
+ }
+
// Start all the threads.
context_.Start();