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

Side by Side Diff: Source/core/frame/DOMWindow.cpp

Issue 292503006: Oilpan: add [WillBeGarbageCollected] for Node. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebased Created 6 years, 7 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
« Source/core/dom/Document.cpp ('K') | « Source/core/frame/DOMWindow.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 471 matching lines...) Expand 10 before | Expand all | Expand 10 after
482 enqueuePopstateEvent(stateObject); 482 enqueuePopstateEvent(stateObject);
483 else 483 else
484 m_pendingStateObject = stateObject; 484 m_pendingStateObject = stateObject;
485 } 485 }
486 486
487 DOMWindow::~DOMWindow() 487 DOMWindow::~DOMWindow()
488 { 488 {
489 ASSERT(m_hasBeenReset); 489 ASSERT(m_hasBeenReset);
490 reset(); 490 reset();
491 491
492 #if ENABLE(OILPAN)
493 // Stub out early to prevent Document access in removeAllEventListeners().
494 m_document = nullptr;
haraken 2014/05/23 12:23:27 I'm not sure if it's OK to clear m_document here.
sof 2014/05/23 14:29:07 I think we can address that via DOMWindow::clearWe
495 #endif
496
492 removeAllEventListeners(); 497 removeAllEventListeners();
493 498
494 #if ENABLE(OILPAN) 499 #if ENABLE(OILPAN)
495 ASSERT(m_document->isDisposed()); 500 // FIXME: This should be part of ActiveDOM Object shutdown
501 clearEventQueue();
496 #else 502 #else
497 ASSERT(m_document->isStopped()); 503 ASSERT(m_document->isStopped());
504 clearDocument();
498 #endif 505 #endif
499
500 clearDocument();
501 } 506 }
502 507
503 const AtomicString& DOMWindow::interfaceName() const 508 const AtomicString& DOMWindow::interfaceName() const
504 { 509 {
505 return EventTargetNames::DOMWindow; 510 return EventTargetNames::DOMWindow;
506 } 511 }
507 512
508 ExecutionContext* DOMWindow::executionContext() const 513 ExecutionContext* DOMWindow::executionContext() const
509 { 514 {
510 return m_document.get(); 515 return m_document.get();
(...skipping 1357 matching lines...) Expand 10 before | Expand all | Expand 10 after
1868 return static_cast<DOMWindowLifecycleNotifier&>(LifecycleContext<DOMWindow>: :lifecycleNotifier()); 1873 return static_cast<DOMWindowLifecycleNotifier&>(LifecycleContext<DOMWindow>: :lifecycleNotifier());
1869 } 1874 }
1870 1875
1871 PassOwnPtr<LifecycleNotifier<DOMWindow> > DOMWindow::createLifecycleNotifier() 1876 PassOwnPtr<LifecycleNotifier<DOMWindow> > DOMWindow::createLifecycleNotifier()
1872 { 1877 {
1873 return DOMWindowLifecycleNotifier::create(this); 1878 return DOMWindowLifecycleNotifier::create(this);
1874 } 1879 }
1875 1880
1876 void DOMWindow::trace(Visitor* visitor) 1881 void DOMWindow::trace(Visitor* visitor)
1877 { 1882 {
1883 visitor->trace(m_document);
1878 visitor->trace(m_screen); 1884 visitor->trace(m_screen);
1879 visitor->trace(m_history); 1885 visitor->trace(m_history);
1880 visitor->trace(m_locationbar); 1886 visitor->trace(m_locationbar);
1881 visitor->trace(m_menubar); 1887 visitor->trace(m_menubar);
1882 visitor->trace(m_personalbar); 1888 visitor->trace(m_personalbar);
1883 visitor->trace(m_scrollbars); 1889 visitor->trace(m_scrollbars);
1884 visitor->trace(m_statusbar); 1890 visitor->trace(m_statusbar);
1885 visitor->trace(m_toolbar); 1891 visitor->trace(m_toolbar);
1886 visitor->trace(m_console); 1892 visitor->trace(m_console);
1887 visitor->trace(m_navigator); 1893 visitor->trace(m_navigator);
1888 visitor->trace(m_location); 1894 visitor->trace(m_location);
1889 visitor->trace(m_media); 1895 visitor->trace(m_media);
1890 visitor->trace(m_sessionStorage); 1896 visitor->trace(m_sessionStorage);
1891 visitor->trace(m_localStorage); 1897 visitor->trace(m_localStorage);
1892 visitor->trace(m_applicationCache); 1898 visitor->trace(m_applicationCache);
1893 visitor->trace(m_performance); 1899 visitor->trace(m_performance);
1894 visitor->trace(m_css); 1900 visitor->trace(m_css);
1895 WillBeHeapSupplementable<DOMWindow>::trace(visitor); 1901 WillBeHeapSupplementable<DOMWindow>::trace(visitor);
1896 } 1902 }
1897 1903
1898 } // namespace WebCore 1904 } // namespace WebCore
OLDNEW
« Source/core/dom/Document.cpp ('K') | « Source/core/frame/DOMWindow.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698