browser(firefox): ignore WebProgress events coming from workers (#4380)

Somehow, we get WebProgress state changes when worker is loaded
with a blob url. This messes up frame navigation detection.

Luckily, it's easy to filter out non-document state changes.
This commit is contained in:
Dmitry Gozman 2020-11-09 09:29:34 -08:00 committed by GitHub
parent f7eb845df0
commit ae738c1fac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 2 deletions

View File

@ -1,2 +1,2 @@
1204
Changed: dgozman@gmail.com Fri Nov 6 14:37:05 PST 2020
1205
Changed: dgozman@gmail.com Sun Nov 8 07:09:21 PST 2020

View File

@ -197,6 +197,12 @@ class FrameTree {
return;
}
if (!channel.isDocument) {
// Somehow, we can get worker requests here,
// while we are only interested in frame documents.
return;
}
const isStart = flag & Ci.nsIWebProgressListener.STATE_START;
const isTransferring = flag & Ci.nsIWebProgressListener.STATE_TRANSFERRING;
const isStop = flag & Ci.nsIWebProgressListener.STATE_STOP;