Bug 151614

Summary: location.origin is undefined in a web worker
Product: WebKit Reporter: Nolan Lawson <nolan>
Component: DOMAssignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: ap, cdumez, commit-queue, darin, esprehn+autocc, kling, kondapallykalyan, rniwa
Priority: P2 Keywords: GoodFirstBug
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
URL: https://html.spec.whatwg.org/multipage/workers.html#workerlocation
Attachments:
Description Flags
Reproducible test case
none
Patch
none
Patch none

Description Nolan Lawson 2015-11-25 22:12:24 PST
Created attachment 266173 [details]
Reproducible test case

See attached test case to reproduce. location.origin is available from the main thread, but not from a web worker.

This bug exists in Edge as well, but not in Chrome or Firefox.

Test case: http://bl.ocks.org/nolanlawson/f71571e8770ba7174566
Comment 1 Nolan Lawson 2015-11-25 22:13:59 PST
Tested in WebKit Nightly, Version 9.0.1 (10601.2.7.2, r190266).
Comment 2 Chris Dumez 2015-11-30 09:44:48 PST
Created attachment 266247 [details]
Patch
Comment 3 Darin Adler 2015-11-30 09:50:17 PST
Comment on attachment 266247 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=266247&action=review

> Source/WebCore/ChangeLog:11
> +        This behavior is consistent with the one of Firefox and Chrome.

Grammatical error. Should just remove "the one of" or make it say "the behavior of".

> Source/WebCore/workers/WorkerLocation.cpp:81
> +}
> +
>  
>  } // namespace WebCore

Extra blank line here.
Comment 4 Chris Dumez 2015-11-30 09:55:18 PST
Created attachment 266248 [details]
Patch
Comment 5 WebKit Commit Bot 2015-11-30 11:27:39 PST
Comment on attachment 266248 [details]
Patch

Clearing flags on attachment: 266248

Committed r192810: <http://trac.webkit.org/changeset/192810>
Comment 6 WebKit Commit Bot 2015-11-30 11:27:44 PST
All reviewed patches have been landed.  Closing bug.