Bug 57718

Summary: didFailToSendSyncMessage should not be a client call
Product: WebKit Reporter: Alexey Proskuryakov <ap>
Component: WebKit2Assignee: Alexey Proskuryakov <ap>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: andersca, sam
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
proposed patch andersca: review-

Description Alexey Proskuryakov 2011-04-02 22:12:04 PDT
didFailToSendSyncMessage exists to guarantee that a sync call in a client process never returns null, which is important because client code is unlikely to handle such a return properly.

But it's a client call, and client pointer can be null, so the code has become nonsensical after having been introduced.
Comment 1 Alexey Proskuryakov 2011-04-02 22:17:12 PDT
Created attachment 87995 [details]
proposed patch
Comment 2 Eric Seidel (no email) 2011-04-03 22:21:02 PDT
Comment on attachment 87995 [details]
proposed patch

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

> Source/WebKit2/Platform/CoreIPC/Connection.cpp:422
> +        exit(0);

Funny that this error condition exits 0.  I guess that's to mean that the process intended to end itself?
Comment 3 Alexey Proskuryakov 2011-04-03 22:37:37 PDT
Comment on attachment 87995 [details]
proposed patch

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

>> Source/WebKit2/Platform/CoreIPC/Connection.cpp:422

> 
> Funny that this error condition exits 0.  I guess that's to mean that the process intended to end itself?

This is a fatal condition (most likely, the server process has exited already) - but if we return a super rare null result, we can crash instead if cleanly exiting a moment later.
Comment 4 Anders Carlsson 2011-04-04 14:25:37 PDT
We don't want all client connections to do this, so I think this should be a callback function on the connection instead.
Comment 5 Alexey Proskuryakov 2011-04-07 13:36:59 PDT
<rdar://problem/9251669>
Comment 6 Alexey Proskuryakov 2011-04-19 14:01:06 PDT
Anders landed this patch in another bug, with one difference being that we only set the flag on Web to UI process connection.

*** This bug has been marked as a duplicate of bug 58923 ***