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

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

Issue 2470233009: WTF/std normalization: replace WTF::Vector::first() with ::front() (Closed)
Patch Set: rebase Created 4 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) 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 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 transientRegistrations[i]->clearTransientRegistrations(); 231 transientRegistrations[i]->clearTransientRegistrations();
232 232
233 if (m_records.isEmpty()) 233 if (m_records.isEmpty())
234 return; 234 return;
235 235
236 MutationRecordVector records; 236 MutationRecordVector records;
237 records.swap(m_records); 237 records.swap(m_records);
238 238
239 // Report the first (earliest) stack as the async cause. 239 // Report the first (earliest) stack as the async cause.
240 InspectorInstrumentation::AsyncTask asyncTask( 240 InspectorInstrumentation::AsyncTask asyncTask(
241 m_callback->getExecutionContext(), records.first()); 241 m_callback->getExecutionContext(), records.front());
242 m_callback->call(records, this); 242 m_callback->call(records, this);
243 } 243 }
244 244
245 void MutationObserver::resumeSuspendedObservers() { 245 void MutationObserver::resumeSuspendedObservers() {
246 DCHECK(isMainThread()); 246 DCHECK(isMainThread());
247 if (suspendedMutationObservers().isEmpty()) 247 if (suspendedMutationObservers().isEmpty())
248 return; 248 return;
249 249
250 MutationObserverVector suspended; 250 MutationObserverVector suspended;
251 copyToVector(suspendedMutationObservers(), suspended); 251 copyToVector(suspendedMutationObservers(), suspended);
(...skipping 20 matching lines...) Expand all
272 } 272 }
273 273
274 DEFINE_TRACE(MutationObserver) { 274 DEFINE_TRACE(MutationObserver) {
275 visitor->trace(m_callback); 275 visitor->trace(m_callback);
276 visitor->trace(m_records); 276 visitor->trace(m_records);
277 visitor->trace(m_registrations); 277 visitor->trace(m_registrations);
278 visitor->trace(m_callback); 278 visitor->trace(m_callback);
279 } 279 }
280 280
281 } // namespace blink 281 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/DocumentOrderedMap.cpp ('k') | third_party/WebKit/Source/core/dom/Range.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698