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

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

Issue 2567913002: Rename ActiveDOMObject to SuspendableObject (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 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 m_shouldPrintWhenFinishedLoading(false) { 276 m_shouldPrintWhenFinishedLoading(false) {
277 ThreadState::current()->registerPreFinalizer(this); 277 ThreadState::current()->registerPreFinalizer(this);
278 } 278 }
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 ActiveDOMObject shutdown 286 // FIXME: This should be part of SuspendableObject shutdown
287 clearEventQueue(); 287 clearEventQueue();
288 288
289 m_unusedPreloadsTimer.stop(); 289 m_unusedPreloadsTimer.stop();
290 m_document->clearDOMWindow(); 290 m_document->clearDOMWindow();
291 m_document = nullptr; 291 m_document = nullptr;
292 } 292 }
293 293
294 void LocalDOMWindow::clearEventQueue() { 294 void LocalDOMWindow::clearEventQueue() {
295 if (!m_eventQueue) 295 if (!m_eventQueue)
296 return; 296 return;
(...skipping 1270 matching lines...) Expand 10 before | Expand all | Expand 10 after
1567 1567
1568 LocalFrame* LocalDOMWindow::frame() const { 1568 LocalFrame* LocalDOMWindow::frame() const {
1569 // If the LocalDOMWindow still has a frame reference, that frame must point 1569 // 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 1570 // back to this LocalDOMWindow: otherwise, it's easy to get into a situation
1571 // where script execution leaks between different LocalDOMWindows. 1571 // where script execution leaks between different LocalDOMWindows.
1572 SECURITY_DCHECK(!m_frame || m_frame->domWindow() == this); 1572 SECURITY_DCHECK(!m_frame || m_frame->domWindow() == this);
1573 return m_frame; 1573 return m_frame;
1574 } 1574 }
1575 1575
1576 } // namespace blink 1576 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698