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

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLSlotElement.cpp

Issue 2049003002: Wrap GCed raw pointer parameters of WTF::bind with Persistent (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 5 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) 2015 Google Inc. All rights reserved. 2 * Copyright (C) 2015 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 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 node->lazyReattachIfAttached(); 306 node->lazyReattachIfAttached();
307 for (auto& node : m_distributedNodes) 307 for (auto& node : m_distributedNodes)
308 node->lazyReattachIfAttached(); 308 node->lazyReattachIfAttached();
309 } 309 }
310 m_oldDistributedNodes.clear(); 310 m_oldDistributedNodes.clear();
311 } 311 }
312 312
313 void HTMLSlotElement::enqueueSlotChangeEvent() 313 void HTMLSlotElement::enqueueSlotChangeEvent()
314 { 314 {
315 if (!m_slotchangeEventEnqueued) { 315 if (!m_slotchangeEventEnqueued) {
316 Microtask::enqueueMicrotask(WTF::bind(&HTMLSlotElement::dispatchSlotChan geEvent, Persistent<HTMLSlotElement>(this))); 316 Microtask::enqueueMicrotask(WTF::bind(&HTMLSlotElement::dispatchSlotChan geEvent, wrapPersistent(this)));
317 m_slotchangeEventEnqueued = true; 317 m_slotchangeEventEnqueued = true;
318 } 318 }
319 319
320 ShadowRoot* root = containingShadowRoot(); 320 ShadowRoot* root = containingShadowRoot();
321 DCHECK(root); 321 DCHECK(root);
322 DCHECK(root->isV1()); 322 DCHECK(root->isV1());
323 root->owner()->setNeedsDistributionRecalc(); 323 root->owner()->setNeedsDistributionRecalc();
324 324
325 if (ShadowRoot* parentShadowRoot = v1ShadowRootOfParent()) { 325 if (ShadowRoot* parentShadowRoot = v1ShadowRootOfParent()) {
326 if (HTMLSlotElement* next = parentShadowRoot->ensureSlotAssignment().fin dSlot(*this)) 326 if (HTMLSlotElement* next = parentShadowRoot->ensureSlotAssignment().fin dSlot(*this))
(...skipping 29 matching lines...) Expand all
356 DEFINE_TRACE(HTMLSlotElement) 356 DEFINE_TRACE(HTMLSlotElement)
357 { 357 {
358 visitor->trace(m_assignedNodes); 358 visitor->trace(m_assignedNodes);
359 visitor->trace(m_distributedNodes); 359 visitor->trace(m_distributedNodes);
360 visitor->trace(m_oldDistributedNodes); 360 visitor->trace(m_oldDistributedNodes);
361 visitor->trace(m_distributedIndices); 361 visitor->trace(m_distributedIndices);
362 HTMLElement::trace(visitor); 362 HTMLElement::trace(visitor);
363 } 363 }
364 364
365 } // namespace blink 365 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698