WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
46117
Add a way to delay sending replies to sync requests
https://bugs.webkit.org/show_bug.cgi?id=46117
Summary
Add a way to delay sending replies to sync requests
Anders Carlsson
Reported
2010-09-20 13:10:52 PDT
Add a way to delay sending replies to sync requests
Attachments
Patch
(8.82 KB, patch)
2010-09-20 13:19 PDT
,
Anders Carlsson
aroben
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Anders Carlsson
Comment 1
2010-09-20 13:19:12 PDT
Created
attachment 68129
[details]
Patch
Adam Roben (:aroben)
Comment 2
2010-09-20 14:02:36 PDT
Comment on
attachment 68129
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=68129&action=review
> WebKit2/Platform/CoreIPC/Connection.cpp:276 > - OwnPtr<ArgumentEncoder> replyEncoder(new ArgumentEncoder(syncRequestID)); > + ArgumentEncoder* replyEncoder = new ArgumentEncoder(syncRequestID); > > // Hand off both the decoder and encoder to the client.. > - m_client->didReceiveSyncMessage(this, message.messageID(), arguments.get(), replyEncoder.get()); > + SyncReplyMode syncReplyMode = m_client->didReceiveSyncMessage(this, message.messageID(), arguments.get(), replyEncoder); > > // FIXME: If the message was invalid, we should send back a SyncMessageError. > ASSERT(!arguments->isInvalid()); > > - // Send the reply. > - sendMessage(MessageID(CoreIPCMessage::SyncMessageReply), replyEncoder.release()); > + if (syncReplyMode == AutomaticReply) { > + // Send the reply. > + sendSyncReply(replyEncoder); > + } else { > + // The client will take ownership of the reply encoder and send it at some point in the future. > + // We won't do anything here. > + }
Another option is to continue to use OwnPtr, and then call leakPtr in the ManualReply case. Yet another option is to use a bare pointer, but wrap the call to new in adoptPtr/leakPtr.
Anders Carlsson
Comment 3
2010-09-20 16:27:32 PDT
Committed
r67891
: <
http://trac.webkit.org/changeset/67891
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug