mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-22 20:45:14 +00:00
LibJS: Use u32 instead of size_t for bytecode instruction array sizes
Instructions that have an embedded tail array are not going to have more than 2^32 elements in any remotely sane situation.
This commit is contained in:
parent
42cc481091
commit
70411a117b
Notes:
github-actions[bot]
2025-04-06 00:06:26 +00:00
Author: https://github.com/awesomekling Commit: https://github.com/LadybirdBrowser/ladybird/commit/70411a117b8 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4243
1 changed files with 4 additions and 4 deletions
|
@ -322,7 +322,7 @@ public:
|
|||
private:
|
||||
Operand m_dst;
|
||||
Operand m_from_object;
|
||||
size_t m_excluded_names_count { 0 };
|
||||
u32 m_excluded_names_count { 0 };
|
||||
Operand m_excluded_names[];
|
||||
};
|
||||
|
||||
|
@ -367,7 +367,7 @@ public:
|
|||
|
||||
private:
|
||||
Operand m_dst;
|
||||
size_t m_element_count { 0 };
|
||||
u32 m_element_count { 0 };
|
||||
Operand m_elements[];
|
||||
};
|
||||
|
||||
|
@ -401,7 +401,7 @@ public:
|
|||
|
||||
private:
|
||||
Operand m_dst;
|
||||
size_t m_element_count { 0 };
|
||||
u32 m_element_count { 0 };
|
||||
Value m_elements[];
|
||||
};
|
||||
|
||||
|
@ -2105,7 +2105,7 @@ private:
|
|||
Optional<Operand> m_super_class;
|
||||
ClassExpression const& m_class_expression;
|
||||
Optional<IdentifierTableIndex> m_lhs_name;
|
||||
size_t m_element_keys_count { 0 };
|
||||
u32 m_element_keys_count { 0 };
|
||||
Optional<Operand> m_element_keys[];
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue