Closed Bug 453105 Opened 13 years ago Closed 13 years ago

Error: setting a property that has only a getter on cars.com

Categories

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

defect

Tracking

()

VERIFIED FIXED

People

(Reporter: stephend, Assigned: jorendorff)

References

()

Details

(Keywords: regression, verified1.9.1)

Attachments

(2 files)

I think this might be fallout from bug 407216, because I just started seeing this after updating to today's nightly.

Steps to Reproduce:

1. Load http://www.cars.com/go/index.jsp
2. Attempt to use the pulldown menus to select eithed Used or New cars

Actual Results:

Error: setting a property that has only a getter
Source File: http://www.cars.com/includes/js/search.js
Line: 57
Works in: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; en-US; rv:1.9.1b1pre) Gecko/20080830020452 Minefield/3.1b1pre

Broken in: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b1pre) Gecko/20080831162801 Minefield/3.1b1pre
Confirmed under Windows and Linux.

Platform/OS -> ALL
OS: Mac OS X → All
Hardware: PC → All
Taking.  Clearly a regression from bug 407216.  Fix coming shortly.
Assignee: general → jorendorff
Blocks: 407216
Hmm, it wasn't quite what I thought it was.  nsHTMLOptionsCollection is an
example of a class that implements multiple interfaces which each have
definitions of some members, in this case nsIDOMHTMLOptionsCollection.length
(which is not readonly) and nsIDOMHTMLCollection.length (which is).

Quick stubs have problems with these.

Another example smaug pointed out on IRC was nsIDOMEventTarget.addEventListener
(which has 3 parameters) and nsIDOMNSEventTarget (which has 4); there's a
special case in nsDOMClassInfo to cope with this one.  I should just delete
addEventListener from dom_quickstubs.qsconf.  But I'd hate to lose length.

Fix will have to wait for tomorrow.
Component: JavaScript Engine → DOM
Flags: blocking1.9.1?
QA Contact: general → general
Please make sure to add a test when you fix this.
Flags: in-testsuite?
Blocks: 453171
Well, for a workaround, commenting out:

    'nsIDOMHTMLCollection.length',

in dom_quickstubs.qsconf avoids the issue.l
Attached patch v1Splinter Review
The fix described in comment 6.  Filed 453331 about the more general case.
Attachment #336508 - Flags: review?
Attachment #336508 - Flags: review? → review?(bzbarsky)
Attachment #336508 - Flags: superreview+
Attachment #336508 - Flags: review?(bzbarsky)
Attachment #336508 - Flags: review+
Attached patch tests v1Splinter Review
While I'm waiting for the tree to reopen, here are some tests.

(Note: these could be xpcshell-based tests, but bz and I saw some value in testing it in the browser and checking that the control actually gets redrawn.  What the heck.)

I didn't see any naming conventions for reftest files.
Attachment #336583 - Flags: superreview?(bzbarsky)
Attachment #336583 - Flags: review?(bzbarsky)
(In reply to comment #1)
> Works in: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; en-US; rv:1.9.1b1pre)
> Gecko/20080830020452 Minefield/3.1b1pre
> 
> Broken in: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b1pre)
> Gecko/20080831162801 Minefield/3.1b1pre

(In reply to comment #2)
> Confirmed under Windows and Linux.
> 
> Platform/OS -> ALL

Also SeaMonkey (trunk):
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1b1pre) Gecko/20080902011844 SeaMonkey/2.0a1pre

I'll be keeping an eye on this bug too.
P.S. In case that car dealer's page should change, there is another tescase at https://bugzilla.mozilla.org/chart.cgi where (with the bug) the second and third selection boxes appear empty.
The same bug appears to have broken http://ati.amd.com/support/driver.html too.  The selection list isn't filled in.  Works fine on "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9.1b1pre) Gecko/20080831003516 SeaMonkey/2.0a1pre" but fails on the 20080901002016 build.
Attachment #336583 - Flags: superreview?(bzbarsky)
Attachment #336583 - Flags: superreview+
Attachment #336583 - Flags: review?(bzbarsky)
Attachment #336583 - Flags: review+
Comment on attachment 336583 [details] [diff] [review]
tests v1

Looks good.
http://hg.mozilla.org/mozilla-central/rev/2abc3b6b4b17
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
No longer blocks: 453171
Duplicate of this bug: 453171
Verified FIXED using Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; en-US; rv:1.9.1b1pre) Gecko/20080904020533 Minefield/3.1b1pre
Status: RESOLVED → VERIFIED
Flags: blocking1.9.1? → blocking1.9.1+
Keywords: fixed1.9.1
Priority: -- → P1
Verified fixed on the 1.9.1 branch using Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1b4pre) Gecko/20090312 Shiretoko/3.1b4pre. Adding keyword.
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.