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

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

Issue 2570463005: Retire ThreadState::registerPreFinalizer<T>() (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
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 bool LocalDOMWindow::allowPopUp() { 268 bool LocalDOMWindow::allowPopUp() {
269 return frame() && allowPopUp(*frame()); 269 return frame() && allowPopUp(*frame());
270 } 270 }
271 271
272 LocalDOMWindow::LocalDOMWindow(LocalFrame& frame) 272 LocalDOMWindow::LocalDOMWindow(LocalFrame& frame)
273 : m_frame(&frame), 273 : m_frame(&frame),
274 m_visualViewport(DOMVisualViewport::create(this)), 274 m_visualViewport(DOMVisualViewport::create(this)),
275 m_unusedPreloadsTimer(this, &LocalDOMWindow::warnUnusedPreloads), 275 m_unusedPreloadsTimer(this, &LocalDOMWindow::warnUnusedPreloads),
276 m_shouldPrintWhenFinishedLoading(false) { 276 m_shouldPrintWhenFinishedLoading(false) {
277 ThreadState::current()->registerPreFinalizer(this);
278 } 277 }
279 278
280 void LocalDOMWindow::clearDocument() { 279 void LocalDOMWindow::clearDocument() {
281 if (!m_document) 280 if (!m_document)
282 return; 281 return;
283 282
284 ASSERT(!m_document->isActive()); 283 ASSERT(!m_document->isActive());
285 284
286 // FIXME: This should be part of SuspendableObject shutdown 285 // FIXME: This should be part of SuspendableObject shutdown
287 clearEventQueue(); 286 clearEventQueue();
(...skipping 1279 matching lines...) Expand 10 before | Expand all | Expand 10 after
1567 1566
1568 LocalFrame* LocalDOMWindow::frame() const { 1567 LocalFrame* LocalDOMWindow::frame() const {
1569 // If the LocalDOMWindow still has a frame reference, that frame must point 1568 // 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 1569 // back to this LocalDOMWindow: otherwise, it's easy to get into a situation
1571 // where script execution leaks between different LocalDOMWindows. 1570 // where script execution leaks between different LocalDOMWindows.
1572 SECURITY_DCHECK(!m_frame || m_frame->domWindow() == this); 1571 SECURITY_DCHECK(!m_frame || m_frame->domWindow() == this);
1573 return m_frame; 1572 return m_frame;
1574 } 1573 }
1575 1574
1576 } // namespace blink 1575 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/fetch/ResourceOwner.h ('k') | third_party/WebKit/Source/core/html/HTMLMediaElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698