Closed Bug 1041626 Opened 10 years ago Closed 10 years ago

Xray enumeration broken for [Unforgeable] interfaces

Categories

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

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla34
Tracking Status
firefox33 + fixed
firefox34 --- fixed

People

(Reporter: bholley, Assigned: bholley)

References

Details

(Keywords: regression)

Attachments

(7 files, 2 obsolete files)

(deleted), patch
bzbarsky
: review+
Details | Diff | Splinter Review
(deleted), patch
bzbarsky
: review+
Details | Diff | Splinter Review
(deleted), patch
bzbarsky
: review+
Details | Diff | Splinter Review
(deleted), patch
bzbarsky
: review+
Details | Diff | Splinter Review
(deleted), patch
bzbarsky
: review+
Details | Diff | Splinter Review
(deleted), patch
bzbarsky
: review+
Details | Diff | Splinter Review
(deleted), patch
bholley
: review+
Details | Diff | Splinter Review
Somehow this fell through the cracks. This basically means that enumerating Location objects over Xrays will skip all the methods. Should be easy enough to fix. I'll write up and attach a patch.
Oops. This is totally my fault, plus lack of tests. :(
Attachment #8459834 - Flags: review?(bzbarsky)
Comment on attachment 8459834 [details] [diff] [review] Part 1 - Generalize XrayEnumerateAttributes. v1 r=me
Attachment #8459834 - Flags: review?(bzbarsky) → review+
Comment on attachment 8459835 [details] [diff] [review] Part 2 - Mirror the logic for attribute enumeration in method enumeration. v1 r=me
Attachment #8459835 - Flags: review?(bzbarsky) → review+
The above patches were what was required to get the new XOWs working, but writing a mochitest for this uncovered more broken stuff. :-( Patches coming up.
Attachment #8460395 - Flags: review?(bzbarsky)
Attached patch Part 4 - Tests. v1 (obsolete) (deleted) — Splinter Review
Attachment #8460396 - Flags: review?(bzbarsky)
[Tracking Requested - why for this release]: Regression in FF33 with potential to break addon-compat. Fixes should be relatively low-risk and ready to land on Aurora this week.
Summary: XrayEnumerateProperties doesn't handle unforgeable methods → Xray enumeration broken for [Unforgeable] interfaces
Comment on attachment 8460395 [details] [diff] [review] Part 3 - Stop bailing out before enumerating Unforgeable attributes. v1 Hm no this is actually wrong.
Attachment #8460395 - Flags: review?(bzbarsky)
Comment on attachment 8460395 [details] [diff] [review] Part 3 - Stop bailing out before enumerating Unforgeable attributes. v1 Won't this also enumerate the non-unforgeable bits on the object itself (i.e. when doing an OWNONLY enumeration)? If not, why not?
Flags: needinfo?(bobbyholley)
Comment on attachment 8460396 [details] [diff] [review] Part 4 - Tests. v1 >+ realOwnProperties.splice(realOwnProperties.indexOf('toJSON'), 1); I'd rather we added "toJSON" to xrayOwnProperties instead. And we should repeat this test with window[0].document, which has non-own bits as well as own (unforgeable) ones. r=me with that.
Attachment #8460396 - Flags: review?(bzbarsky) → review+
Flags: needinfo?(bobbyholley)
Attachment #8460395 - Attachment is obsolete: true
Attachment #8460396 - Attachment is obsolete: true
Attachment #8460619 - Flags: review?(bzbarsky)
Attached patch Part 7 - Tests. v2 r=bz (deleted) — Splinter Review
Attachment #8460623 - Flags: review+
Comment on attachment 8460619 [details] [diff] [review] Part 3 - Make NativeProperties naming more consistent. v1 r=me
Attachment #8460619 - Flags: review?(bzbarsky) → review+
Comment on attachment 8460620 [details] [diff] [review] Part 4 - Use a macro in XrayEnumerateProperties to make the logic easier to follow. v1 I'd prefer the backslashes be lined up with each other. r=me with that.
Attachment #8460620 - Flags: review?(bzbarsky) → review+
Comment on attachment 8460621 [details] [diff] [review] Part 5 - Only define unforgeable attributes on instances. v1 This only makes sense together with part 6, right? Might just want to fold them together. r=me
Attachment #8460621 - Flags: review?(bzbarsky) → review+
Comment on attachment 8460622 [details] [diff] [review] Part 6 - Do a call to XrayEnumerateNativeProps when |type| is still set to eInstance. v1 r=me
Attachment #8460622 - Flags: review?(bzbarsky) → review+
Comment on attachment 8460623 [details] [diff] [review] Part 7 - Tests. v2 r=bz This approval request applies to all the patches listed here. Approval Request Comment [Feature/regressing bug #]: bug 832014 [User impact if declined]: Small potential for addon compat issues [Describe test coverage new/current, TBPL]: Automated test included. Landed on m-c. [Risks and why]: Low-ish risk. This basically only affects Xrays (and thus frontend code + addons), and I think these patches strictly improve our story there. [String/UUID change made/needed]: None.
Attachment #8460623 - Flags: approval-mozilla-aurora?
Attachment #8460623 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Attachment #8460622 - Flags: approval-mozilla-aurora+
Comment on attachment 8460621 [details] [diff] [review] Part 5 - Only define unforgeable attributes on instances. v1 [Triage Comment]
Attachment #8460621 - Flags: approval-mozilla-aurora+
Comment on attachment 8460620 [details] [diff] [review] Part 4 - Use a macro in XrayEnumerateProperties to make the logic easier to follow. v1 [Triage Comment]
Attachment #8460620 - Flags: approval-mozilla-aurora+
Attachment #8460619 - Flags: approval-mozilla-aurora+
Comment on attachment 8459835 [details] [diff] [review] Part 2 - Mirror the logic for attribute enumeration in method enumeration. v1 [Triage Comment]
Attachment #8459835 - Flags: approval-mozilla-aurora+
Attachment #8459834 - Flags: approval-mozilla-aurora-
Comment on attachment 8459834 [details] [diff] [review] Part 1 - Generalize XrayEnumerateAttributes. v1 Approved because we are early in the aurora cycle.
Attachment #8459834 - Flags: approval-mozilla-aurora- → approval-mozilla-aurora+
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: