New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 649896 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Buried. Ping if important.
Closed: Oct 2016
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug



Sign in to add a comment

isSecureContext is not supported in workers

Reported by bzbar...@mit.edu, Sep 24 2016

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:52.0) Gecko/20100101 Firefox/52.0

Example URL:

Steps to reproduce the problem:
Run this testcase:

    var url = URL.createObjectURL(new Blob(["postMessage(isSecureContext)"]));
    var w = new Worker(url);
    w.onmessage = function (e) { alert(e.data); }

What is the expected behavior?
Alert true or false, depending on where you ran it.

What went wrong?
No alert, console errors about isSecureContext not being defined.

Does it occur on multiple sites: Yes

Is it a problem with a plugin? No 

Did this work before? No 

Does this work in other browsers? N/A 

Chrome version: 55.0.2868.3 (Official Build) dev (64-bit)  Channel: n/a
OS Version: OS X 10.10
Flash Version: Shockwave Flash 22.0 r0
 

Comment 1 by kojii@chromium.org, Sep 26 2016

Components: -Blink Blink>Workers

Comment 2 by falken@chromium.org, Sep 26 2016

Labels: -Pri-2 -OS-Mac OS-All Pri-3
Owner: mkwst@chromium.org
Status: Assigned (was: Unconfirmed)
This seems like a known issue based on the commit description at https://crrev.com/fd67eed6357b2a5487c13cc159b4e843a9c91aee. Assigning to mkwst for further triage or in case he has any updates since then.

Comment 3 by mkwst@chromium.org, Sep 26 2016

Ah. Right. We now have `WorkerGlobalScope::isSecureContext`, but never wired it up to the DOM. I'll do that today.

bz: Does Mozilla happen to have layout tests I could reuse? :P

Comment 5 by bzbar...@mit.edu, Sep 26 2016

> bz: Does Mozilla happen to have layout tests I could reuse? :P

I'm adding some web platform tests in https://bugzilla.mozilla.org/show_bug.cgi?id=1269052 that you could probably reuse.  I expect they will get upstreamed within a week or two, the next time we sync wpt.
Project Member

Comment 6 by bugdroid1@chromium.org, Sep 29 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/bd027238e7f3d3c8096c1a62e9063d8cbf5d8a80

commit bd027238e7f3d3c8096c1a62e9063d8cbf5d8a80
Author: mkwst <mkwst@chromium.org>
Date: Thu Sep 29 14:06:23 2016

Add 'WorkerGlobalScope::isSecureContext'

We shipped the 'Window' variant in [1] a ~year ago, with the promise
that we'd totally come back and do the 'Worker' bit. *cough* So, here
it is!

[1]: https://chromium.googlesource.com/chromium/src/+/fd67eed6357b2a5487c13cc159b4e843a9c91aee

BUG= 534788 , 649896 

Review-Url: https://codereview.chromium.org/2365353002
Cr-Commit-Position: refs/heads/master@{#421810}

[add] https://crrev.com/bd027238e7f3d3c8096c1a62e9063d8cbf5d8a80/third_party/WebKit/LayoutTests/http/tests/security/secureContexts/authenticated_worker.https.html
[add] https://crrev.com/bd027238e7f3d3c8096c1a62e9063d8cbf5d8a80/third_party/WebKit/LayoutTests/http/tests/security/secureContexts/resources/post-securecontext-shared.js
[add] https://crrev.com/bd027238e7f3d3c8096c1a62e9063d8cbf5d8a80/third_party/WebKit/LayoutTests/http/tests/security/secureContexts/resources/post-securecontext.js
[add] https://crrev.com/bd027238e7f3d3c8096c1a62e9063d8cbf5d8a80/third_party/WebKit/LayoutTests/http/tests/security/secureContexts/unauthenticated_worker.html
[modify] https://crrev.com/bd027238e7f3d3c8096c1a62e9063d8cbf5d8a80/third_party/WebKit/LayoutTests/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt
[modify] https://crrev.com/bd027238e7f3d3c8096c1a62e9063d8cbf5d8a80/third_party/WebKit/LayoutTests/virtual/stable/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt
[modify] https://crrev.com/bd027238e7f3d3c8096c1a62e9063d8cbf5d8a80/third_party/WebKit/LayoutTests/virtual/stable/webexposed/global-interface-listing-dedicated-worker-expected.txt
[modify] https://crrev.com/bd027238e7f3d3c8096c1a62e9063d8cbf5d8a80/third_party/WebKit/LayoutTests/virtual/stable/webexposed/global-interface-listing-shared-worker-expected.txt
[modify] https://crrev.com/bd027238e7f3d3c8096c1a62e9063d8cbf5d8a80/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-dedicated-worker-expected.txt
[modify] https://crrev.com/bd027238e7f3d3c8096c1a62e9063d8cbf5d8a80/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-shared-worker-expected.txt
[modify] https://crrev.com/bd027238e7f3d3c8096c1a62e9063d8cbf5d8a80/third_party/WebKit/Source/core/workers/WorkerGlobalScope.h
[modify] https://crrev.com/bd027238e7f3d3c8096c1a62e9063d8cbf5d8a80/third_party/WebKit/Source/core/workers/WorkerGlobalScope.idl

Labels: M-55
Status: Started (was: Assigned)
mkwst@: Can we close this issue?

Comment 8 by mkwst@chromium.org, Oct 6 2016

Status: Fixed (was: Started)
Yes, let's. :)

Sign in to add a comment