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 a1116811924e0ad9789ef791752b8a1de7341d0c..c30e409bc0dbf4cfb6b2d873bc23bc97a73943ec 100644 |
--- a/content/renderer/pepper/pepper_plugin_instance_impl.cc |
+++ b/content/renderer/pepper/pepper_plugin_instance_impl.cc |
@@ -2384,8 +2384,10 @@ PP_Var PepperPluginInstanceImpl::ExecuteScript(PP_Instance instance, |
np_script.UTF8Length = script_string->value().length(); |
// Get the current frame to pass to the evaluate function. |
- WebLocalFrame* frame = container_->element().document().frame(); |
- if (!frame) { |
+ WebLocalFrame* frame = NULL; |
+ if (container_) |
+ frame = container_->element().document().frame(); |
+ if (!frame || !frame->windowObject()) { |
try_catch.SetException("No frame to execute script in."); |
teravest
2014/07/21 19:38:04
This error message doesn't seem correct anymore. I
dmichael (off chromium)
2014/07/21 19:57:47
"improved"
|
return PP_MakeUndefined(); |
} |