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

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

Issue 2101143005: 0 -> nullptr for UseCounter pointer in CSSParserContext. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Typo Created 4 years, 5 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) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2003, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv ed. 5 * Copyright (C) 2003, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv ed.
6 * Copyright (C) 2009 Rob Buis (rwlbuis@gmail.com) 6 * Copyright (C) 2009 Rob Buis (rwlbuis@gmail.com)
7 * Copyright (C) 2011 Google Inc. All rights reserved. 7 * Copyright (C) 2011 Google Inc. 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 445 matching lines...) Expand 10 before | Expand all | Expand 10 after
456 // While the stylesheet is asynchronously loading, the owner can be moved un der 456 // While the stylesheet is asynchronously loading, the owner can be moved un der
457 // shadow tree. In that case, cancel any processing on the loaded content. 457 // shadow tree. In that case, cancel any processing on the loaded content.
458 if (m_owner->isInShadowTree()) { 458 if (m_owner->isInShadowTree()) {
459 m_loading = false; 459 m_loading = false;
460 removePendingSheet(); 460 removePendingSheet();
461 if (m_sheet) 461 if (m_sheet)
462 clearSheet(); 462 clearSheet();
463 return; 463 return;
464 } 464 }
465 465
466 CSSParserContext parserContext(m_owner->document(), 0, baseURL, charset); 466 CSSParserContext parserContext(m_owner->document(), nullptr, baseURL, charse t);
467 467
468 DEFINE_STATIC_LOCAL(EnumerationHistogram, restoredCachedStyleSheetHistogram, ("Blink.RestoredCachedStyleSheet", 2)); 468 DEFINE_STATIC_LOCAL(EnumerationHistogram, restoredCachedStyleSheetHistogram, ("Blink.RestoredCachedStyleSheet", 2));
469 DEFINE_STATIC_LOCAL(EnumerationHistogram, restoredCachedStyleSheet2Histogram , ("Blink.RestoredCachedStyleSheet2", StyleSheetCacheStatusCount)); 469 DEFINE_STATIC_LOCAL(EnumerationHistogram, restoredCachedStyleSheet2Histogram , ("Blink.RestoredCachedStyleSheet2", StyleSheetCacheStatusCount));
470 470
471 if (StyleSheetContents* restoredSheet = const_cast<CSSStyleSheetResource*>(c achedStyleSheet)->restoreParsedStyleSheet(parserContext)) { 471 if (StyleSheetContents* restoredSheet = const_cast<CSSStyleSheetResource*>(c achedStyleSheet)->restoreParsedStyleSheet(parserContext)) {
472 ASSERT(restoredSheet->isCacheableForResource()); 472 ASSERT(restoredSheet->isCacheableForResource());
473 ASSERT(!restoredSheet->isLoading()); 473 ASSERT(!restoredSheet->isLoading());
474 474
475 if (m_sheet) 475 if (m_sheet)
476 clearSheet(); 476 clearSheet();
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
718 } 718 }
719 719
720 DEFINE_TRACE(LinkStyle) 720 DEFINE_TRACE(LinkStyle)
721 { 721 {
722 visitor->trace(m_sheet); 722 visitor->trace(m_sheet);
723 LinkResource::trace(visitor); 723 LinkResource::trace(visitor);
724 ResourceOwner<StyleSheetResource>::trace(visitor); 724 ResourceOwner<StyleSheetResource>::trace(visitor);
725 } 725 }
726 726
727 } // namespace blink 727 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698