diff options
Diffstat (limited to 'chromium/third_party/dawn/src/dawn_native/EncodingContext.cpp')
-rw-r--r-- | chromium/third_party/dawn/src/dawn_native/EncodingContext.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/chromium/third_party/dawn/src/dawn_native/EncodingContext.cpp b/chromium/third_party/dawn/src/dawn_native/EncodingContext.cpp index d2c8a751a98..121a890992d 100644 --- a/chromium/third_party/dawn/src/dawn_native/EncodingContext.cpp +++ b/chromium/third_party/dawn/src/dawn_native/EncodingContext.cpp @@ -45,7 +45,7 @@ namespace dawn_native { return &mIterator; } - void EncodingContext::HandleError(const char* message) { + void EncodingContext::HandleError(dawn::ErrorType type, const char* message) { if (!IsFinished()) { // If the encoding context is not finished, errors are deferred until // Finish() is called. @@ -54,7 +54,7 @@ namespace dawn_native { mErrorMessage = message; } } else { - mDevice->HandleError(message); + mDevice->HandleError(type, message); } } @@ -76,6 +76,10 @@ namespace dawn_native { } MaybeError EncodingContext::Finish() { + if (IsFinished()) { + return DAWN_VALIDATION_ERROR("Command encoding already finished"); + } + const void* currentEncoder = mCurrentEncoder; const void* topLevelEncoder = mTopLevelEncoder; |