Index: third_party/WebKit/Source/core/dom/TreeScope.cpp |
diff --git a/third_party/WebKit/Source/core/dom/TreeScope.cpp b/third_party/WebKit/Source/core/dom/TreeScope.cpp |
index 59ea10298501e83b20164658595f8ea69838ba58..6133bf66495a2691dd1bfe9e140c356ae617f93f 100644 |
--- a/third_party/WebKit/Source/core/dom/TreeScope.cpp |
+++ b/third_party/WebKit/Source/core/dom/TreeScope.cpp |
@@ -415,8 +415,10 @@ void TreeScope::adoptIfNeeded(Node& node) |
ASSERT_WITH_SECURITY_IMPLICATION(!node.m_deletionHasBegun); |
#endif |
TreeScopeAdopter adopter(node, *this); |
- if (adopter.needsScopeChange()) |
+ if (adopter.needsScopeChange()) { |
+ ScriptForbiddenScope forbidScript; |
adopter.execute(); |
+ } |
} |
Element* TreeScope::adjustedFocusedElement() const |