Fix cputracemark extension

If the type check fails, we should return. Otherwise we hit an error in
ToLocalChecked below.

R=yangguo@chromium.org

Bug: chromium:1061673
Change-Id: I39e5b90b3574d0d2b77f5d704023aabb1c8130cb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2116035
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66901}
This commit is contained in:
Clemens Backes 2020-03-24 08:35:55 +01:00 committed by Commit Bot
parent 540484445f
commit 85238bd778

View File

@ -19,6 +19,7 @@ void CpuTraceMarkExtension::Mark(
args.GetIsolate()->ThrowException(v8::String::NewFromUtf8Literal(
args.GetIsolate(),
"First parameter to cputracemark() must be a unsigned int32."));
return;
}
#if V8_HOST_ARCH_IA32 || V8_HOST_ARCH_X64