Closed Bug 979591 Opened 10 years ago Closed 8 years ago

Disallow calling WebIDL constructors as functions for system callers

Categories

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

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla45
Tracking Status
firefox45 --- fixed

People

(Reporter: bholley, Assigned: bzbarsky)

References

Details

(Keywords: addon-compat, dev-doc-complete)

Attachments

(1 file)

In bug 916644, we did this for content. Doing it for chrome is much harder, because of potential addon-compat fallout. But we should probably do it at some point, most likely after we've shipped bug 916644.
Keywords: addon-compat
So an interesting question.  Are we ok landing this #ifndef RELEASE_BUILD for now to flush out addon issues?

It doesn't help that the addon SDK contains some of the buggy callers (like the TextEncoder() bits in buffer.js)...  Addons won't automatically pick up us fixing the SDK, will they?
Also, we need to sort out what happens with typed arrays.  I filed bug 980945 on that.
Keywords: dev-doc-needed
Depends on: 980965
(In reply to Boris Zbarsky [:bz] from comment #1)
> So an interesting question.  Are we ok landing this #ifndef RELEASE_BUILD
> for now to flush out addon issues?

Fine by me.
 
> It doesn't help that the addon SDK contains some of the buggy callers (like
> the TextEncoder() bits in buffer.js)...  Addons won't automatically pick up
> us fixing the SDK, will they?

For newer ones, I think, but not for older ones. Erik would know.
Flags: needinfo?(evold)
Per comments in bug 980945 this bit of the addon sdk is recent and still experimental.  And in particular, it postdates the "addons will use the built-in sdk" bit.  So I think we might be good on the sdk parts here.
Depends on: 981036
(In reply to Bobby Holley (:bholley) from comment #3)
> (In reply to Boris Zbarsky [:bz] from comment #1)
> > It doesn't help that the addon SDK contains some of the buggy callers (like
> > the TextEncoder() bits in buffer.js)...  Addons won't automatically pick up
> > us fixing the SDK, will they?
> 
> For newer ones, I think, but not for older ones. Erik would know.

We've upgraded most add-ons on AMO to use the 1.14 loader which uses the modules shipped with Fx by default, so all of those would pick up any changes to the SDK.

There are very few older ones, which would not pick up the changes.
Flags: needinfo?(evold)
Bug 981036 has been in for a while, and no obvious fallout.  Do we think we can just do this?
Flags: needinfo?(jorge)
Yes, I think it's okay to move forward with this.
Flags: needinfo?(jorge)
Assignee: nobody → bzbarsky
Status: NEW → ASSIGNED
Comment on attachment 8688763 [details] [diff] [review]
Disallow calling WebIDL constructors as functions even for system callers in release builds

Review of attachment 8688763 [details] [diff] [review]:
-----------------------------------------------------------------

\o/
Attachment #8688763 - Flags: review?(peterv) → review+
https://hg.mozilla.org/mozilla-central/rev/2a8b36923abb
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla45
Blocks: 1387149
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.