Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Symbol finalzer and description getter methods #1297

Merged
merged 2 commits into from
Jan 10, 2024

Conversation

clover2123
Copy link
Contributor

No description provided.

Copy link
Contributor

@zherczeg zherczeg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some minor things.

// If description is undefined, let descString be undefined.
if (!(argc == 0 || argv[0].isUndefined())) {
// NOTE) we represent `undefined` as nullptr here
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo: (NOTE)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the review. fixed it.

{
// nullptr of desc represents `undefined`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would add this comment to the member

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix it too

{
return m_description;
ASSERT(!!m_finalizerData);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see a hasFinalizerData, is there a way to check this somehow?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This removeFinalizer will be called when it has a valid data by GC (it is guaranteed)


for (size_t i = 0; i < list.size(); i++) {
// If SameValue(e.[[Symbol]], sym) is true, return e.[[Key]].
if (list[i].symbol == sym) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it is defined in the specification, but is it true that always maximum of one result is possible?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, only one unique Symbol (with each Symbol description) will be registered according to the spec.

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
@ksh8281 ksh8281 merged commit ca43b39 into Samsung:master Jan 10, 2024
27 checks passed
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.

3 participants