mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1178508 ServiceWorker scripts should never be intercepted. r=baku
This commit is contained in:
parent
4965ecc09e
commit
268167f91a
@ -10,6 +10,7 @@
|
||||
#include "nsIContentPolicy.h"
|
||||
#include "nsIContentSecurityPolicy.h"
|
||||
#include "nsIHttpChannel.h"
|
||||
#include "nsIHttpChannelInternal.h"
|
||||
#include "nsIInputStreamPump.h"
|
||||
#include "nsIIOService.h"
|
||||
#include "nsIProtocolHandler.h"
|
||||
@ -870,6 +871,16 @@ private:
|
||||
return rv;
|
||||
}
|
||||
|
||||
// If we are loading a script for a ServiceWorker then we must not
|
||||
// try to intercept it. If the interception matches the current
|
||||
// ServiceWorker's scope then we could deadlock the load.
|
||||
if (mWorkerPrivate->IsServiceWorker()) {
|
||||
nsCOMPtr<nsIHttpChannelInternal> internal = do_QueryInterface(channel);
|
||||
if (internal) {
|
||||
internal->ForceNoIntercept();
|
||||
}
|
||||
}
|
||||
|
||||
if (loadInfo.mCacheStatus != ScriptLoadInfo::ToBeCached) {
|
||||
rv = channel->AsyncOpen(loader, indexSupports);
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
|
Loading…
Reference in New Issue
Block a user