chore(macros/AvailableinWorkers): add last 5 possible cases #11907
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Problem
the
Performance.measureUserAgentSpecificMemory()
is only expose to Window, SharedWorker and ServiceWorker (see https://wicg.github.io/performance-measure-memory/ and https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/timing/performance.idl;l=72?q=performance.idl), but currently the macros does not support this casepreviously another case is just added, I think simply add all left cases together in one PR to avoid more edit to this macros in the future
see mdn/content#36060 (comment) for the research
total is 16 cases, 9 cases included yet, 2 cases omited (not handled by this macros), and this is 5 cases left here
these are window_and_worker_except_dedicated, worker_except_shared, worker_except_dedicated, window_and_shared, shared
previous work include: #11888, #10968, #10029 (#10009)
Also adjust cases order to make it more clear and organized.
zh-CN translation included yet, /cc @yin1999 @JasonLamv-t @jasonren0403
Solution
same as title
Screenshots
Before
None.
After
How did you test this change?
included the macro call with new arguments in a page locally and watch the develop preview and observe the terminal output