diff options
Diffstat (limited to 'chromium/third_party/blink/renderer/core/loader/allowed_by_nosniff.cc')
-rw-r--r-- | chromium/third_party/blink/renderer/core/loader/allowed_by_nosniff.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/chromium/third_party/blink/renderer/core/loader/allowed_by_nosniff.cc b/chromium/third_party/blink/renderer/core/loader/allowed_by_nosniff.cc index 5255c3cb131..6728251249b 100644 --- a/chromium/third_party/blink/renderer/core/loader/allowed_by_nosniff.cc +++ b/chromium/third_party/blink/renderer/core/loader/allowed_by_nosniff.cc @@ -127,9 +127,9 @@ bool MimeTypeAsScriptImpl(ExecutionContext* execution_context, const ResourceResponse& response, bool is_worker_global_scope) { // Is it a file:-URL? If so, decide based on file suffix. - if (RuntimeEnabledFeatures::WorkerNosniffBlockEnabled() && - is_worker_global_scope && response.Url().IsLocalFile()) { - return response.Url().LastPathComponent().EndsWith(".js"); + if (response.Url().IsLocalFile() && + response.Url().LastPathComponent().EndsWith(".js")) { + return true; } String mime_type = response.HttpContentType(); |