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

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

Issue 2622043003: Replaced RefPtr::release with std::move in Source/core. (Closed)
Patch Set: Created 3 years, 11 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 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 wrapPersistent(this))); 392 wrapPersistent(this)));
393 return; 393 return;
394 } 394 }
395 dispatchLoadEvent(); 395 dispatchLoadEvent();
396 } 396 }
397 397
398 void LocalDOMWindow::documentWasClosed() { 398 void LocalDOMWindow::documentWasClosed() {
399 dispatchWindowLoadEvent(); 399 dispatchWindowLoadEvent();
400 enqueuePageshowEvent(PageshowEventNotPersisted); 400 enqueuePageshowEvent(PageshowEventNotPersisted);
401 if (m_pendingStateObject) 401 if (m_pendingStateObject)
402 enqueuePopstateEvent(m_pendingStateObject.release()); 402 enqueuePopstateEvent(std::move(m_pendingStateObject));
403 } 403 }
404 404
405 void LocalDOMWindow::enqueuePageshowEvent(PageshowEventPersistence persisted) { 405 void LocalDOMWindow::enqueuePageshowEvent(PageshowEventPersistence persisted) {
406 // FIXME: https://bugs.webkit.org/show_bug.cgi?id=36334 Pageshow event needs 406 // FIXME: https://bugs.webkit.org/show_bug.cgi?id=36334 Pageshow event needs
407 // to fire asynchronously. As per spec pageshow must be triggered 407 // to fire asynchronously. As per spec pageshow must be triggered
408 // asynchronously. However to be compatible with other browsers blink fires 408 // asynchronously. However to be compatible with other browsers blink fires
409 // pageshow synchronously. 409 // pageshow synchronously.
410 dispatchEvent( 410 dispatchEvent(
411 PageTransitionEvent::create(EventTypeNames::pageshow, persisted), 411 PageTransitionEvent::create(EventTypeNames::pageshow, persisted),
412 m_document.get()); 412 m_document.get());
(...skipping 1221 matching lines...) Expand 10 before | Expand all | Expand 10 after
1634 1634
1635 LocalFrame* LocalDOMWindow::frame() const { 1635 LocalFrame* LocalDOMWindow::frame() const {
1636 // If the LocalDOMWindow still has a frame reference, that frame must point 1636 // If the LocalDOMWindow still has a frame reference, that frame must point
1637 // back to this LocalDOMWindow: otherwise, it's easy to get into a situation 1637 // back to this LocalDOMWindow: otherwise, it's easy to get into a situation
1638 // where script execution leaks between different LocalDOMWindows. 1638 // where script execution leaks between different LocalDOMWindows.
1639 SECURITY_DCHECK(!m_frame || m_frame->domWindow() == this); 1639 SECURITY_DCHECK(!m_frame || m_frame->domWindow() == this);
1640 return m_frame; 1640 return m_frame;
1641 } 1641 }
1642 1642
1643 } // namespace blink 1643 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698