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

Unified Diff: third_party/WebKit/Source/core/dom/Document.cpp

Issue 1693003002: Fix pepper crash when reattaching plugins in style recalc (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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: third_party/WebKit/Source/core/dom/Document.cpp
diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKit/Source/core/dom/Document.cpp
index 8fef529d996e416d456b2efc891fcbca9a0a3156..66fc156b7f66e420f960ecb4d70a6e684bef7482 100644
--- a/third_party/WebKit/Source/core/dom/Document.cpp
+++ b/third_party/WebKit/Source/core/dom/Document.cpp
@@ -1729,6 +1729,10 @@ void Document::updateLayoutTree(StyleRecalcChange change)
ASSERT(isMainThread());
ScriptForbiddenScope forbidScript;
+ // We should forbid script execution for plugins here because update while layout is changing,
+ // HTMLPlugin element can be reattached and plugin can be destroyed. Plugin can execute scripts
+ // on destroy. It produces crash without PluginScriptForbiddenScope: crbug.com/550427.
+ PluginScriptForbiddenScope pluginForbidScript;
dcheng 2016/02/12 20:09:12 Note that the reason this works is because some pa
pfeldman 2016/02/17 01:20:31 How would /core contributor know when to use Scrip
esprehn 2016/02/18 02:17:30 PluginScriptForbidden is poorly named, it's more l
if (!view() || !isActive())
return;
« 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