Closed
Bug 916644
Opened 11 years ago
Closed 11 years ago
Disallow calling WebIDL constructors as functions on the web
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla30
Tracking | Status | |
---|---|---|
relnote-firefox | --- | 30+ |
People
(Reporter: bzbarsky, Assigned: bholley)
References
Details
(Keywords: dev-doc-complete, site-compat)
Attachments
(1 file, 2 obsolete files)
2.85 KB,
patch
|
bzbarsky
:
review+
|
Details | Diff | Splinter Review |
See https://www.w3.org/Bugs/Public/show_bug.cgi?id=22808
We can't just do this: our chrome uses this all over. Including the addon SDK. A try push with this change is beautifully orange.
So I'm going to see if we can disable this for non-chrome callers only, for now and then get our tests passing. And if we can, I will then reenable it for non-chrome code, add telemetry, and see what we see in the wild.
![]() |
Reporter | |
Comment 1•11 years ago
|
||
https://tbpl.mozilla.org/?tree=Try&rev=f2d188af713c says failures in M1, M2, M3, M5, mochitest-browser-chrome, mochitest-chrome, crashtest, crashtest-ipc, jetpack tests. And probably the robocop tests (rc2) on Android 2.2.
![]() |
Reporter | |
Comment 2•11 years ago
|
||
![]() |
Reporter | |
Comment 3•11 years ago
|
||
![]() |
Reporter | |
Updated•11 years ago
|
Attachment #8378065 -
Attachment is obsolete: true
Assignee | ||
Comment 4•11 years ago
|
||
Assignee | ||
Updated•11 years ago
|
Assignee: nobody → bobbyholley
Assignee | ||
Comment 5•11 years ago
|
||
Assignee | ||
Updated•11 years ago
|
Summary: Measure whether we can disallow calling WebIDL constructors as functions → Disallow calling WebIDL constructors as functions on the web
Assignee | ||
Comment 6•11 years ago
|
||
I DeMorgan-ified the previous patch because I was finding it very difficult to
grok, even though I understood the change it was making.
Attachment #8381519 -
Flags: review?(bzbarsky)
Assignee | ||
Comment 7•11 years ago
|
||
Assignee | ||
Updated•11 years ago
|
Attachment #8378066 -
Attachment is obsolete: true
![]() |
Reporter | |
Comment 8•11 years ago
|
||
Comment on attachment 8381519 [details] [diff] [review]
Disable invoking WebIDL constructors without |new| unless you have the system principal. v2
r=me, but before you can land this you need to fix the gaia code that depends on the current behavior, no?
At the very least, http://mxr.mozilla.org/gaia/search?string=TextEncoder%28&find=&findi=&filter=^[^\0]*%24&hitlimit=&tree=gaia shows hits in the mail app, and similar for TextDecoder. Not sure about other constructors that are worth checking for (e.g. Event() is really hard to search for).
If this passed tests, that mostly tells us that b2g test coverage is terrible, which is not a surprise. :(
Attachment #8381519 -
Flags: review?(bzbarsky) → review+
Assignee | ||
Comment 9•11 years ago
|
||
(In reply to Boris Zbarsky [:bz] (reviews will be slow; ask someone else) from comment #8)
> Comment on attachment 8381519 [details] [diff] [review]
> Disable invoking WebIDL constructors without |new| unless you have the
> system principal. v2
>
> r=me, but before you can land this you need to fix the gaia code that
> depends on the current behavior, no?
Yeah. The try push in comment 7 is orange on Gaia, though probably not as orange as it should be. I'm looking into it, but it's all bundled up in sinon.js stuff.
Assignee | ||
Comment 10•11 years ago
|
||
Try push with a custom gaia including my changes from the dependent bugs:
https://tbpl.mozilla.org/?tree=Try&rev=0bf700091431
Assignee | ||
Comment 11•11 years ago
|
||
Assignee | ||
Comment 12•11 years ago
|
||
Assignee | ||
Comment 13•11 years ago
|
||
(In reply to Bobby Holley (:bholley) from comment #12)
> https://tbpl.mozilla.org/?tree=Try&rev=05180848d19c
The gaia stuff here is green with my patches.
Assignee | ||
Comment 14•11 years ago
|
||
Gaia changes should be merged in now. Try push without custom gaia:
https://tbpl.mozilla.org/?tree=Try&rev=6831a6cfbebc
Assignee | ||
Comment 15•11 years ago
|
||
Looks like Gaia bumps don't git m-c as frequently as I'd thought. Should be there by now:
https://tbpl.mozilla.org/?tree=Try&rev=33eb326fcc42
Updated•11 years ago
|
Keywords: dev-doc-needed,
site-compat
Assignee | ||
Comment 16•11 years ago
|
||
Comment 17•11 years ago
|
||
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla30
![]() |
Reporter | |
Comment 18•11 years ago
|
||
We probably want a followup for fixing the system-caller behavior too...
Updated•11 years ago
|
relnote-firefox:
--- → ?
Updated•11 years ago
|
Comment 19•11 years ago
|
||
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•