Closed Bug 854836 Opened 11 years ago Closed 11 years ago

Changing a property of MouseEvent to be [Unforgeable] doesn't regenerate MouseEventBinding.cpp

Categories

(Core :: DOM: Core & HTML, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: smaug, Unassigned)

References

Details

Attachments

(1 file)

https://bug637248.bugzilla.mozilla.org/attachment.cgi?id=729463 works with
events which are Events, but if one creates for example MouseEvent, it is still
possible to set .isTrusted.
This should work.  Note http://mxr.mozilla.org/mozilla-central/source/dom/bindings/parser/WebIDL.py#674

And I just spot-checked that SVGDocumentBinding has the "location" bits in it...

Olli, can you post the testcase you were using to test this?
Note, though, that this will only work for objects that are actually on WebIDL bindings, which nsDOMMouseEvent doesn't seem to be; I don't see it calling SetIsDOMBinding() anywhere.
Just converting MouseEvent to WebIDL will fix the issue?
MouseEvent uses WebIDL
Testcase was (execute in web console)
var e = new Event("foo"); e.isTrusted = true; e.isTrusted;
vs.
var e = new MouseEvent("foo"); e.isTrusted = true; e.isTrusted;
Attached file test (deleted) —
Looks like MouseEvent doesn't really have isTrusted when isTrusted is marked
Unforgeable.
The issue is that adding [Unforgeable] on Event doesn't recreate MouseEventBinding.cpp.  Removing that file and building makes things work.

It _also_ doesn't recreate UIEventBinding.cpp.

This confuses me, becaise UIEventBinding.cpp.pp has:

UIEventBinding.cpp: /Users/bzbarsky/mozilla/inbound/mozilla/dom/webidl/Event.webidl
UIEventBinding.cpp: /Users/bzbarsky/mozilla/inbound/mozilla/dom/webidl/UIEvent.webidl

Kyle, what's going on there?  Seems like changing Event.webidl should rebuild UIEventBinding.cpp here!
Flags: needinfo?(khuey)
(In reply to Boris Zbarsky (:bz) from comment #7)
> The issue is that adding [Unforgeable] on Event doesn't recreate
> MouseEventBinding.cpp.  Removing that file and building makes things work.

Crazy question: is that with a parallel or non-parallel build?  Does it work with the other kind of build?
This is obviously a parallel build.  ;)  But doing it with MAKEFLAGS="" doesn't help.
Sometimes rebuilding dom/bindings doesn't update files correctly. Need a new bug?
That's what this bug is about at the moment.
The build problems should be fixed now.
Flags: needinfo?(khuey)
Attachment #729536 - Attachment is patch: false
Attachment #729536 - Attachment mime type: text/plain → text/html
I'm going to mark this worksforme, since it does.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → WORKSFORME
Summary: [Unforgeable] doesn't unforgeable-ize properties in the instances of inheriting interfaces → Changing a property of MouseEvent to be [Unforgeable] doesn't regenerate MouseEventBinding.cpp
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: