mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 15:28:11 +00:00
LibWeb: Use inline script tag source line as javascript line offset
This makes JS exception line numbers meaningful for inline script tags.
This commit is contained in:
parent
47d0d9fd65
commit
c575710e5e
7 changed files with 12 additions and 7 deletions
|
@ -25,7 +25,7 @@ public:
|
|||
};
|
||||
|
||||
~Script();
|
||||
static Result<NonnullRefPtr<Script>, Vector<Parser::Error>> parse(StringView source_text, Realm&, StringView filename = {}, HostDefined* = nullptr);
|
||||
static Result<NonnullRefPtr<Script>, Vector<Parser::Error>> parse(StringView source_text, Realm&, StringView filename = {}, HostDefined* = nullptr, size_t line_number_offset = 1);
|
||||
|
||||
Realm& realm() { return *m_realm.cell(); }
|
||||
Program const& parse_node() const { return *m_parse_node; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue