OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |