mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 06:43:32 +00:00
Bug 1910206 - chore(webgpu): warn on use of deprecated GPUAdapter.requestAdapterInfo
r=webgpu-reviewers,jgilbert
@jimb and I thought this would be an important signal for users while we wait to land D222065. Differential Revision: https://phabricator.services.mozilla.com/D222336
This commit is contained in:
parent
a365040bcc
commit
6d717fde3f
@ -494,6 +494,13 @@ already_AddRefed<dom::Promise> Adapter::RequestDevice(
|
||||
|
||||
already_AddRefed<dom::Promise> Adapter::RequestAdapterInfo(
|
||||
const dom::Sequence<nsString>& /*aUnmaskHints*/, ErrorResult& aRv) const {
|
||||
dom::AutoJSAPI api;
|
||||
if (api.Init(GetParentObject())) {
|
||||
JS::WarnUTF8(api.cx(),
|
||||
"`GPUAdapter.requestAdapterInfo()` is deprecated. "
|
||||
"Please use `GPUAdapter.info` instead.");
|
||||
}
|
||||
|
||||
RefPtr<dom::Promise> promise = dom::Promise::Create(GetParentObject(), aRv);
|
||||
if (!promise) return nullptr;
|
||||
|
||||
|
@ -1 +1,2 @@
|
||||
[cts.https.html?q=webgpu:api,operation,adapter,info:adapter_info:*]
|
||||
[:]
|
||||
|
Loading…
Reference in New Issue
Block a user