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

Side by Side Diff: Source/core/dom/MutationObserverRegistration.cpp

Issue 170603003: Use nullptr_t for RefPtr, PassRefPtr and RawPtr. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Final rebase Created 6 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/dom/FullscreenElementStack.cpp ('k') | Source/core/dom/NamedNodeMap.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 ASSERT(!m_registrationNodeKeepAlive); 87 ASSERT(!m_registrationNodeKeepAlive);
88 return; 88 return;
89 } 89 }
90 90
91 for (NodeHashSet::iterator iter = m_transientRegistrationNodes->begin(); ite r != m_transientRegistrationNodes->end(); ++iter) 91 for (NodeHashSet::iterator iter = m_transientRegistrationNodes->begin(); ite r != m_transientRegistrationNodes->end(); ++iter)
92 (*iter)->unregisterTransientMutationObserver(this); 92 (*iter)->unregisterTransientMutationObserver(this);
93 93
94 m_transientRegistrationNodes.clear(); 94 m_transientRegistrationNodes.clear();
95 95
96 ASSERT(m_registrationNodeKeepAlive); 96 ASSERT(m_registrationNodeKeepAlive);
97 m_registrationNodeKeepAlive = 0; // Balanced in observeSubtreeNodeWillDetach . 97 m_registrationNodeKeepAlive = nullptr; // Balanced in observeSubtreeNodeWill Detach.
98 } 98 }
99 99
100 void MutationObserverRegistration::unregister() 100 void MutationObserverRegistration::unregister()
101 { 101 {
102 m_registrationNode->unregisterMutationObserver(this); 102 m_registrationNode->unregisterMutationObserver(this);
103 // The above line will cause this object to be deleted, so don't do any more in this function. 103 // The above line will cause this object to be deleted, so don't do any more in this function.
104 } 104 }
105 105
106 bool MutationObserverRegistration::shouldReceiveMutationFrom(Node* node, Mutatio nObserver::MutationType type, const QualifiedName* attributeName) const 106 bool MutationObserverRegistration::shouldReceiveMutationFrom(Node* node, Mutatio nObserver::MutationType type, const QualifiedName* attributeName) const
107 { 107 {
(...skipping 16 matching lines...) Expand all
124 void MutationObserverRegistration::addRegistrationNodesToSet(HashSet<Node*>& nod es) const 124 void MutationObserverRegistration::addRegistrationNodesToSet(HashSet<Node*>& nod es) const
125 { 125 {
126 nodes.add(m_registrationNode); 126 nodes.add(m_registrationNode);
127 if (!m_transientRegistrationNodes) 127 if (!m_transientRegistrationNodes)
128 return; 128 return;
129 for (NodeHashSet::const_iterator iter = m_transientRegistrationNodes->begin( ); iter != m_transientRegistrationNodes->end(); ++iter) 129 for (NodeHashSet::const_iterator iter = m_transientRegistrationNodes->begin( ); iter != m_transientRegistrationNodes->end(); ++iter)
130 nodes.add(iter->get()); 130 nodes.add(iter->get());
131 } 131 }
132 132
133 } // namespace WebCore 133 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/dom/FullscreenElementStack.cpp ('k') | Source/core/dom/NamedNodeMap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698