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

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: revert "unretained" part and "disallow pointers" part Created 4 years, 6 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 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 if (isHTMLSlotElement(child)) 287 if (isHTMLSlotElement(child))
288 appendDistributedNodesFrom(toHTMLSlotElement(child)); 288 appendDistributedNodesFrom(toHTMLSlotElement(child));
289 else 289 else
290 appendDistributedNode(child); 290 appendDistributedNode(child);
291 } 291 }
292 } 292 }
293 293
294 void HTMLSlotElement::enqueueSlotChangeEvent() 294 void HTMLSlotElement::enqueueSlotChangeEvent()
295 { 295 {
296 if (!m_slotchangeEventEnqueued) { 296 if (!m_slotchangeEventEnqueued) {
297 Microtask::enqueueMicrotask(WTF::bind(&HTMLSlotElement::dispatchSlotChan geEvent, Persistent<HTMLSlotElement>(this))); 297 Microtask::enqueueMicrotask(WTF::bind(&HTMLSlotElement::dispatchSlotChan geEvent, wrapCrossThreadPersistent(this)));
hiroshige 2016/06/15 12:12:39 Shouldn't this be |wrapPersistent(this)| to keep t
tzik 2016/06/21 09:09:04 Done.
298 m_slotchangeEventEnqueued = true; 298 m_slotchangeEventEnqueued = true;
299 } 299 }
300 300
301 ShadowRoot* root = containingShadowRoot(); 301 ShadowRoot* root = containingShadowRoot();
302 DCHECK(root); 302 DCHECK(root);
303 DCHECK(root->isV1()); 303 DCHECK(root->isV1());
304 root->owner()->setNeedsDistributionRecalc(); 304 root->owner()->setNeedsDistributionRecalc();
305 305
306 if (ShadowRoot* parentShadowRoot = v1ShadowRootOfParent()) { 306 if (ShadowRoot* parentShadowRoot = v1ShadowRootOfParent()) {
307 if (HTMLSlotElement* next = parentShadowRoot->ensureSlotAssignment().fin dSlot(*this)) 307 if (HTMLSlotElement* next = parentShadowRoot->ensureSlotAssignment().fin dSlot(*this))
(...skipping 28 matching lines...) Expand all
336 336
337 DEFINE_TRACE(HTMLSlotElement) 337 DEFINE_TRACE(HTMLSlotElement)
338 { 338 {
339 visitor->trace(m_assignedNodes); 339 visitor->trace(m_assignedNodes);
340 visitor->trace(m_distributedNodes); 340 visitor->trace(m_distributedNodes);
341 visitor->trace(m_distributedIndices); 341 visitor->trace(m_distributedIndices);
342 HTMLElement::trace(visitor); 342 HTMLElement::trace(visitor);
343 } 343 }
344 344
345 } // namespace blink 345 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698