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

Side by Side Diff: third_party/WebKit/Source/core/css/CSSDefaultStyleSheets.cpp

Issue 1491253004: Release Oilpan heap singletons prior to LSan leak detection. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: renamings + switch to using LEAK_SANITIZER_DISABLED_SCOPE Created 5 years 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) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) 3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com)
4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) 4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com)
5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All r ights reserved. 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All r ights reserved.
6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> 7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org>
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. 9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved.
10 * Copyright (C) Research In Motion Limited 2011. All rights reserved. 10 * Copyright (C) Research In Motion Limited 2011. All rights reserved.
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 DEFINE_STATIC_LOCAL(const MediaQueryEvaluator, staticPrintEval, ("print")); 61 DEFINE_STATIC_LOCAL(const MediaQueryEvaluator, staticPrintEval, ("print"));
62 return staticPrintEval; 62 return staticPrintEval;
63 } 63 }
64 64
65 static PassRefPtrWillBeRawPtr<StyleSheetContents> parseUASheet(const String& str ) 65 static PassRefPtrWillBeRawPtr<StyleSheetContents> parseUASheet(const String& str )
66 { 66 {
67 RefPtrWillBeRawPtr<StyleSheetContents> sheet = StyleSheetContents::create(CS SParserContext(UASheetMode, 0)); 67 RefPtrWillBeRawPtr<StyleSheetContents> sheet = StyleSheetContents::create(CS SParserContext(UASheetMode, 0));
68 sheet->parseString(str); 68 sheet->parseString(str);
69 // User Agent stylesheets are parsed once for the lifetime of the renderer 69 // User Agent stylesheets are parsed once for the lifetime of the renderer
70 // process and are intentionally leaked. 70 // process and are intentionally leaked.
71 WTF_ANNOTATE_LEAKING_OBJECT_PTR(sheet.get()); 71 LEAK_SANITIZER_IGNORE_OBJECT(sheet.get());
haraken 2015/12/07 14:46:10 This is the only use case of WTF_ANNOTATE_LEAKING_
sof 2015/12/07 15:09:28 It is also used by Persistent*::registerAsStaticRe
sof 2015/12/07 16:59:16 Ah, this is just right as it is. The StyleSheetCon
72 return sheet.release(); 72 return sheet.release();
73 } 73 }
74 74
75 CSSDefaultStyleSheets::CSSDefaultStyleSheets() 75 CSSDefaultStyleSheets::CSSDefaultStyleSheets()
76 : m_defaultStyle(nullptr) 76 : m_defaultStyle(nullptr)
77 , m_defaultMobileViewportStyle(nullptr) 77 , m_defaultMobileViewportStyle(nullptr)
78 , m_defaultQuirksStyle(nullptr) 78 , m_defaultQuirksStyle(nullptr)
79 , m_defaultPrintStyle(nullptr) 79 , m_defaultPrintStyle(nullptr)
80 , m_defaultViewSourceStyle(nullptr) 80 , m_defaultViewSourceStyle(nullptr)
81 , m_defaultXHTMLMobileProfileStyle(nullptr) 81 , m_defaultXHTMLMobileProfileStyle(nullptr)
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 visitor->trace(m_defaultStyleSheet); 191 visitor->trace(m_defaultStyleSheet);
192 visitor->trace(m_mobileViewportStyleSheet); 192 visitor->trace(m_mobileViewportStyleSheet);
193 visitor->trace(m_quirksStyleSheet); 193 visitor->trace(m_quirksStyleSheet);
194 visitor->trace(m_svgStyleSheet); 194 visitor->trace(m_svgStyleSheet);
195 visitor->trace(m_mathmlStyleSheet); 195 visitor->trace(m_mathmlStyleSheet);
196 visitor->trace(m_mediaControlsStyleSheet); 196 visitor->trace(m_mediaControlsStyleSheet);
197 visitor->trace(m_fullscreenStyleSheet); 197 visitor->trace(m_fullscreenStyleSheet);
198 } 198 }
199 199
200 } // namespace blink 200 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698