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

Issue 712070 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: May 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

isTrusted attribute doesn't exist in some Event subclasses

Project Member Reported by tkent@chromium.org, Apr 17 2017

Issue description

Chrome Version: 60 canary
OS: All

What steps will reproduce the problem?
(1) Open http://w3c-test.org/dom/nodes/Document-createEvent.html

or

(1) Run the following code in DevTools Console:

var e = document.createEvent('CloseEvent');
e.isTrusted

What is the expected result?
isTrusted attribute exists in all Event subclasses.

What happens instead?
*Some* subclasses don't have it. e.g.
CloseEvent
DeviceMotionEvent
DeviceOrientationEvent
IDBVersionChangeEvent
StorageEvent
WebGLContextEvent

http://w3c-test.org/dom/nodes/Document-createEvent.html shows "isTrusted should be initialized to false expected (boolean) false but got (undefined) undefined" for them.

Please use labels and text to provide additional information.
bashi@ said we might need special handling for [Unforgeable] and modules.

 

Comment 1 by bashi@chromium.org, Apr 17 2017

Owner: yukishiino@chromium.org
Status: Available (was: Untriaged)
yukishiino@: Could you take a look at this? I suspect that we don't propagate [Unforgeable] attributes correctly when the parent interface is defined in core/ and a sub interface is defined in modules/.

Comment 2 by tkent@chromium.org, Apr 17 2017

Description: Show this description

Comment 3 by j...@opera.com, Apr 21 2017

Cc: j...@opera.com
I had a quick look. The code that implements inheriting of Unforgeable attributes simply makes sure that the inheritance only happens between interfaces in the same component. So an event interface in a module just won't get isTrusted.

I'm not sure why this restriction is there. For e.g. CloseEvent, letting the attribute be inherited, produces an attribute getter that looks like this:

static void isTrustedAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) {
  v8::Local<v8::Object> holder = info.Holder();

  CloseEvent* impl = V8CloseEvent::toImpl(holder);

  V8SetReturnValueBool(info, impl->isTrusted());
}

Surely there's no component-crossing error there?
Cc: yukishiino@chromium.org
Owner: j...@opera.com
Status: Started (was: Available)
Project Member

Comment 5 by bugdroid1@chromium.org, May 12 2017

Comment 6 by j...@opera.com, May 12 2017

Status: Fixed (was: Started)

Sign in to add a comment