Commit ee571721 authored by dmaclach@chromium.org's avatar dmaclach@chromium.org

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
parent ad01dce7
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
// crbug.com/74951 // crbug.com/74951
#include "content/renderer/p2p/ipc_network_manager.h" #include "content/renderer/p2p/ipc_network_manager.h"
#include "content/renderer/p2p/ipc_socket_factory.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/c/dev/ppb_query_policy_dev.h"
#include "ppapi/cpp/completion_callback.h" #include "ppapi/cpp/completion_callback.h"
#include "ppapi/cpp/input_event.h" #include "ppapi/cpp/input_event.h"
...@@ -121,7 +122,9 @@ ChromotingInstance::~ChromotingInstance() { ...@@ -121,7 +122,9 @@ ChromotingInstance::~ChromotingInstance() {
// before we can call Detach() on |view_proxy_|. // before we can call Detach() on |view_proxy_|.
context_.Stop(); context_.Stop();
view_proxy_->Detach(); if (view_proxy_.get()) {
view_proxy_->Detach();
}
} }
bool ChromotingInstance::Init(uint32_t argc, bool ChromotingInstance::Init(uint32_t argc,
...@@ -132,6 +135,13 @@ bool ChromotingInstance::Init(uint32_t argc, ...@@ -132,6 +135,13 @@ bool ChromotingInstance::Init(uint32_t argc,
VLOG(1) << "Started ChromotingInstance::Init"; 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. // Start all the threads.
context_.Start(); context_.Start();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment