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

An observer disconnected after a mark must receive the mark #18284

Closed
ferjm opened this issue Aug 28, 2017 · 11 comments · Fixed by #18370
Closed

An observer disconnected after a mark must receive the mark #18284

ferjm opened this issue Aug 28, 2017 · 11 comments · Fixed by #18370
Labels
A-content/dom Interacting with the DOM from web content C-assigned There is someone working on resolving the issue E-less-complex Straightforward. Recommended for a new contributor.

Comments

@ferjm
Copy link
Contributor

ferjm commented Aug 28, 2017

The following test from web-platform-tests/performance-timeline is failing:

async_test(function (t) {
    var observer = new PerformanceObserver(
        t.step_func(function(entryList, obs) {
          checkEntries(entryList.getEntries(),
            [{ entryType: "mark", name: "mark1"}]);
          t.done();
        })
      );
    observer.observe({entryTypes: ["mark"]});
    self.performance.mark("mark1");
    observer.disconnect();
    self.performance.mark("mark2");
  }, "An observer disconnected after a mark must receive the mark");

We should probably not remove the observer from the list while the pending_notification_observers_task flag is set.

@ferjm ferjm added A-content/dom Interacting with the DOM from web content E-more-complex Variable effort required; may require a mentor. Recommended solution is clearly described in the iss E-less-complex Straightforward. Recommended for a new contributor. and removed E-more-complex Variable effort required; may require a mentor. Recommended solution is clearly described in the iss labels Aug 28, 2017
@highfive
Copy link

Hi! If you have any questions regarding this issue, feel free to make a comment here, or ask it in the #servo channel in IRC.

If you intend to work on this issue, then add @highfive: assign me to your comment, and I'll assign this to you. 😄

@jdm
Copy link
Member

jdm commented Aug 28, 2017

Run the test with ./mach test-wpt tests/wpt/web-platform-tests/performance-timeline/po-disconnect.html

@pylbrecht
Copy link
Sponsor Contributor

I'd like to get my hands dirty on this. As I'm completely new to Servo and contributing at all, are there any resources where I can read up on performance observers, like what they are and what they have to do with the DOM? I guess this document from #18285 may be relevant?

@jdm
Copy link
Member

jdm commented Aug 30, 2017

That is the specification that defines the PerformanceObserver API, yes. https://developer.mozilla.org/en-US/docs/Web/API/Performance_Timeline may also be useful.

@ferjm
Copy link
Contributor Author

ferjm commented Aug 30, 2017

Thank you for your interest on this task @pylbrecht :). You may want to work on top of #18283 as Performance.mark is required to test the fix for this issue.

@pylbrecht
Copy link
Sponsor Contributor

Alright, let's do this. Thanks for the hints!
@highfive: assign me

@highfive
Copy link

Hey @pylbrecht! Thanks for your interest in working on this issue. It's now assigned to you!

@highfive highfive added the C-assigned There is someone working on resolving the issue label Aug 30, 2017
@pylbrecht
Copy link
Sponsor Contributor

Unfortunately I'm somehow unable to run the test.
I ran a debug build and executed the following commands (on top of #18283):

./mach test-wpt tests/wpt/web-platform-tests/performance-timeline/po-disconnect.html
This command confused me, because there is no po-disconnect.html file in that directory. But maybe I'm just not understanding how web-platform-tests are run.

./mach test-wpt tests/wpt/web-platform-tests/performance-timeline/
Here the related test is not failing.

Any ideas what I'm doing wrong?

@ferjm
Copy link
Contributor Author

ferjm commented Sep 1, 2017

I am not sure how to run the test individually in this case. Running ./mach test-wpt tests/wpt/web-platform-tests/performance-timeline/po-disconnect.any.html gives me a similar output and it does not seem to run the test.

What I do is to run the entire suite for performance-timeline with the same command that you mentioned: ./mach test-wpt tests/wpt/web-platform-tests/performance-timeline/. Note that the output that you pasted isn't saying that the test didn't failed, what it is saying is that it run as expected. And in this case, the expectation is a timeout. What you can do is to s/TIMEOUT/PASS in line 3 and remove lines 4 and 5 from https://github.com/servo/servo/pull/18283/files#diff-385d3d27df317879daf4e2064605dd58 and then re-run the tests. You should see something like:

❯ ./mach test-wpt tests/wpt/web-platform-tests/performance-timeline/
Running 13 tests in web-platform-tests

  ▶ TIMEOUT [expected PASS] /performance-timeline/po-disconnect.any.html
  │
  │ VMware, Inc.
  │ Gallium 0.4 on softpipe
  └ 3.3 (Core Profile) Mesa 17.2.0-devel

  ▶ Unexpected subtest result in /performance-timeline/po-disconnect.any.html:
  │ TIMEOUT [expected PASS] An observer disconnected after a mark must receive the mark
  └   → Test timed out

Ran 13 tests finished in 12.0 seconds.
  • 12 ran as expected. 0 tests skipped.
  • 1 tests timed out unexpectedly
  • 1 tests had unexpected subtest results

@pylbrecht
Copy link
Sponsor Contributor

Just to be clear: the test is expected to PASS after resolving this issue and is just expected to TIMEOUT right now, because the required module(s) are not fully implemented yet (i.e. test driven approach)?

@jdm
Copy link
Member

jdm commented Sep 1, 2017

Correct. The tests are shared between multiple web browsers, so other browsers end up writing tests for features that aren't yet implemented in Servo.

bors-servo pushed a commit that referenced this issue Sep 8, 2017
An observer disconnected after a mark must receive the mark

<!-- Please describe your changes on the following line: -->
I worked on top of #18283 as suggested [here](#18284 (comment)).

r? @ferjm

<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #18284 (github issue number if applicable).

<!-- Either: -->
- [X] There are tests for these changes

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18370)
<!-- Reviewable:end -->
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this issue Sep 9, 2017
…ive the mark (from pylbrecht:observer); r=ferjm

<!-- Please describe your changes on the following line: -->
I worked on top of #18283 as suggested [here](servo/servo#18284 (comment)).

r? @ferjm

<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #18284 (github issue number if applicable).

<!-- Either: -->
- [X] There are tests for these changes

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: 867d542261336d918177f8780ef915b7ec84e3ba

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 79691b6f8e710beeab4ca8ba260f4ee0869914a7
xeonchen pushed a commit to xeonchen/gecko-cinnabar that referenced this issue Sep 9, 2017
…ive the mark (from pylbrecht:observer); r=ferjm

<!-- Please describe your changes on the following line: -->
I worked on top of #18283 as suggested [here](servo/servo#18284 (comment)).

r? @ferjm

<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #18284 (github issue number if applicable).

<!-- Either: -->
- [X] There are tests for these changes

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: 867d542261336d918177f8780ef915b7ec84e3ba
aethanyc pushed a commit to aethanyc/gecko-dev that referenced this issue Sep 11, 2017
…ive the mark (from pylbrecht:observer); r=ferjm

<!-- Please describe your changes on the following line: -->
I worked on top of #18283 as suggested [here](servo/servo#18284 (comment)).

r? @ferjm

<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #18284 (github issue number if applicable).

<!-- Either: -->
- [X] There are tests for these changes

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: 867d542261336d918177f8780ef915b7ec84e3ba
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this issue Oct 1, 2019
…ive the mark (from pylbrecht:observer); r=ferjm

<!-- Please describe your changes on the following line: -->
I worked on top of #18283 as suggested [here](servo/servo#18284 (comment)).

r? ferjm

<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #18284 (github issue number if applicable).

<!-- Either: -->
- [X] There are tests for these changes

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: 867d542261336d918177f8780ef915b7ec84e3ba

UltraBlame original commit: b0d2e384b6e0842e523b1922659c3a8f0c2d8ee4
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this issue Oct 1, 2019
…ive the mark (from pylbrecht:observer); r=ferjm

<!-- Please describe your changes on the following line: -->
I worked on top of #18283 as suggested [here](servo/servo#18284 (comment)).

r? ferjm

<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #18284 (github issue number if applicable).

<!-- Either: -->
- [X] There are tests for these changes

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: 867d542261336d918177f8780ef915b7ec84e3ba

UltraBlame original commit: b0d2e384b6e0842e523b1922659c3a8f0c2d8ee4
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this issue Oct 1, 2019
…ive the mark (from pylbrecht:observer); r=ferjm

<!-- Please describe your changes on the following line: -->
I worked on top of #18283 as suggested [here](servo/servo#18284 (comment)).

r? ferjm

<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #18284 (github issue number if applicable).

<!-- Either: -->
- [X] There are tests for these changes

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: 867d542261336d918177f8780ef915b7ec84e3ba

UltraBlame original commit: b0d2e384b6e0842e523b1922659c3a8f0c2d8ee4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-content/dom Interacting with the DOM from web content C-assigned There is someone working on resolving the issue E-less-complex Straightforward. Recommended for a new contributor.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants