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
WebKit export of https://bugs.webkit.org/show_bug.cgi?id=198078 #16940
WebKit export of https://bugs.webkit.org/show_bug.cgi?id=198078 #16940
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Already reviewed downstream.
ee7802b
to
f7aaadc
Compare
f7aaadc
to
c287d51
Compare
@jan-ivar, could you look at Firefox stability results and see whether there is any specific issue with the test? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like Firefox is failing intermittently, perhaps over bug 1517555.
We see similar results in the existing feature-policy test (how come you added a new one?)
It looks green atm, but clicking "Show History" and scroll in the Firefox box to see some intermittent red.
var crossDomain = get_host_info().HTTPS_REMOTE_ORIGIN; | ||
function runTestInIFrame(allow, crossOrigin) | ||
{ | ||
return new Promise(async resolve => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
async
should never be used in promise constructor executor functions, as they lead to uncaught errors.
return new Promise(async resolve => { | ||
window.addEventListener('message', function handler(event) { | ||
resolve(event.data); | ||
window.removeEventListener('message', handler); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's also window.addEventListener('message', f, {once: true});
parent.postMessage(data, '*'); | ||
}, error => { | ||
parent.postMessage('error', '*'); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we're already in an async
function, this could be:
try {
parent.postMessage(await doTest(), '*');
} catch(error) {
parent.postMessage('error', '*');
}
{ | ||
let results = { }; | ||
try { | ||
await navigator.mediaDevices.getUserMedia({audio : true}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you considered doing a stream.getTracks().forEach(track => track.stop());
after each gUM call?
This might help on resource use, at least in the top-level domain, which I assume stays open while the iframes come and go, and perhaps help the test succeed on systems where hardware is used and is limited from being opened in multiple tabs at once maybe.
This might be related to why Firefox is failing. It may be running into bug 1517555.
@youennf looks like https://trac.webkit.org/changeset/245625/webkit was landed 5 months ago, can this export PR be unstuck? As a start, rebasing it to retrigger CI would give a view of the current state of implementation. |
This is a manual rebase of #16940, to see what the results are nowadays.
This is a manual rebase of #16940, to see what the results are nowadays.
See #24889 (comment) |
WebKit export from bug: Implement Feature policy self/none/* parsing