Worker: Clean up DedicatedWorker initialization

This is just a cleanup and doesn't change behavior.

The main change is to resolve a script URL before creating a DedicatedWorker
instance so that the instance doesn't take care of the case where the URL
resolution fails and the code path becomes simpler.

Bug: 680046
Change-Id: I439716e7cf562a1e71aafd453a76071179c9194c
Reviewed-on: https://chromium-review.googlesource.com/700094
Commit-Queue: Hiroki Nakagawa <nhiroki@chromium.org>
Reviewed-by: Matt Falkenhagen <falken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#506339}
5 files changed