Mark EventDispatcher::DispatchDOMEvent as MOZ_CAN_RUN_SCRIPT
Categories
(Core :: DOM: Events, task)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox97 | --- | fixed |
People
(Reporter: saschanaz, Assigned: saschanaz)
References
(Blocks 1 open bug)
Details
Attachments
(6 files)
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review |
Since it also clearly can.
| Assignee | ||
Comment 1•4 years ago
|
||
Updated•4 years ago
|
| Assignee | ||
Comment 2•4 years ago
|
||
Depends on D133360
| Assignee | ||
Comment 3•4 years ago
|
||
Depends on D133361
| Assignee | ||
Comment 4•4 years ago
|
||
Depends on D133362
| Assignee | ||
Comment 5•4 years ago
|
||
Depends on D133363
| Assignee | ||
Comment 6•4 years ago
|
||
Depends on D133364
Comment 7•4 years ago
|
||
Can we please make sure to follow https://searchfox.org/mozilla-central/rev/4ca2f73ae9346709d39de2c8fe33874e4203b9e6/mfbt/Attributes.h#499-501
Comment 8•4 years ago
•
|
||
(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.
Comment 10•4 years ago
|
||
(In reply to Masayuki Nakano [:masayuki] (he/him)(JST, +0900) from comment #8)
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_SCRIPTor its variant because if you're now marking methods as so, you obviously know which call(s) requires the attribute.
I think the main point is that MOZ_CAN_RUN_SCRIPT_BOUNDARY opts us out of the checking that MOZ_CAN_RUN_SCRIPT gives, and so it should be the exception rather than the norm. Boris specifically added documentation to make sure that we don't go down the path of opting out without a plan to remove the opt-out, because that defeats the purpose. Hence the demand for a plan for removal of any new usage of MOZ_CAN_RUN_SCRIPT_BOUNDARY (see https://searchfox.org/mozilla-central/rev/4ca2f73ae9346709d39de2c8fe33874e4203b9e6/mfbt/Attributes.h#486-498), and the comment to document that plan so we know what to do in the future. Note that this is about MOZ_CAN_RUN_SCRIPT_BOUNDARY only, not about usage of MOZ_CAN_RUN_SCRIPT.
Comment 11•4 years ago
|
||
Comment 12•4 years ago
|
||
Ah, I see. Thank you for your explanation (I'm going to go to bed...)
Comment 13•4 years ago
|
||
Comment 14•4 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/a80f721def5b
https://hg.mozilla.org/mozilla-central/rev/08fb162e95bc
https://hg.mozilla.org/mozilla-central/rev/99f19fbc0f57
https://hg.mozilla.org/mozilla-central/rev/97eeec406ee0
https://hg.mozilla.org/mozilla-central/rev/4ecdd4f7a95f
https://hg.mozilla.org/mozilla-central/rev/191c50bba814
Description
•