Commit 89f28c88 authored by elijahtaylor's avatar elijahtaylor Committed by Commit bot

Fix callback access in Pepper's UDP socket resource

BUG=452249

Review URL: https://codereview.chromium.org/881203002

Cr-Commit-Position: refs/heads/master@{#313568}
parent 9daca048
...@@ -320,6 +320,11 @@ void UDPSocketResourceBase::OnPluginMsgPushRecvResult( ...@@ -320,6 +320,11 @@ void UDPSocketResourceBase::OnPluginMsgPushRecvResult(
void UDPSocketResourceBase::OnPluginMsgSendToReply( void UDPSocketResourceBase::OnPluginMsgSendToReply(
const ResourceMessageReplyParams& params, const ResourceMessageReplyParams& params,
int32_t bytes_written) { int32_t bytes_written) {
// This can be empty if the socket was closed, but there are still tasks
// to be posted for this resource.
if (sendto_callbacks_.empty())
return;
scoped_refptr<TrackedCallback> callback = sendto_callbacks_.front(); scoped_refptr<TrackedCallback> callback = sendto_callbacks_.front();
sendto_callbacks_.pop(); sendto_callbacks_.pop();
if (!TrackedCallback::IsPending(callback)) if (!TrackedCallback::IsPending(callback))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment