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

Unified Diff: content/browser/frame_host/navigation_handle_impl.cc

Issue 2682313002: Introduce NavigationSimulator to use in unit tests (Closed)
Patch Set: Added same-page navigation simulation Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/frame_host/navigation_handle_impl.cc
diff --git a/content/browser/frame_host/navigation_handle_impl.cc b/content/browser/frame_host/navigation_handle_impl.cc
index 74e0b202c6f005ffc79bb32c909b01bb847c83f2..437552e219975c24a754b1b8994759e35abc3891 100644
--- a/content/browser/frame_host/navigation_handle_impl.cc
+++ b/content/browser/frame_host/navigation_handle_impl.cc
@@ -647,7 +647,9 @@ void NavigationHandleImpl::Transfer() {
// transferring, the URLRequest can no longer be cancelled by its original
// RenderFrame. Instead it will persist until being picked up by the transfer
// RenderFrame, even if the original RenderFrame is destroyed.
- BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, transfer_callback_);
+ // Note: |transfer_callback_| can be null in unit tests.
+ if (!transfer_callback_.is_null())
+ BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, transfer_callback_);
transfer_callback_.Reset();
}

Powered by Google App Engine
This is Rietveld 408576698