Rename DeviceErrorCallback to ErrorCallback and add ErrorType arg

This same callback will be used for push/pop error scope.

Bug: dawn:153
Change-Id: I2771539e13f8a4e6a59f13c8082689d25ba44905
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/10460
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
This commit is contained in:
Austin Eng
2019-08-27 21:41:56 +00:00
committed by Commit Bot service account
parent 5603dc9044
commit cb0cb658d4
36 changed files with 173 additions and 90 deletions

View File

@@ -16,13 +16,14 @@
namespace dawn_wire { namespace server {
void Server::ForwardDeviceError(const char* message, void* userdata) {
void Server::ForwardDeviceError(DawnErrorType type, const char* message, void* userdata) {
auto server = static_cast<Server*>(userdata);
server->OnDeviceError(message);
server->OnDeviceError(type, message);
}
void Server::OnDeviceError(const char* message) {
void Server::OnDeviceError(DawnErrorType type, const char* message) {
ReturnDeviceErrorCallbackCmd cmd;
cmd.type = type;
cmd.message = message;
size_t requiredSize = cmd.GetRequiredSize();