Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1716)

Unified Diff: content/renderer/pepper/pepper_plugin_instance_impl.cc

Issue 408813004: PPAPI: Check for NULL before calling WebBindings::evaluate (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698