(In reply to Peter Van der Beken [:peterv] from comment #7) > Can we please make sure to follow https://searchfox.org/mozilla-central/rev/4ca2f73ae9346709d39de2c8fe33874e4203b9e6/mfbt/Attributes.h#499-501 Hmm, about the former, it's the best for all readers of our code, but it's hard to add comment that which causes the `MOZ_CAN_RUN_SCRIPT` or its variant because if you're now marking methods as so, you obviously know which call(s) requires the attribute. On the other hand, if you **touch** methods which are marked as `MOZ_CAN_RUN_SCRIPT`. Additionally, there are only a couple of scenarios why `MOZ_CAN_RUN_SCRIPT_BOUNDARY` is used instead of `MOZ_CAN_RUN_SCRIPT`. E.g., it's a override of a virtual method which is used globally, or there are too much callers to mark its callers in the bug. So I think that there should be `MOZ_CAN_RUN_SCRIPT_BOUNDARY_DUE_TO_*` if the reason is important.
Bug 1743439 Comment 8 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
(In reply to Peter Van der Beken [:peterv] from comment #7) > Can we please make sure to follow https://searchfox.org/mozilla-central/rev/4ca2f73ae9346709d39de2c8fe33874e4203b9e6/mfbt/Attributes.h#499-501 Hmm, about the former, it's the best for all readers of our code, but it's hard to add comment that which causes the `MOZ_CAN_RUN_SCRIPT` or its variant because if you're now marking methods as so, you obviously know which call(s) requires the attribute. On the other hand, if you **touch** methods which are marked as `MOZ_CAN_RUN_SCRIPT`, it's hard to modify the comment. Additionally, there are only a couple of scenarios why `MOZ_CAN_RUN_SCRIPT_BOUNDARY` is used instead of `MOZ_CAN_RUN_SCRIPT`. E.g., it's a override of a virtual method which is used globally, or there are too much callers to mark its callers in the bug. So I think that there should be `MOZ_CAN_RUN_SCRIPT_BOUNDARY_DUE_TO_*` if the reason is important.
(In reply to Peter Van der Beken [:peterv] from comment #7) > Can we please make sure to follow https://searchfox.org/mozilla-central/rev/4ca2f73ae9346709d39de2c8fe33874e4203b9e6/mfbt/Attributes.h#499-501 Hmm, about the former, it's the best for all readers of our code, but it's hard to add comment that which causes the `MOZ_CAN_RUN_SCRIPT` or its variant because if you're now marking methods as so, you obviously know which call(s) requires the attribute. On the other hand, if you **touch** methods which are marked as `MOZ_CAN_RUN_SCRIPT`, it's hard to modify the comment (especially for that reviewers won't realize that it's already been marked, but adding new call). Additionally, there are only a couple of scenarios why `MOZ_CAN_RUN_SCRIPT_BOUNDARY` is used instead of `MOZ_CAN_RUN_SCRIPT`. E.g., it's a override of a virtual method which is used globally, or there are too much callers to mark its callers in the bug. So I think that there should be `MOZ_CAN_RUN_SCRIPT_BOUNDARY_DUE_TO_*` if the reason is important.