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

Side by Side Diff: third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp

Issue 2592653002: [wrapper-tracing] Trace CustomElementReactionStack (Closed)
Patch Set: 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
« no previous file with comments | « third_party/WebKit/Source/core/frame/LocalDOMWindow.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved.
3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 } 267 }
268 268
269 bool LocalDOMWindow::allowPopUp() { 269 bool LocalDOMWindow::allowPopUp() {
270 return frame() && allowPopUp(*frame()); 270 return frame() && allowPopUp(*frame());
271 } 271 }
272 272
273 LocalDOMWindow::LocalDOMWindow(LocalFrame& frame) 273 LocalDOMWindow::LocalDOMWindow(LocalFrame& frame)
274 : m_frame(&frame), 274 : m_frame(&frame),
275 m_visualViewport(DOMVisualViewport::create(this)), 275 m_visualViewport(DOMVisualViewport::create(this)),
276 m_unusedPreloadsTimer(this, &LocalDOMWindow::warnUnusedPreloads), 276 m_unusedPreloadsTimer(this, &LocalDOMWindow::warnUnusedPreloads),
277 m_shouldPrintWhenFinishedLoading(false) { 277 m_shouldPrintWhenFinishedLoading(false),
278 } 278 m_customElements(this, nullptr) {}
279 279
280 void LocalDOMWindow::clearDocument() { 280 void LocalDOMWindow::clearDocument() {
281 if (!m_document) 281 if (!m_document)
282 return; 282 return;
283 283
284 ASSERT(!m_document->isActive()); 284 ASSERT(!m_document->isActive());
285 285
286 // FIXME: This should be part of SuspendableObject shutdown 286 // FIXME: This should be part of SuspendableObject shutdown
287 clearEventQueue(); 287 clearEventQueue();
288 288
(...skipping 1269 matching lines...) Expand 10 before | Expand all | Expand 10 after
1558 visitor->trace(m_customElements); 1558 visitor->trace(m_customElements);
1559 visitor->trace(m_applicationCache); 1559 visitor->trace(m_applicationCache);
1560 visitor->trace(m_eventQueue); 1560 visitor->trace(m_eventQueue);
1561 visitor->trace(m_postMessageTimers); 1561 visitor->trace(m_postMessageTimers);
1562 visitor->trace(m_visualViewport); 1562 visitor->trace(m_visualViewport);
1563 visitor->trace(m_eventListenerObservers); 1563 visitor->trace(m_eventListenerObservers);
1564 DOMWindow::trace(visitor); 1564 DOMWindow::trace(visitor);
1565 Supplementable<LocalDOMWindow>::trace(visitor); 1565 Supplementable<LocalDOMWindow>::trace(visitor);
1566 } 1566 }
1567 1567
1568 DEFINE_TRACE_WRAPPERS(LocalDOMWindow) {
1569 visitor->traceWrappers(m_customElements);
1570 DOMWindow::traceWrappers(visitor);
1571 }
1572
1568 LocalFrame* LocalDOMWindow::frame() const { 1573 LocalFrame* LocalDOMWindow::frame() const {
1569 // If the LocalDOMWindow still has a frame reference, that frame must point 1574 // If the LocalDOMWindow still has a frame reference, that frame must point
1570 // back to this LocalDOMWindow: otherwise, it's easy to get into a situation 1575 // back to this LocalDOMWindow: otherwise, it's easy to get into a situation
1571 // where script execution leaks between different LocalDOMWindows. 1576 // where script execution leaks between different LocalDOMWindows.
1572 SECURITY_DCHECK(!m_frame || m_frame->domWindow() == this); 1577 SECURITY_DCHECK(!m_frame || m_frame->domWindow() == this);
1573 return m_frame; 1578 return m_frame;
1574 } 1579 }
1575 1580
1576 } // namespace blink 1581 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/LocalDOMWindow.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698