Last Comment Bug 863008 - Showing statistics is broken because of webidl conversion of custom event
: Showing statistics is broken because of webidl conversion of custom event
Status: RESOLVED FIXED
:
Product: SeaMonkey
Classification: Client Software
Component: UI Design (show other bugs)
: Trunk
: All All
: -- normal (vote)
: seamonkey2.20
Assigned To: neil@parkwaycc.co.uk
:
Mentors:
https://marketplace.firefox.com/devel...
Depends on: 845555
Blocks:
  Show dependency treegraph
 
Reported: 2013-04-17 12:59 PDT by neil@parkwaycc.co.uk
Modified: 2013-04-21 02:38 PDT (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
fixed
fixed
fixed


Attachments
Possible patch (1.31 KB, patch)
2013-04-17 13:02 PDT, neil@parkwaycc.co.uk
no flags Details | Diff | Review
Proposed patch (1.23 KB, patch)
2013-04-17 13:03 PDT, neil@parkwaycc.co.uk
philip.chee: review+
iann_bugzilla: approval‑comm‑aurora+
iann_bugzilla: approval‑comm‑beta+
Details | Diff | Review

Description neil@parkwaycc.co.uk 2013-04-17 12:59:38 PDT
Now that events are webidl objects instead of XPConnect objects, they follow webidl security rules, which means that events created using chrome objects cannot be read from content. This affects the context menu which tries to send a chrome event to the videocontrols binding. The solution is to use a content object to create the event.
Comment 1 neil@parkwaycc.co.uk 2013-04-17 13:02:21 PDT
Created attachment 738695 [details] [diff] [review]
Possible patch

This patch has an extra line that works around an xbl_scopes issue that was also fixed in toolkit as part of bug 845555, but may or may not get uplifted.
Comment 2 neil@parkwaycc.co.uk 2013-04-17 13:03:27 PDT
Created attachment 738698 [details] [diff] [review]
Proposed patch
Comment 3 Philip Chee 2013-04-18 02:02:06 PDT
> in toolkit as part of bug 845555, but may or may not get uplifted.
Bug 845555 landed on aurora.

>     var statsShowing = this.onVideo &&
>                        this.target.wrappedJSObject.mozMediaStatisticsShowing;
Don't you need to unwrap this as well?
Comment 4 neil@parkwaycc.co.uk 2013-04-18 02:11:59 PDT
(In reply to Philip Chee from comment #3)
> > in toolkit as part of bug 845555, but may or may not get uplifted.
> Bug 845555 landed on aurora.
> 
> >     var statsShowing = this.onVideo &&
> >                        this.target.wrappedJSObject.mozMediaStatisticsShowing;
> Don't you need to unwrap this as well?

.wrappedJSObject is the old way to unwrap, I guess I could update it for consistency, but then I'm not sure how to wrap the line (pun intended).
Comment 5 Philip Chee 2013-04-18 02:14:33 PDT
Comment on attachment 738698 [details] [diff] [review]
Proposed patch

r=me
Comment 6 neil@parkwaycc.co.uk 2013-04-18 13:03:38 PDT
Pushed comm-central changeset 9e3a901b2193.
Comment 7 neil@parkwaycc.co.uk 2013-04-18 13:35:00 PDT
Comment on attachment 738698 [details] [diff] [review]
Proposed patch

[Approval Request Comment]
Regression caused by (bug #): Some m-c change as usual
User impact if declined: Menuitem no longer works
Testing completed (on m-c, etc.): Landed on c-c
Risk to taking this patch (and alternatives if risky): Low, only affects the menuitem itself, and dependent m-c fixes have already landed
String changes made by this patch: None

Note You need to log in before you can comment on or make changes to this bug.