| OLD | NEW |
| 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 480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 491 m_properties.remove(property); | 491 m_properties.remove(property); |
| 492 } | 492 } |
| 493 | 493 |
| 494 void LocalDOMWindow::registerEventListenerObserver( | 494 void LocalDOMWindow::registerEventListenerObserver( |
| 495 EventListenerObserver* eventListenerObserver) { | 495 EventListenerObserver* eventListenerObserver) { |
| 496 m_eventListenerObservers.add(eventListenerObserver); | 496 m_eventListenerObservers.add(eventListenerObserver); |
| 497 } | 497 } |
| 498 | 498 |
| 499 void LocalDOMWindow::reset() { | 499 void LocalDOMWindow::reset() { |
| 500 DCHECK(document()); | 500 DCHECK(document()); |
| 501 // Since |Document| class has multiple |LifecycleNotifier| as base class, | 501 DCHECK(document()->isContextDestroyed()); |
| 502 // we need to have |static_cast<ExecutionContext>| here. | |
| 503 static_cast<ExecutionContext*>(document())->notifyContextDestroyed(); | |
| 504 frameDestroyed(); | 502 frameDestroyed(); |
| 505 | 503 |
| 506 m_screen = nullptr; | 504 m_screen = nullptr; |
| 507 m_history = nullptr; | 505 m_history = nullptr; |
| 508 m_locationbar = nullptr; | 506 m_locationbar = nullptr; |
| 509 m_menubar = nullptr; | 507 m_menubar = nullptr; |
| 510 m_personalbar = nullptr; | 508 m_personalbar = nullptr; |
| 511 m_scrollbars = nullptr; | 509 m_scrollbars = nullptr; |
| 512 m_statusbar = nullptr; | 510 m_statusbar = nullptr; |
| 513 m_toolbar = nullptr; | 511 m_toolbar = nullptr; |
| (...skipping 1058 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1572 | 1570 |
| 1573 LocalFrame* LocalDOMWindow::frame() const { | 1571 LocalFrame* LocalDOMWindow::frame() const { |
| 1574 // If the LocalDOMWindow still has a frame reference, that frame must point | 1572 // If the LocalDOMWindow still has a frame reference, that frame must point |
| 1575 // back to this LocalDOMWindow: otherwise, it's easy to get into a situation | 1573 // back to this LocalDOMWindow: otherwise, it's easy to get into a situation |
| 1576 // where script execution leaks between different LocalDOMWindows. | 1574 // where script execution leaks between different LocalDOMWindows. |
| 1577 SECURITY_DCHECK(!m_frame || m_frame->domWindow() == this); | 1575 SECURITY_DCHECK(!m_frame || m_frame->domWindow() == this); |
| 1578 return m_frame; | 1576 return m_frame; |
| 1579 } | 1577 } |
| 1580 | 1578 |
| 1581 } // namespace blink | 1579 } // namespace blink |
| OLD | NEW |