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

Fix the issue of skip-waiting-installed.https.html #6564

Conversation

chromium-wpt-export-bot
Copy link
Collaborator

@chromium-wpt-export-bot chromium-wpt-export-bot commented Jul 17, 2017

Fix the issue of skip-waiting-installed.https.html

According to the current spec, skipWaiting() promise should be resolved
earlier even in the case that the service worker state is "installed",
and then continues the activate in parallel. The test case violate that.

The background is in w3c/ServiceWorker#1015.

BUG=725616

Change-Id: Ic09b4d404ea41138c8bda8d3ced07094a7ebc6ab
Reviewed-on: https://chromium-review.googlesource.com/571612
Commit-Queue: Xiaofeng Zhang [email protected]
Reviewed-by: Makoto Shimazu [email protected]
Cr-Commit-Position: refs/heads/master@{#487784}
WPT-Export-Revision: b2da840104a198eaf197f0903419fc24f39aa9a6

Copy link
Collaborator

@wpt-pr-bot wpt-pr-bot left a comment

Choose a reason for hiding this comment

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

Already reviewed downstream.

@ghost
Copy link

ghost commented Jul 17, 2017

View the complete job log.

Firefox (nightly)

Testing web-platform-tests at revision c09aa4e
Using browser at version BuildID 20170718164211; SourceStamp dece50457378ac4934afe9fb3c2a8054e8894588
Starting 10 test iterations
All results were stable

All results

1 test ran
/service-workers/service-worker/skip-waiting-installed.https.html
Subtest Results Messages
OK
Test skipWaiting when a installed worker is waiting PASS

@ghost
Copy link

ghost commented Jul 17, 2017

View the complete job log.

Sauce (safari)

Testing web-platform-tests at revision c09aa4e
Using browser at version 10.0
Starting 10 test iterations
All results were stable

All results

1 test ran
/service-workers/service-worker/skip-waiting-installed.https.html
Subtest Results Messages
OK
Test skipWaiting when a installed worker is waiting FAIL undefined is not an object (evaluating 'navigator.serviceWorker.getRegistration')

@ghost
Copy link

ghost commented Jul 17, 2017

View the complete job log.

Chrome (unstable)

Testing web-platform-tests at revision c09aa4e
Using browser at version 61.0.3159.5 dev
Starting 10 test iterations
All results were stable

All results

1 test ran
/service-workers/service-worker/skip-waiting-installed.https.html
Subtest Results Messages
OK
Test skipWaiting when a installed worker is waiting FAIL assert_equals: skipWaiting promise should be resolved with undefined expected "PASS" but got "FAIL: Promise should be resolved before worker is activated"

@ghost
Copy link

ghost commented Jul 17, 2017

View the complete job log.

Sauce (MicrosoftEdge)

Testing web-platform-tests at revision c09aa4e
Using browser at version 14.14393
Starting 10 test iterations
All results were stable

All results

1 test ran
/service-workers/service-worker/skip-waiting-installed.https.html
Subtest Results Messages
OK
Test skipWaiting when a installed worker is waiting FAIL Unable to get property 'getRegistration' of undefined or null reference

@chromium-wpt-export-bot chromium-wpt-export-bot force-pushed the chromium-export-cl-Ic09b4d404ea41138c8bda8d3ced07094a7ebc6ab branch from 91e2981 to f22bd17 Compare July 19, 2017 04:51
According to the current spec, skipWaiting() promise should be resolved
earlier even in the case that the service worker state is "installed",
and then continues the activate in parallel. The test case violate that.

The background is in w3c/ServiceWorker#1015.

BUG=725616

Change-Id: Ic09b4d404ea41138c8bda8d3ced07094a7ebc6ab
Reviewed-on: https://chromium-review.googlesource.com/571612
Commit-Queue: Xiaofeng Zhang <[email protected]>
Reviewed-by: Makoto Shimazu <[email protected]>
Cr-Commit-Position: refs/heads/master@{#487784}
WPT-Export-Revision: b2da840104a198eaf197f0903419fc24f39aa9a6
@chromium-wpt-export-bot chromium-wpt-export-bot force-pushed the chromium-export-cl-Ic09b4d404ea41138c8bda8d3ced07094a7ebc6ab branch from f22bd17 to 78d2fb8 Compare July 19, 2017 07:42
@chromium-wpt-export-bot chromium-wpt-export-bot merged commit f2dfb90 into master Jul 19, 2017
@chromium-wpt-export-bot chromium-wpt-export-bot deleted the chromium-export-cl-Ic09b4d404ea41138c8bda8d3ced07094a7ebc6ab branch July 19, 2017 09:17
servo-wpt-sync pushed a commit to servo/wpt that referenced this pull request Feb 8, 2025
Background:

> JavaScript strings are potentially ill-formed UTF-16 (arbitrary
> Vec<u16>) and can contain unpaired surrogates. Rust’s String type is
> well-formed UTF-8 and can not contain any surrogate. Surrogates are
> never emitted when decoding bytes from the network, but they can sneak
> in through document.write, the Element.innerHtml setter, or other DOM
> APIs.

In 2015, Servo launched an experiment to see if unpaired surrogates
cropped up in page content. That experiment caused Servo to panic if
unpaired surrogates were encountered with a request to report the page
to bug web-platform-tests#6564. During that time several pages were reported with unpaired
surrogates, causing Servo to panic. In addition, when running the WPT
tests Servo will never panic due to the `-Z replace-surrogates` option
being passed by the test driver.

Motivation:

After this 10 year experiment, it's clear that unpaired surrogates are a
real concern in page content. Several reports were filed of Servo
panicking after encountering them in real world pages. A complete fix for
this issue would be to somehow maintain unpaired surrogates in the DOM,
but that is a much larger task than simply emitting U+FFD instead of an
unpaired surrogate.

Since it is clear that this kind of content exists, it is better for
Servo to try its best to handle the content rather than crash as
production browsers should not crash due to user content when possible.
In this change, I modify Servo to always replace unpaired surrogates.

It would have been ideal to only crash when debug assertions are
enabled, but debug assertions are enabled by default in release mode --
so this wouldn't be effective for WPT tests.
servo-wpt-sync pushed a commit to servo/wpt that referenced this pull request Feb 8, 2025
Background:

> JavaScript strings are potentially ill-formed UTF-16 (arbitrary
> Vec<u16>) and can contain unpaired surrogates. Rust’s String type is
> well-formed UTF-8 and can not contain any surrogate. Surrogates are
> never emitted when decoding bytes from the network, but they can sneak
> in through document.write, the Element.innerHtml setter, or other DOM
> APIs.

In 2015, Servo launched an experiment to see if unpaired surrogates
cropped up in page content. That experiment caused Servo to panic if
unpaired surrogates were encountered with a request to report the page
to bug web-platform-tests#6564. During that time several pages were reported with unpaired
surrogates, causing Servo to panic. In addition, when running the WPT
tests Servo will never panic due to the `-Z replace-surrogates` option
being passed by the test driver.

Motivation:

After this 10 year experiment, it's clear that unpaired surrogates are a
real concern in page content. Several reports were filed of Servo
panicking after encountering them in real world pages. A complete fix for
this issue would be to somehow maintain unpaired surrogates in the DOM,
but that is a much larger task than simply emitting U+FFD instead of an
unpaired surrogate.

Since it is clear that this kind of content exists, it is better for
Servo to try its best to handle the content rather than crash as
production browsers should not crash due to user content when possible.
In this change, I modify Servo to always replace unpaired surrogates.

It would have been ideal to only crash when debug assertions are
enabled, but debug assertions are enabled by default in release mode --
so this wouldn't be effective for WPT tests.

Signed-off-by: Martin Robinson <[email protected]>
servo-wpt-sync pushed a commit to servo/wpt that referenced this pull request Feb 8, 2025
Background:

> JavaScript strings are potentially ill-formed UTF-16 (arbitrary
> Vec<u16>) and can contain unpaired surrogates. Rust’s String type is
> well-formed UTF-8 and can not contain any surrogate. Surrogates are
> never emitted when decoding bytes from the network, but they can sneak
> in through document.write, the Element.innerHtml setter, or other DOM
> APIs.

In 2015, Servo launched an experiment to see if unpaired surrogates
cropped up in page content. That experiment caused Servo to panic if
unpaired surrogates were encountered with a request to report the page
to bug web-platform-tests#6564. During that time several pages were reported with unpaired
surrogates, causing Servo to panic. In addition, when running the WPT
tests Servo will never panic due to the `-Z replace-surrogates` option
being passed by the test driver.

Motivation:

After this 10 year experiment, it's clear that unpaired surrogates are a
real concern in page content. Several reports were filed of Servo
panicking after encountering them in real world pages. A complete fix for
this issue would be to somehow maintain unpaired surrogates in the DOM,
but that is a much larger task than simply emitting U+FFD instead of an
unpaired surrogate.

Since it is clear that this kind of content exists, it is better for
Servo to try its best to handle the content rather than crash as
production browsers should not crash due to user content when possible.
In this change, I modify Servo to always replace unpaired surrogates.

It would have been ideal to only crash when debug assertions are
enabled, but debug assertions are enabled by default in release mode --
so this wouldn't be effective for WPT tests.

Signed-off-by: Martin Robinson <[email protected]>
servo-wpt-sync pushed a commit to servo/wpt that referenced this pull request Feb 9, 2025
Background:

> JavaScript strings are potentially ill-formed UTF-16 (arbitrary
> Vec<u16>) and can contain unpaired surrogates. Rust’s String type is
> well-formed UTF-8 and can not contain any surrogate. Surrogates are
> never emitted when decoding bytes from the network, but they can sneak
> in through document.write, the Element.innerHtml setter, or other DOM
> APIs.

In 2015, Servo launched an experiment to see if unpaired surrogates
cropped up in page content. That experiment caused Servo to panic if
unpaired surrogates were encountered with a request to report the page
to bug web-platform-tests#6564. During that time several pages were reported with unpaired
surrogates, causing Servo to panic. In addition, when running the WPT
tests Servo will never panic due to the `-Z replace-surrogates` option
being passed by the test driver.

Motivation:

After this 10 year experiment, it's clear that unpaired surrogates are a
real concern in page content. Several reports were filed of Servo
panicking after encountering them in real world pages. A complete fix for
this issue would be to somehow maintain unpaired surrogates in the DOM,
but that is a much larger task than simply emitting U+FFD instead of an
unpaired surrogate.

Since it is clear that this kind of content exists, it is better for
Servo to try its best to handle the content rather than crash as
production browsers should not crash due to user content when possible.
In this change, I modify Servo to always replace unpaired surrogates.

It would have been ideal to only crash when debug assertions are
enabled, but debug assertions are enabled by default in release mode --
so this wouldn't be effective for WPT tests.

Signed-off-by: Martin Robinson <[email protected]>
servo-wpt-sync pushed a commit that referenced this pull request Feb 9, 2025
Background:

> JavaScript strings are potentially ill-formed UTF-16 (arbitrary
> Vec<u16>) and can contain unpaired surrogates. Rust’s String type is
> well-formed UTF-8 and can not contain any surrogate. Surrogates are
> never emitted when decoding bytes from the network, but they can sneak
> in through document.write, the Element.innerHtml setter, or other DOM
> APIs.

In 2015, Servo launched an experiment to see if unpaired surrogates
cropped up in page content. That experiment caused Servo to panic if
unpaired surrogates were encountered with a request to report the page
to bug #6564. During that time several pages were reported with unpaired
surrogates, causing Servo to panic. In addition, when running the WPT
tests Servo will never panic due to the `-Z replace-surrogates` option
being passed by the test driver.

Motivation:

After this 10 year experiment, it's clear that unpaired surrogates are a
real concern in page content. Several reports were filed of Servo
panicking after encountering them in real world pages. A complete fix for
this issue would be to somehow maintain unpaired surrogates in the DOM,
but that is a much larger task than simply emitting U+FFD instead of an
unpaired surrogate.

Since it is clear that this kind of content exists, it is better for
Servo to try its best to handle the content rather than crash as
production browsers should not crash due to user content when possible.
In this change, I modify Servo to always replace unpaired surrogates.

It would have been ideal to only crash when debug assertions are
enabled, but debug assertions are enabled by default in release mode --
so this wouldn't be effective for WPT tests.

Signed-off-by: Martin Robinson <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants