Commit 0ed000d1 authored by jgruber's avatar jgruber Committed by Commit Bot

[builtins] Set lazy_deserialization_builtin_id in api.cc

debug::GetBuiltin creates a new JSFunction and constructs a new SFI at
runtime. Ensure that this SFI has the correct builtin_id set.

Bug: v8:6624,v8:6788
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: I25da2ad5e69478f81042d3e3bf7e7e2644e7050d
Reviewed-on: https://chromium-review.googlesource.com/654643Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47883}
parent 1eabc93f
......@@ -10011,6 +10011,9 @@ Local<Function> debug::GetBuiltin(Isolate* v8_isolate, Builtin builtin) {
i::Handle<i::JSFunction> fun =
isolate->factory()->NewFunctionWithoutPrototype(
isolate->factory()->empty_string(), call_code, i::SLOPPY);
if (i::Builtins::IsLazy(name)) {
fun->shared()->set_lazy_deserialization_builtin_id(name);
}
fun->shared()->DontAdaptArguments();
return Utils::ToLocal(handle_scope.CloseAndEscape(fun));
}
......
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