Commit 2b325d16 authored by Ben Smith's avatar Ben Smith Committed by Commit Bot

Remove use of goto in value-serializer.cc

See the comment here:
https://chromium-review.googlesource.com/c/v8/v8/+/719417/2/src/value-serializer.cc#496

BUG=v8:6895
R=clemensh@chromium.org

Change-Id: I89a6ba0986def1776ef3be9c72a2c5b6260b0c98
Reviewed-on: https://chromium-review.googlesource.com/730768Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
Commit-Queue: Ben Smith <binji@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48842}
parent 35614b72
......@@ -483,19 +483,17 @@ Maybe<bool> ValueSerializer::WriteJSReceiver(Handle<JSReceiver> receiver) {
// Only write WebAssembly modules if not disabled by a flag.
return WriteWasmModule(Handle<WasmModuleObject>::cast(receiver));
}
goto error;
break;
case WASM_MEMORY_TYPE:
if (FLAG_experimental_wasm_threads) {
// Only write WebAssembly modules if not disabled by a flag.
return WriteWasmMemory(Handle<WasmMemoryObject>::cast(receiver));
}
goto error;
error:
break;
default:
ThrowDataCloneError(MessageTemplate::kDataCloneError, receiver);
return Nothing<bool>();
break;
}
ThrowDataCloneError(MessageTemplate::kDataCloneError, receiver);
return Nothing<bool>();
}
......
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