Commit 6165fef8 authored by Benedikt Meurer's avatar Benedikt Meurer Committed by Commit Bot

[api] Remove previously deprecated Function::GetDisplayName().

The method was scheduled for removal in M92, as finaly part of the
fn.displayName support removal.

Fixed: chromium:1177685
Doc: https://bit.ly/devtools-function-displayName-removal
Change-Id: I243dd6c9849a6f39e76dd003300b639bfd8df604
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2821954
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73930}
parent 670be6ae
...@@ -4772,17 +4772,6 @@ class V8_EXPORT Function : public Object { ...@@ -4772,17 +4772,6 @@ class V8_EXPORT Function : public Object {
*/ */
Local<Value> GetDebugName() const; Local<Value> GetDebugName() const;
/**
* User-defined name assigned to the "displayName" property of this function.
* Used to facilitate debugging and profiling of JavaScript code.
*/
V8_DEPRECATED(
"Use v8::Object::Get() instead to look up \"displayName\". "
"V8 and DevTools no longer use \"displayName\" in stack "
"traces, but the standard \"name\" property. "
"See http://crbug.com/1177685.")
Local<Value> GetDisplayName() const;
/** /**
* Returns zero based line number of function body and * Returns zero based line number of function body and
* kLineOffsetNotFound if no information available. * kLineOffsetNotFound if no information available.
......
...@@ -5043,25 +5043,6 @@ Local<Value> Function::GetDebugName() const { ...@@ -5043,25 +5043,6 @@ Local<Value> Function::GetDebugName() const {
return Utils::ToLocal(i::Handle<i::Object>(*name, self->GetIsolate())); return Utils::ToLocal(i::Handle<i::Object>(*name, self->GetIsolate()));
} }
Local<Value> Function::GetDisplayName() const {
auto self = Utils::OpenHandle(this);
i::Isolate* isolate = self->GetIsolate();
ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate);
if (!self->IsJSFunction()) {
return ToApiHandle<Primitive>(isolate->factory()->undefined_value());
}
auto func = i::Handle<i::JSFunction>::cast(self);
i::Handle<i::String> property_name =
isolate->factory()->InternalizeString(i::StaticCharVector("displayName"));
i::Handle<i::Object> value =
i::JSReceiver::GetDataProperty(func, property_name);
if (value->IsString()) {
i::Handle<i::String> name = i::Handle<i::String>::cast(value);
if (name->length() > 0) return Utils::ToLocal(name);
}
return ToApiHandle<Primitive>(isolate->factory()->undefined_value());
}
ScriptOrigin Function::GetScriptOrigin() const { ScriptOrigin Function::GetScriptOrigin() const {
auto self = Utils::OpenHandle(this); auto self = Utils::OpenHandle(this);
auto isolate = reinterpret_cast<v8::Isolate*>(self->GetIsolate()); auto isolate = reinterpret_cast<v8::Isolate*>(self->GetIsolate());
......
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