Page MenuHomePhabricator

Bug 1689499 - Replace GetAsyncCycleRoot with [[CycleRoot]] field;r=jorendorff
ClosedPublic

Authored by yulia on Feb 2 2021, 7:29 PM.
Referenced Files
Unknown Object (File)
Tue, Sep 1, 10:12 PM
Unknown Object (File)
Aug 11 2026, 1:00 PM
Unknown Object (File)
Aug 5 2026, 12:04 PM
Unknown Object (File)
Jul 23 2026, 7:28 AM
Unknown Object (File)
Jul 23 2026, 2:38 AM
Unknown Object (File)
Jul 17 2026, 11:17 PM
Unknown Object (File)
Jul 17 2026, 11:17 PM
Unknown Object (File)
Jul 17 2026, 1:49 PM
Subscribers

Event Timeline

phab-bot published this revision for review.Feb 2 2021, 7:29 PM
phab-bot changed the visibility from "Custom Policy" to "Public (No Login Required)".
phab-bot changed the edit policy from "Custom Policy" to "Restricted Project (Project)".
phab-bot removed a project: secure-revision.

Code analysis found 2 defects in the diff 394087:

  • 2 defects found by clang-format

You can run this analysis locally with:

  • ./mach clang-format -s -p js/src/vm/SelfHosting.cpp js/src/builtin/ModuleObject.h (C/C++)

For your convenience, here is a patch that fixes all the clang-format defects (use it in your repository with hg import or git apply -p0).

If you see a problem in this automated review, please report it here.

You can view these defects on the code-review frontend and on Treeherder.

yulia edited the summary of this revision. (Show Details)

Code analysis found 1 defect in the diff 395892:

  • 1 defect found by clang-format

You can run this analysis locally with:

  • ./mach clang-format -s -p js/src/vm/SelfHosting.cpp (C/C++)

For your convenience, here is a patch that fixes all the clang-format defects (use it in your repository with hg import or git apply -p0).

If you see a problem in this automated review, please report it here.

You can view these defects on the code-review frontend and on Treeherder.

A test is in a prior patch.

js/src/builtin/ModuleObject.cpp
1041

This is undefined behavior if the slot was not previously set.

The proposal doesn't make it clear that [[CycleRoot]] is always set when a module becomes evaluated, or what other criterion, if any, establishes that [[CycleRoot]] has been set. If it did, the assertion inside .toObject() would be enough for me.

But since I can't tell what's going on, please MOZ_RELEASE_ASSERT here that the slot value .isObject(). Defensive coding.

This revision is now accepted and ready to land.Feb 18 2021, 5:54 PM
This revision is now accepted and ready to land.Feb 22 2021, 10:15 AM
This revision is now accepted and ready to land.Feb 24 2021, 5:57 PM