New issue
Advanced search Search tips

Issue 854058 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Chrome , Mac
Pri: 3
Type: Bug

Blocking:
issue 678905


Participants' hotlists:
Hotlist-Bindings-IDLCompiler


Sign in to add a comment

Attributes are not exposed in SecureContext after calling frame.remove().

Project Member Reported by jinho.b...@samsung.com, Jun 19 2018

Issue description

This issue is raised in https://chromium-review.googlesource.com/c/chromium/src/+/818666/9..10/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/detached-context.https.html.

There might be a bug in WebIDL binding implementation. The IDL attributes in SecureContext is setup by InstallConditionalFeatures(). But once calling frame.remove(), then the InstallConditionalFeatures() is never called. I don't know why it is caused exactly but I guess that the binding implementation might determine that the context is no longer secure becuase the frame was already removed.

// The following test code will be failed.
// Because InstallConditionalFeatures() is not called for unknown reason.
  frame.remove();
  assert_equals(r.active.state, 'activated');

// If we change the test as follows, it works well
// because `const unused = r.active` causes calling InstallConditionalFeatures().
// The r.active's V8 wrapper object is constructed before calling frame.remove().
  const unused = r.active;
  frame.remove();
  assert_equals(r.active.state, 'activated');
 

Comment 1 by falken@chromium.org, Jun 19 2018

Blocking: 678905
Cc: peria@chromium.org
Project Member

Comment 3 by bugdroid1@chromium.org, Jun 19 2018

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

commit 2cd02558b19641fc8eb06f32b8199d1967ad8a89
Author: Jinho Bang <jinho.bang@samsung.com>
Date: Tue Jun 19 17:30:40 2018

ServiceWorker: Use [SecureContext] instead of manual check

Until now, we had to use IsSecureContext() to check whether an execution
context is a secure context manually. But we can use [SecureContext]
instead of the manual check now. After this change, all related APIs
including ServiceWorkerContainer will not be exposed in non-secure
context.

Chrome status: https://www.chromestatus.com/feature/4835970390163456

Bug:  542499 , 854058
Change-Id: I0e207fee5c591d595c0e11c121cc8a0f555b5be3
Reviewed-on: https://chromium-review.googlesource.com/818666
Commit-Queue: Jinho Bang <jinho.bang@samsung.com>
Reviewed-by: Matt Falkenhagen <falken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#568509}
[rename] https://crrev.com/2cd02558b19641fc8eb06f32b8199d1967ad8a89/third_party/WebKit/LayoutTests/external/wpt/BackgroundSync/interfaces.https.any.js
[modify] https://crrev.com/2cd02558b19641fc8eb06f32b8199d1967ad8a89/third_party/WebKit/LayoutTests/external/wpt/background-fetch/interfaces-worker.https.html
[rename] https://crrev.com/2cd02558b19641fc8eb06f32b8199d1967ad8a89/third_party/WebKit/LayoutTests/external/wpt/background-fetch/interfaces.https-expected.txt
[rename] https://crrev.com/2cd02558b19641fc8eb06f32b8199d1967ad8a89/third_party/WebKit/LayoutTests/external/wpt/background-fetch/interfaces.https.html
[rename] https://crrev.com/2cd02558b19641fc8eb06f32b8199d1967ad8a89/third_party/WebKit/LayoutTests/external/wpt/background-fetch/interfaces.https.worker-expected.txt
[rename] https://crrev.com/2cd02558b19641fc8eb06f32b8199d1967ad8a89/third_party/WebKit/LayoutTests/external/wpt/background-fetch/interfaces.https.worker.js
[delete] https://crrev.com/dace0ac2c4f891d9dd6396c5d9d424a1980700c3/third_party/WebKit/LayoutTests/external/wpt/server-timing/service_worker_idl-expected.txt
[rename] https://crrev.com/2cd02558b19641fc8eb06f32b8199d1967ad8a89/third_party/WebKit/LayoutTests/external/wpt/server-timing/service_worker_idl.https.html
[add] https://crrev.com/2cd02558b19641fc8eb06f32b8199d1967ad8a89/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/detached-context.https-expected.txt
[modify] https://crrev.com/2cd02558b19641fc8eb06f32b8199d1967ad8a89/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/http-to-https-redirect-and-register.https.html
[modify] https://crrev.com/2cd02558b19641fc8eb06f32b8199d1967ad8a89/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/local-url-inherit-controller.https-expected.txt
[modify] https://crrev.com/2cd02558b19641fc8eb06f32b8199d1967ad8a89/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/http-to-https-redirect-and-register-iframe.html
[modify] https://crrev.com/2cd02558b19641fc8eb06f32b8199d1967ad8a89/third_party/WebKit/LayoutTests/http/tests/security/powerfulFeatureRestrictions/serviceworker-on-insecure-origin.html
[modify] https://crrev.com/2cd02558b19641fc8eb06f32b8199d1967ad8a89/third_party/WebKit/LayoutTests/http/tests/serviceworker/http-to-https-redirect-and-register-iframe.html
[modify] https://crrev.com/2cd02558b19641fc8eb06f32b8199d1967ad8a89/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/claim-worker.js
[modify] https://crrev.com/2cd02558b19641fc8eb06f32b8199d1967ad8a89/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/insecure-inscope.html
[modify] https://crrev.com/2cd02558b19641fc8eb06f32b8199d1967ad8a89/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/register.html
[modify] https://crrev.com/2cd02558b19641fc8eb06f32b8199d1967ad8a89/third_party/blink/renderer/modules/serviceworkers/navigator_service_worker.idl
[modify] https://crrev.com/2cd02558b19641fc8eb06f32b8199d1967ad8a89/third_party/blink/renderer/modules/serviceworkers/service_worker.idl
[modify] https://crrev.com/2cd02558b19641fc8eb06f32b8199d1967ad8a89/third_party/blink/renderer/modules/serviceworkers/service_worker_container.cc
[modify] https://crrev.com/2cd02558b19641fc8eb06f32b8199d1967ad8a89/third_party/blink/renderer/modules/serviceworkers/service_worker_container.idl
[modify] https://crrev.com/2cd02558b19641fc8eb06f32b8199d1967ad8a89/third_party/blink/renderer/modules/serviceworkers/service_worker_container_test.cc
[modify] https://crrev.com/2cd02558b19641fc8eb06f32b8199d1967ad8a89/third_party/blink/renderer/modules/serviceworkers/service_worker_registration.idl

Labels: Hotlist-Bindings-IDLCompiler

Sign in to add a comment