[d8] Fix parameter check in setOneShotOnProfileEndListener
R=clemensb@chromium.org Bug: chromium:1394713 Change-Id: Iac3ade3e422dcf50584c1c056407ca44e7d4ab25 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4068125 Commit-Queue: Andreas Haas <ahaas@chromium.org> Reviewed-by: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/main@{#84591}
This commit is contained in:
parent
224cbd2179
commit
385687eabe
@ -2517,6 +2517,7 @@ void Shell::ProfilerSetOnProfileEndListener(
|
||||
HandleScope handle_scope(isolate);
|
||||
if (!args[0]->IsFunction()) {
|
||||
isolate->ThrowError("The OnProfileEnd listener has to be a function");
|
||||
return;
|
||||
}
|
||||
profile_end_callback_.Reset(isolate, args[0].As<Function>());
|
||||
profile_end_callback_context_.Reset(isolate, isolate->GetCurrentContext());
|
||||
|
Loading…
Reference in New Issue
Block a user