New issue
Advanced search Search tips

Issue 782121 link

Starred by 0 users

Issue metadata

Status: Fixed
Owner:
Closed: Nov 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Chrome , Mac , Fuchsia
Pri: 2
Type: Bug

Blocking:
issue 634270
issue 779938



Sign in to add a comment

Support [SecureContext] attributes on partial interfaces

Project Member Reported by nhiroki@chromium.org, Nov 7 2017

Issue description

WebIDL implementation should support the [SecureContext] attribute on "partial interface" + "static attribute".

Context: https://chromium-review.googlesource.com/c/chromium/src/+/746494#message-ee8c57df5b428f02835daf3844129116f300c8f0
 
I suspect this is also not implemented for "partial interface" + "non-static attribute":
https://chromium-review.googlesource.com/c/chromium/src/+/746494#message-19a8f9c259280c79429b1ab9477ff7a72a598110

Comment 2 by peria@chromium.org, Nov 7 2017

Owner: peria@chromium.org
Status: Assigned (was: Available)
Blocking: 779938
New features tend to be restricted to secure contexts, so it would be nice if we can have this feature soon. Worklets also want this feature for  issue 779938 . There is a workaround, but it could cause null/undefined incompatibility issue. See:
https://chromium-review.googlesource.com/c/chromium/src/+/746494#message-48171c3f594467cfd00f4704c676a310f13ea799
Status: Started (was: Assigned)
peria@ has a CL:
https://chromium-review.googlesource.com/c/chromium/src/+/758278
Project Member

Comment 6 by bugdroid1@chromium.org, Nov 10 2017

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

commit b2bfbd58e062385c2585ef4e11058c7777d5581e
Author: Hitoshi Yoshida <peria@chromium.org>
Date: Fri Nov 10 01:42:36 2017

bindings: Support [SecureContext] on static attributes in partial interface

In bindings layer, we did not take care of [SecureContext] extended
attribute on contexts and static attributes (i.e. on-interface properties)
of partial interfaces.

This CL makes those interface members accessible only if the context
is secure.


Bug:  779938 ,  782121 
Change-Id: Iff5a5b85ce8d9b4bd20871298b93b60c054246ba
Reviewed-on: https://chromium-review.googlesource.com/758278
Reviewed-by: Kenichi Ishibashi <bashi@chromium.org>
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Hitoshi Yoshida <peria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#515408}
[modify] https://crrev.com/b2bfbd58e062385c2585ef4e11058c7777d5581e/third_party/WebKit/Source/bindings/scripts/v8_interface.py
[modify] https://crrev.com/b2bfbd58e062385c2585ef4e11058c7777d5581e/third_party/WebKit/Source/bindings/templates/attributes.cpp.tmpl
[modify] https://crrev.com/b2bfbd58e062385c2585ef4e11058c7777d5581e/third_party/WebKit/Source/bindings/templates/interface_base.cpp.tmpl
[modify] https://crrev.com/b2bfbd58e062385c2585ef4e11058c7777d5581e/third_party/WebKit/Source/bindings/tests/idls/modules/TestInterfacePartial4.idl
[modify] https://crrev.com/b2bfbd58e062385c2585ef4e11058c7777d5581e/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface.cpp
[modify] https://crrev.com/b2bfbd58e062385c2585ef4e11058c7777d5581e/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceSecureContext.cpp
[modify] https://crrev.com/b2bfbd58e062385c2585ef4e11058c7777d5581e/third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterface5.cpp
[modify] https://crrev.com/b2bfbd58e062385c2585ef4e11058c7777d5581e/third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterfacePartial.cpp

Comment 7 by peria@chromium.org, Nov 10 2017

Labels: OS-Android OS-Chrome OS-Fuchsia OS-Linux OS-Mac OS-Windows
Summary: Support [SecureContext] attributes on partial interfaces (was: Support the [SecureContext] attribute on "partial interface" + "static attribute")
CL in #6 fixes this issue for static attributes, but not for non-static attributes.
Project Member

Comment 8 by bugdroid1@chromium.org, Nov 16 2017

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

commit 86bc410e0dd95f21ea72e6f392251891f6c44816
Author: Hitoshi Yoshida <peria@chromium.org>
Date: Thu Nov 16 07:11:52 2017

bindings: Install context dependent properties on window wrapper.

This CL makes PreparePrototypeAndInterface methods work also for
instance objects, and work with the Window wrapper as a global object.
The methods are renamed as InstallConditionalFeaturesOnObjects.


Bug:  782121 
Change-Id: I9940e8f4f54cb7566437859f5de2d35490a1f1f6
Reviewed-on: https://chromium-review.googlesource.com/765607
Commit-Queue: Hitoshi Yoshida <peria@chromium.org>
Reviewed-by: Yuki Shiino <yukishiino@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Reviewed-by: Kenichi Ishibashi <bashi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#517009}
[modify] https://crrev.com/86bc410e0dd95f21ea72e6f392251891f6c44816/third_party/WebKit/Source/bindings/core/v8/LocalWindowProxy.cpp
[modify] https://crrev.com/86bc410e0dd95f21ea72e6f392251891f6c44816/third_party/WebKit/Source/bindings/core/v8/V8ContextSnapshot.cpp
[modify] https://crrev.com/86bc410e0dd95f21ea72e6f392251891f6c44816/third_party/WebKit/Source/bindings/core/v8/V8ContextSnapshot.h
[modify] https://crrev.com/86bc410e0dd95f21ea72e6f392251891f6c44816/third_party/WebKit/Source/bindings/scripts/code_generator.py
[modify] https://crrev.com/86bc410e0dd95f21ea72e6f392251891f6c44816/third_party/WebKit/Source/bindings/scripts/v8_interface.py
[modify] https://crrev.com/86bc410e0dd95f21ea72e6f392251891f6c44816/third_party/WebKit/Source/bindings/templates/attributes.cpp.tmpl
[modify] https://crrev.com/86bc410e0dd95f21ea72e6f392251891f6c44816/third_party/WebKit/Source/bindings/templates/interface.cpp.tmpl
[modify] https://crrev.com/86bc410e0dd95f21ea72e6f392251891f6c44816/third_party/WebKit/Source/bindings/templates/interface.h.tmpl
[modify] https://crrev.com/86bc410e0dd95f21ea72e6f392251891f6c44816/third_party/WebKit/Source/bindings/templates/interface_base.cpp.tmpl
[modify] https://crrev.com/86bc410e0dd95f21ea72e6f392251891f6c44816/third_party/WebKit/Source/bindings/templates/methods.cpp.tmpl
[modify] https://crrev.com/86bc410e0dd95f21ea72e6f392251891f6c44816/third_party/WebKit/Source/bindings/templates/partial_interface.cpp.tmpl
[modify] https://crrev.com/86bc410e0dd95f21ea72e6f392251891f6c44816/third_party/WebKit/Source/bindings/templates/partial_interface.h.tmpl
[modify] https://crrev.com/86bc410e0dd95f21ea72e6f392251891f6c44816/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface.cpp
[modify] https://crrev.com/86bc410e0dd95f21ea72e6f392251891f6c44816/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface.h
[modify] https://crrev.com/86bc410e0dd95f21ea72e6f392251891f6c44816/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface2.cpp
[modify] https://crrev.com/86bc410e0dd95f21ea72e6f392251891f6c44816/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface2.h
[modify] https://crrev.com/86bc410e0dd95f21ea72e6f392251891f6c44816/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceSecureContext.cpp
[modify] https://crrev.com/86bc410e0dd95f21ea72e6f392251891f6c44816/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceSecureContext.h
[modify] https://crrev.com/86bc410e0dd95f21ea72e6f392251891f6c44816/third_party/WebKit/Source/bindings/tests/results/core/V8TestObject.cpp
[modify] https://crrev.com/86bc410e0dd95f21ea72e6f392251891f6c44816/third_party/WebKit/Source/bindings/tests/results/core/V8TestObject.h
[modify] https://crrev.com/86bc410e0dd95f21ea72e6f392251891f6c44816/third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterface5.cpp
[modify] https://crrev.com/86bc410e0dd95f21ea72e6f392251891f6c44816/third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterface5.h
[modify] https://crrev.com/86bc410e0dd95f21ea72e6f392251891f6c44816/third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterfacePartial.cpp
[modify] https://crrev.com/86bc410e0dd95f21ea72e6f392251891f6c44816/third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterfacePartial.h
[modify] https://crrev.com/86bc410e0dd95f21ea72e6f392251891f6c44816/third_party/WebKit/Source/platform/bindings/V8PerContextData.cpp
[modify] https://crrev.com/86bc410e0dd95f21ea72e6f392251891f6c44816/third_party/WebKit/Source/platform/bindings/WrapperTypeInfo.h

Comment 9 by jsb...@chromium.org, Nov 16 2017

Blocking: 634270

Comment 10 by peria@chromium.org, Nov 30 2017

Status: Fixed (was: Started)

Sign in to add a comment