dawn_wire: Fix leak in Server::DoDevicePopErrorScope
Also fixes a uint64_t -> uint32_t narrowing conversion. Bug: chromium:1001045, dawn:153 Change-Id: I0f94d201884071325c7c5bb40a8c9c67c066e251 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/10980 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
parent
77f091ce46
commit
abec145b04
|
@ -36,7 +36,7 @@ namespace dawn_wire { namespace server {
|
|||
Server* server;
|
||||
// TODO(enga): ObjectHandle device;
|
||||
// when the wire supports multiple devices.
|
||||
uint32_t requestSerial;
|
||||
uint64_t requestSerial;
|
||||
};
|
||||
|
||||
struct FenceCompletionUserdata {
|
||||
|
|
|
@ -36,7 +36,11 @@ namespace dawn_wire { namespace server {
|
|||
userdata->server = this;
|
||||
userdata->requestSerial = requestSerial;
|
||||
|
||||
return mProcs.devicePopErrorScope(cDevice, ForwardPopErrorScope, userdata);
|
||||
bool success = mProcs.devicePopErrorScope(cDevice, ForwardPopErrorScope, userdata);
|
||||
if (!success) {
|
||||
delete userdata;
|
||||
}
|
||||
return success;
|
||||
}
|
||||
|
||||
// static
|
||||
|
|
Loading…
Reference in New Issue