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 496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
507 m_properties.clear(); | 507 m_properties.clear(); |
508 removeAllEventListeners(); | 508 removeAllEventListeners(); |
509 } | 509 } |
510 | 510 |
511 void LocalDOMWindow::willDestroyDocumentInFrame() | 511 void LocalDOMWindow::willDestroyDocumentInFrame() |
512 { | 512 { |
513 for (const auto& domWindowProperty : m_properties) | 513 for (const auto& domWindowProperty : m_properties) |
514 domWindowProperty->willDestroyGlobalObjectInFrame(); | 514 domWindowProperty->willDestroyGlobalObjectInFrame(); |
515 } | 515 } |
516 | 516 |
517 void LocalDOMWindow::willDetachDocumentFromFrame() | |
518 { | |
519 for (const auto& domWindowProperty : m_properties) | |
520 domWindowProperty->willDetachGlobalObjectFromFrame(); | |
521 } | |
522 | |
523 void LocalDOMWindow::registerProperty(DOMWindowProperty* property) | 517 void LocalDOMWindow::registerProperty(DOMWindowProperty* property) |
524 { | 518 { |
525 m_properties.add(property); | 519 m_properties.add(property); |
526 } | 520 } |
527 | 521 |
528 void LocalDOMWindow::unregisterProperty(DOMWindowProperty* property) | 522 void LocalDOMWindow::unregisterProperty(DOMWindowProperty* property) |
529 { | 523 { |
530 m_properties.remove(property); | 524 m_properties.remove(property); |
531 } | 525 } |
532 | 526 |
(...skipping 1026 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1559 { | 1553 { |
1560 // If the LocalDOMWindow still has a frame reference, that frame must point | 1554 // If the LocalDOMWindow still has a frame reference, that frame must point |
1561 // back to this LocalDOMWindow: otherwise, it's easy to get into a situation | 1555 // back to this LocalDOMWindow: otherwise, it's easy to get into a situation |
1562 // where script execution leaks between different LocalDOMWindows. | 1556 // where script execution leaks between different LocalDOMWindows. |
1563 if (m_frameObserver->frame()) | 1557 if (m_frameObserver->frame()) |
1564 ASSERT_WITH_SECURITY_IMPLICATION(m_frameObserver->frame()->domWindow() =
= this); | 1558 ASSERT_WITH_SECURITY_IMPLICATION(m_frameObserver->frame()->domWindow() =
= this); |
1565 return m_frameObserver->frame(); | 1559 return m_frameObserver->frame(); |
1566 } | 1560 } |
1567 | 1561 |
1568 } // namespace blink | 1562 } // namespace blink |
OLD | NEW |