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

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

Issue 2682313002: Introduce NavigationSimulator to use in unit tests (Closed)
Patch Set: Addressed comments 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 ae93eee9f77a981de15ff9d82434a3fe7141a09b..2e525bbe4956a473d0c41d0d2051e1d5801bdef4 100644
--- a/content/browser/frame_host/navigation_handle_impl.cc
+++ b/content/browser/frame_host/navigation_handle_impl.cc
@@ -665,7 +665,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();
}
« no previous file with comments | « content/browser/frame_host/navigation_handle_impl.h ('k') | content/browser/frame_host/render_frame_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698