Chromium Code Reviews| 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; |