Commit 6a95fb6b authored by Pengyu Chen's avatar Pengyu Chen Committed by Commit Bot

[objects] Declaring SFI::get_api_func_data as const

The method has been non-const since initially introduced in de070ccf.
Here's a minor change to make it const, for it may/shall be, for other
similar methods are, and for making it easier for future changes
(accessing this method in another const method, etc.).

Change-Id: I3449214fc086403fc9b24b6f502ca20ac0b1426a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2055123Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66270}
parent 9001b90f
......@@ -432,7 +432,7 @@ bool SharedFunctionInfo::IsApiFunction() const {
return function_data().IsFunctionTemplateInfo();
}
FunctionTemplateInfo SharedFunctionInfo::get_api_func_data() {
FunctionTemplateInfo SharedFunctionInfo::get_api_func_data() const {
DCHECK(IsApiFunction());
return FunctionTemplateInfo::cast(function_data());
}
......
......@@ -309,7 +309,7 @@ class SharedFunctionInfo : public HeapObject {
inline bool IsApiFunction() const;
inline bool is_class_constructor() const;
inline FunctionTemplateInfo get_api_func_data();
inline FunctionTemplateInfo get_api_func_data() const;
inline void set_api_func_data(FunctionTemplateInfo data);
inline bool HasBytecodeArray() const;
inline BytecodeArray GetBytecodeArray() const;
......
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