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

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

Issue 2049003002: Wrap GCed raw pointer parameters of WTF::bind with Persistent (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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 390 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 m_eventQueue->enqueueEvent(event); 401 m_eventQueue->enqueueEvent(event);
402 } 402 }
403 403
404 void LocalDOMWindow::dispatchWindowLoadEvent() 404 void LocalDOMWindow::dispatchWindowLoadEvent()
405 { 405 {
406 ASSERT(!EventDispatchForbiddenScope::isEventDispatchForbidden()); 406 ASSERT(!EventDispatchForbiddenScope::isEventDispatchForbidden());
407 // Delay 'load' event if we are in EventQueueScope. This is a short-term 407 // Delay 'load' event if we are in EventQueueScope. This is a short-term
408 // workaround to avoid Editing code crashes. We should always dispatch 408 // workaround to avoid Editing code crashes. We should always dispatch
409 // 'load' event asynchronously. crbug.com/569511. 409 // 'load' event asynchronously. crbug.com/569511.
410 if (ScopedEventQueue::instance()->shouldQueueEvents() && m_document) { 410 if (ScopedEventQueue::instance()->shouldQueueEvents() && m_document) {
411 m_document->postTask(BLINK_FROM_HERE, createSameThreadTask(&LocalDOMWind ow::dispatchLoadEvent, this)); 411 m_document->postTask(BLINK_FROM_HERE, createSameThreadTask(&LocalDOMWind ow::dispatchLoadEvent, wrapPersistent(this)));
412 return; 412 return;
413 } 413 }
414 dispatchLoadEvent(); 414 dispatchLoadEvent();
415 } 415 }
416 416
417 void LocalDOMWindow::documentWasClosed() 417 void LocalDOMWindow::documentWasClosed()
418 { 418 {
419 dispatchWindowLoadEvent(); 419 dispatchWindowLoadEvent();
420 enqueuePageshowEvent(PageshowEventNotPersisted); 420 enqueuePageshowEvent(PageshowEventNotPersisted);
421 if (m_pendingStateObject) 421 if (m_pendingStateObject)
(...skipping 1144 matching lines...) Expand 10 before | Expand all | Expand 10 after
1566 { 1566 {
1567 // If the LocalDOMWindow still has a frame reference, that frame must point 1567 // If the LocalDOMWindow still has a frame reference, that frame must point
1568 // back to this LocalDOMWindow: otherwise, it's easy to get into a situation 1568 // back to this LocalDOMWindow: otherwise, it's easy to get into a situation
1569 // where script execution leaks between different LocalDOMWindows. 1569 // where script execution leaks between different LocalDOMWindows.
1570 if (m_frameObserver->frame()) 1570 if (m_frameObserver->frame())
1571 ASSERT_WITH_SECURITY_IMPLICATION(m_frameObserver->frame()->domWindow() = = this); 1571 ASSERT_WITH_SECURITY_IMPLICATION(m_frameObserver->frame()->domWindow() = = this);
1572 return m_frameObserver->frame(); 1572 return m_frameObserver->frame();
1573 } 1573 }
1574 1574
1575 } // namespace blink 1575 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/fileapi/FileReader.cpp ('k') | third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698