Bug 151614 - location.origin is undefined in a web worker
Summary: location.origin is undefined in a web worker
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL: https://html.spec.whatwg.org/multipag...
Keywords: GoodFirstBug
Depends on:
Blocks:
 
Reported: 2015-11-25 22:12 PST by Nolan Lawson
Modified: 2015-11-30 11:27 PST (History)
8 users (show)

See Also:


Attachments
Reproducible test case (666 bytes, application/zip)
2015-11-25 22:12 PST, Nolan Lawson
no flags Details
Patch (4.69 KB, patch)
2015-11-30 09:44 PST, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (4.68 KB, patch)
2015-11-30 09:55 PST, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.