Names added through external DOM classinfo don't resolve on global object

RESOLVED FIXED in mozilla1.9.2

Status

()

RESOLVED FIXED
9 years ago
9 years ago

People

(Reporter: peterv, Assigned: peterv)

Tracking

Trunk
mozilla1.9.2
Points:
---
Bug Flags:
blocking1.9.2 +
in-testsuite ?

Firefox Tracking Flags

(status1.9.2 beta5-fixed)

Details

Attachments

(2 attachments)

(Assignee)

Description

9 years ago
Created attachment 416523 [details] [diff] [review]
v1

This blocks the CoolIris extension from working in 1.9.2.

The check for the non-null mData->mProtoChainInterface in nsDOMClassInfo::PostCreatePrototype fails (because CoolIris doesn't supply a protochain interface), and so we never define the name on the global object. That check originally was in nsDOMClassInfo::PostCreate where it was fine (only need to set up prototype chain if there's a non-nsISupports interface on the prototype chain), but in PostCreatePrototype it looks unneeded. Only the debugging code needs the check, because it uses mProtoChainInterface to check its name. The code in ResolvePrototype, which gets called from PostCreatePrototype, looks like it can deal with null or nsISupports for the mProtoChainInterface.
Flags: blocking1.9.2?
Attachment #416523 - Flags: review?(jst)
a=beltzner to land on trunk when reviewed
Is it possible to make an automated test case for this so we don't break this in the future again?
Comment on attachment 416523 [details] [diff] [review]
v1

Looks good.
Attachment #416523 - Flags: review?(jst) → review+
(Assignee)

Comment 4

9 years ago
Yeah, I've been looking at how to test this.
(Assignee)

Comment 5

9 years ago
Created attachment 416692 [details] [diff] [review]
Part 2 v1

We need an additional fix so that |new foo()| also works. Already got r=jst in person on this one.
Attachment #416692 - Flags: review+
Now that we know this fixes everything we need to fix to get cooliris back in business, we should block on this for 1.9.2.
Flags: blocking1.9.2? → blocking1.9.2+
(Assignee)

Comment 7

9 years ago
http://hg.mozilla.org/mozilla-central/rev/abd2dcd924d9
http://hg.mozilla.org/mozilla-central/rev/c7bbc4ce86fa

http://hg.mozilla.org/releases/mozilla-1.9.2/rev/f3f8b87e11e9
http://hg.mozilla.org/releases/mozilla-1.9.2/rev/0b5a1d59f5f6

Still working on the test.
Status: ASSIGNED → RESOLVED
Last Resolved: 9 years ago
status1.9.2: --- → beta5-fixed
Flags: in-testsuite?
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.2
You need to log in before you can comment on or make changes to this bug.