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

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

Issue 1472243004: Clear link element sheet before clearing ownerNode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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/link-clear-sheet-crash-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/HTMLLinkElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLLinkElement.cpp b/third_party/WebKit/Source/core/html/HTMLLinkElement.cpp
index 76eab4db3eb10457c4ccf62d55d2619df58f40d2..de1820350a49ab06fdea78e686582ae2c0c5bf8b 100644
--- a/third_party/WebKit/Source/core/html/HTMLLinkElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLLinkElement.cpp
@@ -603,8 +603,7 @@ void LinkStyle::clearSheet()
{
ASSERT(m_sheet);
ASSERT(m_sheet->ownerNode() == m_owner);
- m_sheet->clearOwnerNode();
- m_sheet = nullptr;
+ m_sheet.release()->clearOwnerNode();
}
bool LinkStyle::styleSheetIsLoading() const
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/html/link-clear-sheet-crash-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698