Commit 25cd6f26 authored by legendecas's avatar legendecas Committed by V8 LUCI CQ

[api] Inline ScriptOrigin methods as declaration

These methods were declared as inlined functions but the implementation
were moved to api.cc.

Change-Id: I49071aca9c94e52930c362e85206dbda402ab29b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3308375Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78148}
parent aadb1c97
......@@ -11,6 +11,7 @@
#include "v8-local-handle.h" // NOLINT(build/include_directory)
#include "v8-maybe.h" // NOLINT(build/include_directory)
#include "v8-primitive.h" // NOLINT(build/include_directory)
#include "v8config.h" // NOLINT(build/include_directory)
namespace v8 {
......@@ -227,6 +228,18 @@ class V8_EXPORT Message {
Local<Value> ScriptOrigin::ResourceName() const { return resource_name_; }
Local<Integer> ScriptOrigin::ResourceLineOffset() const {
return v8::Integer::New(isolate_, resource_line_offset_);
}
Local<Integer> ScriptOrigin::ResourceColumnOffset() const {
return v8::Integer::New(isolate_, resource_column_offset_);
}
Local<Integer> ScriptOrigin::ScriptID() const {
return v8::Integer::New(isolate_, script_id_);
}
Local<Data> ScriptOrigin::GetHostDefinedOptions() const {
return host_defined_options_;
}
......
......@@ -219,18 +219,6 @@ ScriptOrigin::ScriptOrigin(Local<Value> resource_name, int line_offset,
source_map_url_(source_map_url),
host_defined_options_(host_defined_options) {}
Local<Integer> ScriptOrigin::ResourceLineOffset() const {
return v8::Integer::New(isolate_, resource_line_offset_);
}
Local<Integer> ScriptOrigin::ResourceColumnOffset() const {
return v8::Integer::New(isolate_, resource_column_offset_);
}
Local<Integer> ScriptOrigin::ScriptID() const {
return v8::Integer::New(isolate_, script_id_);
}
Local<PrimitiveArray> ScriptOrigin::HostDefinedOptions() const {
// TODO(cbruni, chromium:1244145): remove once migrated to the context.
Utils::ApiCheck(!host_defined_options_->IsFixedArray(),
......
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