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

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

Issue 1828163002: Remove ASSERT_ARG(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove duplicated declarations in Position.h Created 4 years, 8 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 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 DOMWindowSet::iterator it = set.find(domWindow); 256 DOMWindowSet::iterator it = set.find(domWindow);
257 if (it == set.end()) 257 if (it == set.end())
258 return; 258 return;
259 set.removeAll(it); 259 set.removeAll(it);
260 if (set.isEmpty()) 260 if (set.isEmpty())
261 updateSuddenTerminationStatus(domWindow, false, FrameLoaderClient::Befor eUnloadHandler); 261 updateSuddenTerminationStatus(domWindow, false, FrameLoaderClient::Befor eUnloadHandler);
262 } 262 }
263 263
264 static bool allowsBeforeUnloadListeners(LocalDOMWindow* window) 264 static bool allowsBeforeUnloadListeners(LocalDOMWindow* window)
265 { 265 {
266 ASSERT_ARG(window, window); 266 DCHECK(window);
267 LocalFrame* frame = window->frame(); 267 LocalFrame* frame = window->frame();
268 if (!frame) 268 if (!frame)
269 return false; 269 return false;
270 return frame->isMainFrame(); 270 return frame->isMainFrame();
271 } 271 }
272 272
273 unsigned LocalDOMWindow::pendingUnloadEventListeners() const 273 unsigned LocalDOMWindow::pendingUnloadEventListeners() const
274 { 274 {
275 return windowsWithUnloadEventListeners().count(const_cast<LocalDOMWindow*>(t his)); 275 return windowsWithUnloadEventListeners().count(const_cast<LocalDOMWindow*>(t his));
276 } 276 }
(...skipping 1242 matching lines...) Expand 10 before | Expand all | Expand 10 after
1519 { 1519 {
1520 // If the LocalDOMWindow still has a frame reference, that frame must point 1520 // If the LocalDOMWindow still has a frame reference, that frame must point
1521 // back to this LocalDOMWindow: otherwise, it's easy to get into a situation 1521 // back to this LocalDOMWindow: otherwise, it's easy to get into a situation
1522 // where script execution leaks between different LocalDOMWindows. 1522 // where script execution leaks between different LocalDOMWindows.
1523 if (m_frameObserver->frame()) 1523 if (m_frameObserver->frame())
1524 ASSERT_WITH_SECURITY_IMPLICATION(m_frameObserver->frame()->domWindow() = = this); 1524 ASSERT_WITH_SECURITY_IMPLICATION(m_frameObserver->frame()->domWindow() = = this);
1525 return m_frameObserver->frame(); 1525 return m_frameObserver->frame();
1526 } 1526 }
1527 1527
1528 } // namespace blink 1528 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698