Commit 426233a1 authored by Leszek Swirski's avatar Leszek Swirski Committed by V8 LUCI CQ

[counter] Add use counts for f.arguments and .caller

Change-Id: I29b48de9e0f6d6db5fba50d4a081656d869d9892
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3506309
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: 's avatarShu-yu Guo <syg@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79389}
parent f43f8a0b
......@@ -529,6 +529,8 @@ class V8_EXPORT Isolate {
kWasmMultiValue = 110,
kWasmExceptionHandling = 111,
kInvalidatedMegaDOMProtector = 112,
kFunctionPrototypeArguments = 113,
kFunctionPrototypeCaller = 114,
// If you add new values here, you'll also need to update Chromium's:
// web_feature.mojom, use_counter_callback.cc, and enums.xml. V8 changes to
......
......@@ -516,6 +516,7 @@ Handle<JSObject> Accessors::FunctionGetArguments(JavaScriptFrame* frame,
void Accessors::FunctionArgumentsGetter(
v8::Local<v8::Name> name, const v8::PropertyCallbackInfo<v8::Value>& info) {
i::Isolate* isolate = reinterpret_cast<i::Isolate*>(info.GetIsolate());
isolate->CountUsage(v8::Isolate::kFunctionPrototypeArguments);
HandleScope scope(isolate);
Handle<JSFunction> function =
Handle<JSFunction>::cast(Utils::OpenHandle(*info.Holder()));
......@@ -690,6 +691,7 @@ MaybeHandle<JSFunction> FindCaller(Isolate* isolate,
void Accessors::FunctionCallerGetter(
v8::Local<v8::Name> name, const v8::PropertyCallbackInfo<v8::Value>& info) {
i::Isolate* isolate = reinterpret_cast<i::Isolate*>(info.GetIsolate());
isolate->CountUsage(v8::Isolate::kFunctionPrototypeCaller);
HandleScope scope(isolate);
Handle<JSFunction> function =
Handle<JSFunction>::cast(Utils::OpenHandle(*info.Holder()));
......
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