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

Side by Side Diff: third_party/WebKit/Source/core/dom/TreeScope.cpp

Issue 2727843003: Replace RELEASE_ASSERT with CHECK in core/{dom,editing,html} (Closed)
Patch Set: Add a comment Created 3 years, 9 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) 2011 Google Inc. All Rights Reserved. 2 * Copyright (C) 2011 Google Inc. All Rights Reserved.
3 * Copyright (C) 2012 Apple Inc. All rights reserved. 3 * Copyright (C) 2012 Apple Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 100
101 void TreeScope::setParentTreeScope(TreeScope& newParentScope) { 101 void TreeScope::setParentTreeScope(TreeScope& newParentScope) {
102 // A document node cannot be re-parented. 102 // A document node cannot be re-parented.
103 DCHECK(!rootNode().isDocumentNode()); 103 DCHECK(!rootNode().isDocumentNode());
104 104
105 m_parentTreeScope = &newParentScope; 105 m_parentTreeScope = &newParentScope;
106 setDocument(newParentScope.document()); 106 setDocument(newParentScope.document());
107 } 107 }
108 108
109 ScopedStyleResolver& TreeScope::ensureScopedStyleResolver() { 109 ScopedStyleResolver& TreeScope::ensureScopedStyleResolver() {
110 RELEASE_ASSERT(this); 110 CHECK(this);
111 if (!m_scopedStyleResolver) 111 if (!m_scopedStyleResolver)
112 m_scopedStyleResolver = ScopedStyleResolver::create(*this); 112 m_scopedStyleResolver = ScopedStyleResolver::create(*this);
113 return *m_scopedStyleResolver; 113 return *m_scopedStyleResolver;
114 } 114 }
115 115
116 void TreeScope::clearScopedStyleResolver() { 116 void TreeScope::clearScopedStyleResolver() {
117 m_scopedStyleResolver.clear(); 117 m_scopedStyleResolver.clear();
118 } 118 }
119 119
120 Element* TreeScope::getElementById(const AtomicString& elementId) const { 120 Element* TreeScope::getElementById(const AtomicString& elementId) const {
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after
533 visitor->trace(m_idTargetObserverRegistry); 533 visitor->trace(m_idTargetObserverRegistry);
534 visitor->trace(m_selection); 534 visitor->trace(m_selection);
535 visitor->trace(m_elementsById); 535 visitor->trace(m_elementsById);
536 visitor->trace(m_imageMapsByName); 536 visitor->trace(m_imageMapsByName);
537 visitor->trace(m_scopedStyleResolver); 537 visitor->trace(m_scopedStyleResolver);
538 visitor->trace(m_radioButtonGroupScope); 538 visitor->trace(m_radioButtonGroupScope);
539 visitor->trace(m_svgTreeScopedResources); 539 visitor->trace(m_svgTreeScopedResources);
540 } 540 }
541 541
542 } // namespace blink 542 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698