Chromium Code Reviews| 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 98ca698ed56415c5ab34ced2dbebc7737345efd6..2c6ad552d74bd85211e68562ab5b3832702cde53 100644 |
| --- a/content/renderer/pepper/pepper_plugin_instance_impl.cc |
| +++ b/content/renderer/pepper/pepper_plugin_instance_impl.cc |
| @@ -673,12 +673,17 @@ void PepperPluginInstanceImpl::MessageChannelDestroyed() { |
| } |
| v8::Local<v8::Context> PepperPluginInstanceImpl::GetContext() { |
|
dmichael (off chromium)
2014/09/23 16:16:54
Maybe we should rename this to "GetMainWorldContex
raymes
2014/09/24 00:19:45
Done.
|
| - if (!container_ || |
| - container_->element().isNull() || |
| - container_->element().document().isNull() || |
| - !container_->element().document().frame()) { |
| + if (!container_) |
| + return v8::Handle<v8::Context>(); |
| + |
| + if (container_->element().isNull()) |
| + return v8::Handle<v8::Context>(); |
| + |
| + if (container_->element().document().isNull()) |
| + return v8::Handle<v8::Context>(); |
| + |
| + if (!container_->element().document().frame()) |
| return v8::Handle<v8::Context>(); |
| - } |
| v8::Local<v8::Context> context = |
| container_->element().document().frame()->mainWorldScriptContext(); |