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

Unified Diff: android_webview/native/aw_contents_io_thread_client_impl.cc

Issue 2480203002: ui: Cleanup class/struct forward declarations (Closed)
Patch Set: Sync CL to position 430550 Created 4 years, 1 month 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: android_webview/native/aw_contents_io_thread_client_impl.cc
diff --git a/android_webview/native/aw_contents_io_thread_client_impl.cc b/android_webview/native/aw_contents_io_thread_client_impl.cc
index 1d9a655beb4028ba36f4d66d629ae6a7a069540b..63965db2074f4dfdf8844bde3d4ea9f9f660d1a1 100644
--- a/android_webview/native/aw_contents_io_thread_client_impl.cc
+++ b/android_webview/native/aw_contents_io_thread_client_impl.cc
@@ -273,13 +273,12 @@ void AwContentsIoThreadClientImpl::SetServiceWorkerIoThreadClient(
// static
std::unique_ptr<AwContentsIoThreadClient>
AwContentsIoThreadClient::GetServiceWorkerIoThreadClient() {
- if (g_sw_instance_.Get().is_empty())
- return std::unique_ptr<AwContentsIoThreadClient>();
-
JNIEnv* env = AttachCurrentThread();
ScopedJavaLocalRef<jobject> java_delegate = g_sw_instance_.Get().get(env);
- DCHECK(!java_delegate.is_null());
+ if (java_delegate.is_null())
+ return std::unique_ptr<AwContentsIoThreadClient>();
+
return std::unique_ptr<AwContentsIoThreadClient>(
new AwContentsIoThreadClientImpl(false, java_delegate));
}

Powered by Google App Engine
This is Rietveld 408576698