Skip to content

Move Map hash seed to runtime - #1716

Open
yanjiew1 wants to merge 1 commit into
quickjs-ng:masterfrom
yanjiew1:hash_seed
Open

Move Map hash seed to runtime#1716
yanjiew1 wants to merge 1 commit into
quickjs-ng:masterfrom
yanjiew1:hash_seed

Conversation

@yanjiew1

@yanjiew1 yanjiew1 commented Sep 7, 2026

Copy link
Copy Markdown

Map and Set objects can be accessed from a context other than the one that created them. With a per-context hash seed, insertion and lookup may select different buckets.

Store the seed on JSRuntime so every context sharing these objects uses the same hash seed.

Map and Set objects can be accessed from a context other than the
one that created them. With a per-context hash seed, insertion and
lookup may select different buckets.

Store the seed on JSRuntime so every context sharing these objects
uses the same hash seed.

Signed-off-by: Yan-Jie Wang <yanjiewtw@gmail.com>
@bnoordhuis

Copy link
Copy Markdown
Contributor

What does this fix?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants