Commit 0cb99460 authored by Austin Eng's avatar Austin Eng Committed by Commit Bot

[WebGPU] Fixing ScriptValue::CreateNull crash in OnPopErrorScopeCallback

Recent changes in Blink caused this to start crashing. Directly using
v8::Null instead of ScriptValue::CreateNull fixes the issue. It looks like
is related to crbug.com/1008765 where it's no longer value to create a Null
ScriptValue when the value is no longer "in context".

This CL applies a small fix for the crash so we can roll the WebGPU CTS and
prevent further regressions.

Bug: 1009635
Change-Id: I4d4de6b499b05bb1833ec34128239ca135692378
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1830283
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: default avatarKai Ninomiya <kainino@chromium.org>
Cr-Commit-Position: refs/heads/master@{#701278}
parent a4cf2688
......@@ -247,7 +247,7 @@ void GPUDevice::OnPopErrorScopeCallback(ScriptPromiseResolver* resolver,
v8::Isolate* isolate = resolver->GetScriptState()->GetIsolate();
switch (type) {
case DAWN_ERROR_TYPE_NO_ERROR:
resolver->Resolve(ScriptValue::CreateNull(isolate));
resolver->Resolve(v8::Null(isolate));
break;
case DAWN_ERROR_TYPE_OUT_OF_MEMORY:
resolver->Resolve(GPUOutOfMemoryError::Create());
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment