-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deploying to gh-pages from @ 36626bf 🚀
- Loading branch information
Showing
7 changed files
with
131 additions
and
32 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
/* [email protected].4, license MIT */ | ||
/* [email protected].5, license MIT */ | ||
(function (factory) { | ||
typeof define === 'function' && define.amd ? define(factory) : | ||
factory(); | ||
|
@@ -19,11 +19,13 @@ | |
const currentErrorScope = errorScopeStack.findLast(scope => scope.filter === 'validation'); | ||
const promise = origPopErrorScope.call(device) | ||
.then(error => { | ||
// If there was a currentErrorScope when we added pushed then remove our promise | ||
// If there was a currentErrorScope and there was no error the remove our promise. | ||
if (currentErrorScope) { | ||
const ndx = currentErrorScope.errors.indexOf(promise); | ||
if (ndx) { | ||
currentErrorScope.errors.splice(ndx, 1); | ||
if (!error) { | ||
const ndx = currentErrorScope.errors.indexOf(promise); | ||
if (ndx) { | ||
currentErrorScope.errors.splice(ndx, 1); | ||
} | ||
} | ||
} | ||
else { | ||
|
@@ -92,7 +94,10 @@ | |
throw new DOMException('popErrorScope called on empty error scope stack', 'OperationError'); | ||
} | ||
const errPromise = origFn.call(this); | ||
return errorScope.errors.pop() ?? errPromise; | ||
errorScope.errors.push(errPromise); | ||
const errors = await Promise.all(errorScope.errors); | ||
const error = errors.find(v => !!v); | ||
return error ?? null; | ||
}; | ||
})(GPUDevice.prototype.popErrorScope); | ||
GPUAdapter.prototype.requestDevice = (function (origFn) { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters