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

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

Issue 2138003002: Remove DOMWindowProperty::willDetachGlobalObjectFromFrame (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
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 497 matching lines...) Expand 10 before | Expand all | Expand 10 after
508 m_properties.clear(); 508 m_properties.clear();
509 removeAllEventListeners(); 509 removeAllEventListeners();
510 } 510 }
511 511
512 void LocalDOMWindow::willDestroyDocumentInFrame() 512 void LocalDOMWindow::willDestroyDocumentInFrame()
513 { 513 {
514 for (const auto& domWindowProperty : m_properties) 514 for (const auto& domWindowProperty : m_properties)
515 domWindowProperty->willDestroyGlobalObjectInFrame(); 515 domWindowProperty->willDestroyGlobalObjectInFrame();
516 } 516 }
517 517
518 void LocalDOMWindow::willDetachDocumentFromFrame()
519 {
520 for (const auto& domWindowProperty : m_properties)
521 domWindowProperty->willDetachGlobalObjectFromFrame();
522 }
523
524 void LocalDOMWindow::registerProperty(DOMWindowProperty* property) 518 void LocalDOMWindow::registerProperty(DOMWindowProperty* property)
525 { 519 {
526 m_properties.add(property); 520 m_properties.add(property);
527 } 521 }
528 522
529 void LocalDOMWindow::unregisterProperty(DOMWindowProperty* property) 523 void LocalDOMWindow::unregisterProperty(DOMWindowProperty* property)
530 { 524 {
531 m_properties.remove(property); 525 m_properties.remove(property);
532 } 526 }
533 527
(...skipping 1016 matching lines...) Expand 10 before | Expand all | Expand 10 after
1550 { 1544 {
1551 // If the LocalDOMWindow still has a frame reference, that frame must point 1545 // If the LocalDOMWindow still has a frame reference, that frame must point
1552 // back to this LocalDOMWindow: otherwise, it's easy to get into a situation 1546 // back to this LocalDOMWindow: otherwise, it's easy to get into a situation
1553 // where script execution leaks between different LocalDOMWindows. 1547 // where script execution leaks between different LocalDOMWindows.
1554 if (m_frameObserver->frame()) 1548 if (m_frameObserver->frame())
1555 ASSERT_WITH_SECURITY_IMPLICATION(m_frameObserver->frame()->domWindow() = = this); 1549 ASSERT_WITH_SECURITY_IMPLICATION(m_frameObserver->frame()->domWindow() = = this);
1556 return m_frameObserver->frame(); 1550 return m_frameObserver->frame();
1557 } 1551 }
1558 1552
1559 } // namespace blink 1553 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698