Remove note about sharing data between platform sensors #482
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.
The original note was added in #267 and expanded in #347, but its advice is
impractical:
contexts/documents/windows means these Sensor objects could potentially be
shared by contexts in different top-level traversables (i.e. different
tabs).
Furthermore, if "can expose sensor readings" passes for one context but
not the other, "update sensor reading" would still invoke "report latest
reading updated" with sensors that cannot expose sensor readings.
an update would affect all contexts, including those for which "update
sensor reading" should not have been invoked in the first place (e.g. two
pages with the same origin share the latest readings map, but only one is
visible; updates to the latest reading map would be accessible from the
other as well).
PR #267 also made the "platform sensor" concept used in this section
per-browsing context (although in a very confusing way), which on its own is
a stricter requirement than what the note allowed, so we can drop the note
without making things less secure.
Incidentally, this also gets rid of one of the usages of "browsing context"
in the spec, which helps with #444.
Preview | Diff