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

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

Issue 2587913002: Rename activeDOMObjectsAreSuspended to isContextSuspended (Closed)
Patch Set: temp Created 3 years, 12 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 * 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 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 199
200 HeapHashSet<Member<Node>> MutationObserver::getObservedNodes() const { 200 HeapHashSet<Member<Node>> MutationObserver::getObservedNodes() const {
201 HeapHashSet<Member<Node>> observedNodes; 201 HeapHashSet<Member<Node>> observedNodes;
202 for (const auto& registration : m_registrations) 202 for (const auto& registration : m_registrations)
203 registration->addRegistrationNodesToSet(observedNodes); 203 registration->addRegistrationNodesToSet(observedNodes);
204 return observedNodes; 204 return observedNodes;
205 } 205 }
206 206
207 bool MutationObserver::shouldBeSuspended() const { 207 bool MutationObserver::shouldBeSuspended() const {
208 return m_callback->getExecutionContext() && 208 return m_callback->getExecutionContext() &&
209 m_callback->getExecutionContext()->activeDOMObjectsAreSuspended(); 209 m_callback->getExecutionContext()->isContextSuspended();
210 } 210 }
211 211
212 void MutationObserver::cancelInspectorAsyncTasks() { 212 void MutationObserver::cancelInspectorAsyncTasks() {
213 for (auto& record : m_records) 213 for (auto& record : m_records)
214 InspectorInstrumentation::asyncTaskCanceled( 214 InspectorInstrumentation::asyncTaskCanceled(
215 m_callback->getExecutionContext(), record); 215 m_callback->getExecutionContext(), record);
216 } 216 }
217 217
218 void MutationObserver::deliver() { 218 void MutationObserver::deliver() {
219 DCHECK(!shouldBeSuspended()); 219 DCHECK(!shouldBeSuspended());
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 } 271 }
272 272
273 DEFINE_TRACE(MutationObserver) { 273 DEFINE_TRACE(MutationObserver) {
274 visitor->trace(m_callback); 274 visitor->trace(m_callback);
275 visitor->trace(m_records); 275 visitor->trace(m_records);
276 visitor->trace(m_registrations); 276 visitor->trace(m_registrations);
277 visitor->trace(m_callback); 277 visitor->trace(m_callback);
278 } 278 }
279 279
280 } // namespace blink 280 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698