mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 21:01:08 +00:00
Bug 1819570 - P3 using nsILoadInfo.WorkerAssociatedBrowsingContext for netmonitor. r=jdescottes,devtools-reviewers
After PFetch is enabled, fetch() call in workers will not create a channel in the content process anymore. Although netmonitor also watches the channels in the parent process, the created channel still loses the BrowsingContext information for netmonitor to connect the network event and the channel. Depends on D174441 Differential Revision: https://phabricator.services.mozilla.com/D174442
This commit is contained in:
parent
da9145b668
commit
c800899fd3
@ -263,6 +263,13 @@ export var NetworkHelper = {
|
||||
* @returns nsILoadContext or null
|
||||
*/
|
||||
getRequestLoadContext(request) {
|
||||
try {
|
||||
if (request.loadInfo.workerAssociatedBrowsingContext) {
|
||||
return request.loadInfo.workerAssociatedBrowsingContext;
|
||||
}
|
||||
} catch (ex) {
|
||||
// Ignore.
|
||||
}
|
||||
try {
|
||||
return request.notificationCallbacks.getInterface(Ci.nsILoadContext);
|
||||
} catch (ex) {
|
||||
|
Loading…
Reference in New Issue
Block a user