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

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

Issue 2682313002: Introduce NavigationSimulator to use in unit tests (Closed)
Patch Set: Fixed issue with OOPIF 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 a5459d616a3ec8087786bbe6be27ca47b1aa541f..464fa14b8e73787c24bef218066bd4c993f432a1 100644
--- a/content/browser/frame_host/navigation_handle_impl.cc
+++ b/content/browser/frame_host/navigation_handle_impl.cc
@@ -659,7 +659,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