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

Unified Diff: third_party/WebKit/Source/core/html/HTMLElement.cpp

Issue 2961643002: Account for null Document Frame when parsing inert attribute (Closed)
Patch Set: Added test Created 3 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 | « third_party/WebKit/LayoutTests/fast/html/crash-template-with-inert-attribute-expected.txt ('k') | 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/html/HTMLElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLElement.cpp b/third_party/WebKit/Source/core/html/HTMLElement.cpp
index a8718a19292e5800fb3f65b46b566fc779f568be..d8608342e0cb4ea450d8bb53c15eb8994ea9b08a 100644
--- a/third_party/WebKit/Source/core/html/HTMLElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLElement.cpp
@@ -467,8 +467,10 @@ void HTMLElement::ParseAttribute(const AttributeModificationParams& params) {
} else if (params.name == inertAttr) {
UseCounter::Count(GetDocument(), WebFeature::kInertAttribute);
UpdateDistribution();
- GetDocument().GetFrame()->SetIsInert(GetDocument().LocalOwner() &&
- GetDocument().LocalOwner()->IsInert());
+ if (GetDocument().GetFrame()) {
+ GetDocument().GetFrame()->SetIsInert(
+ GetDocument().LocalOwner() && GetDocument().LocalOwner()->IsInert());
+ }
} else if (params.name == nonceAttr) {
if (params.new_value != g_empty_atom)
setNonce(params.new_value);
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/html/crash-template-with-inert-attribute-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698