| Index: content/renderer/pepper/pepper_plugin_instance_impl.cc
|
| diff --git a/content/renderer/pepper/pepper_plugin_instance_impl.cc b/content/renderer/pepper/pepper_plugin_instance_impl.cc
|
| index c3570db42530fddb2517cfbe5d2f89823cd790f6..b10aa3cfbf96468de8bd7d24244edf8eb121ba65 100644
|
| --- a/content/renderer/pepper/pepper_plugin_instance_impl.cc
|
| +++ b/content/renderer/pepper/pepper_plugin_instance_impl.cc
|
| @@ -673,13 +673,15 @@ void PepperPluginInstanceImpl::MessageChannelDestroyed() {
|
| }
|
|
|
| v8::Local<v8::Context> PepperPluginInstanceImpl::GetContext() {
|
| - if (!container_)
|
| - return v8::Handle<v8::Context>();
|
| - WebLocalFrame* frame = container_->element().document().frame();
|
| - if (!frame)
|
| + if (!container_ ||
|
| + container_->element().isNull() ||
|
| + container_->element().document().isNull() ||
|
| + !container_->element().document().frame()) {
|
| return v8::Handle<v8::Context>();
|
| + }
|
|
|
| - v8::Local<v8::Context> context = frame->mainWorldScriptContext();
|
| + v8::Local<v8::Context> context =
|
| + container_->element().document().frame()->mainWorldScriptContext();
|
| DCHECK(context->GetIsolate() == isolate_);
|
| return context;
|
| }
|
|
|