mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 01:17:46 +00:00
LibWeb: Make HostDefined and Intrinsics free functions [[nodiscard]]
Hopefully no one else will forget to call set_prototype with the cached prototype they just retrieved from a realm and spend a long time wondering why their object has no properties...
This commit is contained in:
parent
2d5bee256e
commit
07b950d8a6
2 changed files with 5 additions and 5 deletions
|
@ -27,7 +27,7 @@ struct HostDefined : public JS::Realm::HostDefined {
|
|||
JS::NonnullGCPtr<Intrinsics> intrinsics;
|
||||
};
|
||||
|
||||
inline HTML::EnvironmentSettingsObject& host_defined_environment_settings_object(JS::Realm& realm)
|
||||
[[nodiscard]] inline HTML::EnvironmentSettingsObject& host_defined_environment_settings_object(JS::Realm& realm)
|
||||
{
|
||||
return *verify_cast<HostDefined>(realm.host_defined())->environment_settings_object;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue