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

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

Issue 1172143004: Block scripting in plugin teardown during Document unload. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Restrict the legacy PP_Var too Created 5 years, 6 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 | « content/renderer/pepper/pepper_plugin_instance_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/pepper/ppb_var_deprecated_impl.cc
diff --git a/content/renderer/pepper/ppb_var_deprecated_impl.cc b/content/renderer/pepper/ppb_var_deprecated_impl.cc
index 4188ee6e3d4d4214c101cc4f414f172e6bc8e8f7..dd2c80bbe839235f53f32e0f88e97ba16e59e1a9 100644
--- a/content/renderer/pepper/ppb_var_deprecated_impl.cc
+++ b/content/renderer/pepper/ppb_var_deprecated_impl.cc
@@ -20,6 +20,7 @@
#include "third_party/WebKit/public/web/WebElement.h"
#include "third_party/WebKit/public/web/WebLocalFrame.h"
#include "third_party/WebKit/public/web/WebPluginContainer.h"
+#include "third_party/WebKit/public/web/WebPluginScriptForbiddenScope.h"
#include "third_party/WebKit/public/web/WebScopedUserGesture.h"
using ppapi::V8ObjectVar;
@@ -56,7 +57,8 @@ class ObjectAccessor {
if (exception && exception->type != PP_VARTYPE_UNDEFINED)
return false;
if (instance_)
- return true;
+ return !instance_->is_deleted() ||
+ !blink::WebPluginScriptForbiddenScope::isForbidden();
if (exception)
*exception = ppapi::StringVar::StringToPPVar(kInvalidObjectException);
return false;
« no previous file with comments | « content/renderer/pepper/pepper_plugin_instance_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698