mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 13:19:05 +00:00
LibWeb: Avoid dynamic_cast in relevant_agent()
There's only ever one kind of JS::VM::CustomData in play anyway.
This commit is contained in:
parent
57809b1100
commit
ce263eaf78
Notes:
github-actions[bot]
2025-04-18 12:46:58 +00:00
Author: https://github.com/awesomekling
Commit: ce263eaf78
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4395
1 changed files with 1 additions and 1 deletions
|
@ -15,7 +15,7 @@ Agent& relevant_agent(JS::Object const& object)
|
||||||
{
|
{
|
||||||
// The relevant agent for a platform object platformObject is platformObject's relevant Realm's agent.
|
// The relevant agent for a platform object platformObject is platformObject's relevant Realm's agent.
|
||||||
// Spec Note: This pointer is not yet defined in the JavaScript specification; see tc39/ecma262#1357.
|
// Spec Note: This pointer is not yet defined in the JavaScript specification; see tc39/ecma262#1357.
|
||||||
return as<Bindings::WebEngineCustomData>(relevant_realm(object).vm().custom_data())->agent;
|
return static_cast<Bindings::WebEngineCustomData*>(relevant_realm(object).vm().custom_data())->agent;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue