Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dropped entries count processing logic #187

Merged
merged 3 commits into from
Aug 19, 2021
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
41 changes: 25 additions & 16 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,7 @@ <h2>The <dfn>PerformanceObserver</dfn> interface</h2>
</li>
<li>A <code>DOMString</code> <dfn>observer type</dfn> which is initially
<code>"undefined"</code>.</li>
<li>A boolean <dfn>requires dropped entries</dfn> which is initially set to false.</li>
</ul>
<p>The `PerformanceObserver(callback)` constructor must create a new
<a>PerformanceObserver</a> object with its <a>observer callback</a>
Expand Down Expand Up @@ -403,7 +404,8 @@ <h2><dfn>PerformanceObserverCallbackOptions</dfn> dictionary</h2>
<dl>
<dt><dfn>droppedEntriesCount</dfn></dt>
<dd>An integer representing the dropped entries count for the entry types that the
observer is observing when its callback is run.</dd>
observer is observing when the <a>PerformanceObserver</a>'s <a>requires dropped entries</a>
is set.</dd>
</dl>
</section>
<section>
Expand Down Expand Up @@ -448,6 +450,7 @@ <h2><dfn>observe()</dfn> method</h2>
</li>
</ol>
</li>
<li>Set <a>this</a>'s <a>requires dropped entries</a> to true.</li>
<li>If <a>this</a>'s <a>observer type</a> is
<code>"multiple"</code>, run the following steps:
<ol>
Expand Down Expand Up @@ -753,23 +756,29 @@ <h2>Queue the PerformanceObserver task</h2>
{{PerformanceObserverEntryList}}, with its <a>entry list</a> set
to <var>entries</var>.
</li>
<li>Let <var>droppedEntriesCount</var> be 0.</li>
<li>For each <a>PerformanceObserverInit</a> <var>item</var> in
<var>registeredObserver</var>'s <a>options list</a>:
<li>Let <var>droppedEntriesCount</var> be null.</li>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why "null"?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed! Null just means that we won't send that parameter.

<li>If <var>po</var>'s <a>requires dropped entries</a> is set, perform the following
steps:
<ol>
<li>For each <a data-cite="WEBIDL#idl-DOMString">DOMString</a>
<var>entryType</var> that appears either as <var>item</var>'s <a data-link-for=
"PerformanceObserverInit">type</a> or in <var>item</var>'s
<a data-link-for="PerformanceObserverInit">entryTypes</a>:
<ol>
<li>Let <var>map</var> be <var>relevantGlobal</var>'s <a>performance entry
buffer map</a>.</li>
<li>Let <var>tuple</var> be the result of <a>getting the value of entry</a>
on <var>map</var> given <var>entryType</var> as <a>key</a>.</li>
<li>Increase <var>droppedEntriesCount</var> by <var>tuple</var>'s
<a>dropped entries count</a>.</li>
</ol>
<li>For each <a>PerformanceObserverInit</a> <var>item</var> in
<var>registeredObserver</var>'s <a>options list</a>:
<ol>
<li>For each <a data-cite="WEBIDL#idl-DOMString">DOMString</a>
<var>entryType</var> that appears either as <var>item</var>'s <a data-link-for=
"PerformanceObserverInit">type</a> or in <var>item</var>'s
<a data-link-for="PerformanceObserverInit">entryTypes</a>:
<ol>
<li>Let <var>map</var> be <var>relevantGlobal</var>'s <a>performance entry
buffer map</a>.</li>
<li>Let <var>tuple</var> be the result of <a>getting the value of entry</a>
on <var>map</var> given <var>entryType</var> as <a>key</a>.</li>
<li>Increase <var>droppedEntriesCount</var> by <var>tuple</var>'s
<a>dropped entries count</a>.</li>
</ol>
</li>
</ol>
</li>
<li>Set <var>po</var>'s <a>requires dropped entries</a> to false.</li>
</ol>
</li>
<li>Let <var>callbackOptions</var> be a <a>PerformanceObserverCallbackOptions</a>
Expand Down