mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 04:37:44 +00:00
LibJS+LibWeb: Add fast_is<DOM::Node> for JS::Object
Solves problem that is<DOM::Node, JS::Object>() is quite hot in profiles while loading https://www.postgresql.org/about/featurematrix/.
This commit is contained in:
parent
1470e60800
commit
6b191ab73d
2 changed files with 5 additions and 0 deletions
|
@ -84,6 +84,7 @@ public:
|
|||
|
||||
virtual bool is_editable() const;
|
||||
|
||||
virtual bool is_dom_node() const final { return true; }
|
||||
virtual bool is_html_element() const { return false; }
|
||||
virtual bool is_html_html_element() const { return false; }
|
||||
virtual bool is_html_anchor_element() const { return false; }
|
||||
|
@ -704,3 +705,6 @@ private:
|
|||
};
|
||||
|
||||
}
|
||||
|
||||
template<>
|
||||
inline bool JS::Object::fast_is<Web::DOM::Node>() const { return is_dom_node(); }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue