Chromium Code Reviews| 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()) |
|
timvolodine
2016/11/07 17:13:01
to be more precise, I was looking here and compari
boliu
2016/11/07 17:23:33
They are not equivalent.
is_empty (now is_initial
boliu
2016/11/07 17:25:29
darn it, got that backwards
it's possible for get
timvolodine
2016/11/07 20:16:15
Just to follow-up: we chatted here a bit about thi
|
| + return std::unique_ptr<AwContentsIoThreadClient>(); |
| + |
| return std::unique_ptr<AwContentsIoThreadClient>( |
| new AwContentsIoThreadClientImpl(false, java_delegate)); |
| } |