Bug 195757

Summary: CacheStorageConnection callbacks should be completed on network connection close
Product: WebKit Reporter: youenn fablet <youennf>
Component: Service WorkersAssignee: youenn fablet <youennf>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, cdumez, commit-queue, ryanhaddad, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 198134    
Bug Blocks:    
Attachments:
Description Flags
Patch
none
Patch
none
Patch for landing none

Description youenn fablet 2019-03-14 13:24:39 PDT
CacheStorageConnection callbacks should be completed on network connection close.
Otherwise, on network cache, we will be hanging forever.
Comment 1 youenn fablet 2019-03-14 13:34:53 PDT
Another approach is to rely on AsyncReply
Comment 2 youenn fablet 2019-05-22 15:41:31 PDT
Created attachment 370455 [details]
Patch
Comment 3 youenn fablet 2019-05-22 20:26:36 PDT
Created attachment 370480 [details]
Patch
Comment 4 Alex Christensen 2019-05-23 10:08:08 PDT
Comment on attachment 370480 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=370480&action=review

rs=me when this builds.

> Source/WebKit/ChangeLog:48
> +        * WebProcess/Cache/WebCacheStorageConnection.h:

It looks like you need to remove the declaration of WebCacheStorageConnection::didReceiveMessage and see what breaks and fix that.
Comment 5 youenn fablet 2019-05-23 10:58:30 PDT
Created attachment 370509 [details]
Patch for landing
Comment 6 WebKit Commit Bot 2019-05-23 14:15:40 PDT
Comment on attachment 370509 [details]
Patch for landing

Clearing flags on attachment: 370509

Committed r245715: <https://trac.webkit.org/changeset/245715>
Comment 7 WebKit Commit Bot 2019-05-23 14:15:42 PDT
All reviewed patches have been landed.  Closing bug.
Comment 8 Radar WebKit Bug Importer 2019-05-23 14:16:24 PDT
<rdar://problem/51082080>
Comment 9 Ryan Haddad 2019-05-23 16:39:36 PDT
This change broke a webkitpy test:

[5/1902] webkit.messages_unittest.ReceiverImplementationTest.test_receiver_implementations failed:
  Traceback (most recent call last):
    File "/Volumes/Data/slave/mojave-release-tests-wk2/build/Source/WebKit/Scripts/webkit/messages_unittest.py", line 393, in test_receiver_implementations
      _expected_superclass_receiver_implementation_file_name)
    File "/Volumes/Data/slave/mojave-release-tests-wk2/build/Source/WebKit/Scripts/webkit/messages_unittest.py", line 373, in assertImplementationEqual
      self.assertGeneratedFileContentsEqual(actual_file_contents, expected_file_name)
    File "/Volumes/Data/slave/mojave-release-tests-wk2/build/Source/WebKit/Scripts/webkit/messages_unittest.py", line 360, in assertGeneratedFileContentsEqual
      self.assertEquals(actual_line, expected_line_list[index])
  AssertionError: '        completionHandler(IPC::AsyncReplyError<uint64_t>::create());' != '        return;'
  
https://build.webkit.org/builders/Apple%20Mojave%20Release%20WK2%20%28Tests%29/builds/4289/steps/webkitpy-test/logs/stdio
Comment 10 youenn fablet 2019-05-23 22:30:06 PDT
(In reply to Ryan Haddad from comment #9)
> This change broke a webkitpy test:
> 
> [5/1902]
> webkit.messages_unittest.ReceiverImplementationTest.
> test_receiver_implementations failed:
>   Traceback (most recent call last):
>     File
> "/Volumes/Data/slave/mojave-release-tests-wk2/build/Source/WebKit/Scripts/
> webkit/messages_unittest.py", line 393, in test_receiver_implementations
>       _expected_superclass_receiver_implementation_file_name)
>     File
> "/Volumes/Data/slave/mojave-release-tests-wk2/build/Source/WebKit/Scripts/
> webkit/messages_unittest.py", line 373, in assertImplementationEqual
>       self.assertGeneratedFileContentsEqual(actual_file_contents,
> expected_file_name)
>     File
> "/Volumes/Data/slave/mojave-release-tests-wk2/build/Source/WebKit/Scripts/
> webkit/messages_unittest.py", line 360, in assertGeneratedFileContentsEqual
>       self.assertEquals(actual_line, expected_line_list[index])
>   AssertionError: '       
> completionHandler(IPC::AsyncReplyError<uint64_t>::create());' != '       
> return;'
>   
> https://build.webkit.org/builders/
> Apple%20Mojave%20Release%20WK2%20%28Tests%29/builds/4289/steps/webkitpy-test/
> logs/stdio

Filed bug 198214.