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

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: temp 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 496 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/LocalDOMWindow.h ('k') | third_party/WebKit/Source/modules/gamepad/NavigatorGamepad.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698