off-the-main-thread fetch: Use response URL as worker global scope's URL

After this CL,
WorkerGlobalScope's URL is initially set to the null URL, and
later set to the response URL of the top-level script
- When the top-level script is loaded,
  if off-the-main-thread fetch is enabled for the worker, or
- Immediately after that during construction, otherwise.

This CL adds CHECK()s to catch cases where the URL is accessed
before ready.

|GlobalScopeCreationParams::script_url| is still used to set the
WorkerGlobalScope's SecurityOrigin that should be the same as
the response URL's origin.
This is ensured by
https://chromium-review.googlesource.com/1147664 and
this CL adds CHECK()s for this in WorkerGlobalScope::InitializeURL().

Even after this CL, DevTool's context selector will still show
request URLs for off-the-main-thread-fetched worker scripts
(because WorkerThreadDebugger::ContextCreated() uses
|GlobalScopeCreationParams::script_url|) while
global scope's Url() is changed to the response URL.
This should be handled later in Issue 866666.

Bug: 861564, 866666
Change-Id: I304309ca4d7f08a11bb0dc5c0bcb6cc661d3fdba
Reviewed-on: https://chromium-review.googlesource.com/c/1139074
Commit-Queue: Hiroshige Hayashizaki <hiroshige@chromium.org>
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Reviewed-by: Kouhei Ueno <kouhei@chromium.org>
Cr-Commit-Position: refs/heads/master@{#633878}
13 files changed