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

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLIFrameElement.cpp

Issue 2191443002: Ensure the permissions DOMTokenList is initialized before access (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Simon Hausmann (hausmann@kde.org) 4 * (C) 2000 Simon Hausmann (hausmann@kde.org)
5 * (C) 2001 Dirk Mueller (mueller@kde.org) 5 * (C) 2001 Dirk Mueller (mueller@kde.org)
6 * Copyright (C) 2004, 2006, 2008, 2009 Apple Inc. All rights reserved. 6 * Copyright (C) 2004, 2006, 2008, 2009 Apple Inc. All rights reserved.
7 * Copyright (C) 2009 Ericsson AB. All rights reserved. 7 * Copyright (C) 2009 Ericsson AB. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 54
55 HTMLIFrameElement::~HTMLIFrameElement() 55 HTMLIFrameElement::~HTMLIFrameElement()
56 { 56 {
57 } 57 }
58 58
59 DOMTokenList* HTMLIFrameElement::sandbox() const 59 DOMTokenList* HTMLIFrameElement::sandbox() const
60 { 60 {
61 return m_sandbox.get(); 61 return m_sandbox.get();
62 } 62 }
63 63
64 DOMTokenList* HTMLIFrameElement::permissions() const 64 DOMTokenList* HTMLIFrameElement::permissions()
65 { 65 {
66 if (!initializePermissionsAttribute())
esprehn 2016/07/27 06:05:56 How can this fail? Does the spec say it can be nul
raymes 2016/07/27 06:13:45 Sorry my description was inaccurate. It doesn't ac
67 return nullptr;
66 return m_permissions.get(); 68 return m_permissions.get();
67 } 69 }
68 70
69 bool HTMLIFrameElement::isPresentationAttribute(const QualifiedName& name) const 71 bool HTMLIFrameElement::isPresentationAttribute(const QualifiedName& name) const
70 { 72 {
71 if (name == widthAttr || name == heightAttr || name == alignAttr || name == frameborderAttr) 73 if (name == widthAttr || name == heightAttr || name == alignAttr || name == frameborderAttr)
72 return true; 74 return true;
73 return HTMLFrameElementBase::isPresentationAttribute(name); 75 return HTMLFrameElementBase::isPresentationAttribute(name);
74 } 76 }
75 77
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 { 188 {
187 if (!RuntimeEnabledFeatures::permissionDelegationEnabled()) 189 if (!RuntimeEnabledFeatures::permissionDelegationEnabled())
188 return false; 190 return false;
189 191
190 if (!m_permissions) 192 if (!m_permissions)
191 m_permissions = HTMLIFrameElementPermissions::create(this); 193 m_permissions = HTMLIFrameElementPermissions::create(this);
192 return true; 194 return true;
193 } 195 }
194 196
195 } // namespace blink 197 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698