ServiceWorker: Remove outgoing_referrer value settings
This CL removes codes for setting script_url value to outgoing_referrer when it is an empty string. Setting script_url value here instead of an empty string is wrong according to the spec, but we are doing so to pass DCHECK in security_policy.cc. (DCHECK: https://source.chromium.org/chromium/chromium/src/+/master:third_party/blink/renderer/platform/weborigin/security_policy.cc;l=114;drc=a1e88003b410ca2c3927e17be60a97ed8fedefab?originalUrl=https:%2F%2Fcs.chromium.org%2F) The reason why we were using script_url and not String() was to make the behavior same to the original code. It is discussed here: https://chromium-review.googlesource.com/c/chromium/src/+/1861294/8/third_party/blink/renderer/modules/service_worker/service_worker_container.cc However, now we change the constructor of WebFetchClientSettingObject to prevent outgoing_referrer from taking invalid values. (See https://chromium-review.googlesource.com/c/chromium/src/+/2033004) This CL changes the behavior when outgoing_referrer is empty, which occurs in some rare cases like extensions, and doesn't add tests because it's hard to test. Bug: 1047612 Change-Id: Ie4a1a5a784019706fcad156e1668f7f2236bb2f8 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2032691 Commit-Queue: Eriko Kurimoto <elkurin@google.com> Reviewed-by:Hiroki Nakagawa <nhiroki@chromium.org> Reviewed-by:
Hiroshige Hayashizaki <hiroshige@chromium.org> Reviewed-by:
Kenichi Ishibashi <bashi@chromium.org> Cr-Commit-Position: refs/heads/master@{#738144}
Showing
Please register or sign in to comment