Closed Bug 311295 Opened 20 years ago Closed 20 years ago

select.options[0] doesn't become undefined when last option is removed (was: Litmus script hangs)

Categories

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

1.8 Branch
x86
All
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: asa, Assigned: mrbkap)

References

()

Details

(Keywords: verified1.8)

Attachments

(2 files)

starting in the late build from Oct 4 (not present in the morning build Oct 4) the script that loads when clicking the Firefox smoketest link http://testrunner.mozilla.org/litmus/run_tests.cgi?product=1&testgroup=1 produces the Unresponsive Script warning.
Attached file simple testcase
Possibly fallout from bug 311022 which fits the regression window. Blake, can you look at this?
Flags: blocking1.8b5?
Summary: litmus script hangs → select.options[0] doesn't become undefined when last option is removed (was: Litmus script hangs)
This is almost certainly a regression from bug 311090/bug 310351. I'll know more once I get this in a debugger, but I'll bet the property caching stuff that jst warned me about when I first showed him that patch is biting us here. My debug build is in the middle of a full-rebuild, but there may be a one-line fix to nsGenericArraySH::NewResolve that fixes this (I bet the property we set needs JSPROP_SHARED).
Assignee: general → mrbkap
Flags: blocking1.8b5? → blocking1.8b5+
Do we think this will be a widespread problem?
Status: NEW → ASSIGNED
Attached patch FixSplinter Review
I was right. This makes my build pass the testcase.
Attachment #198659 - Flags: superreview?(brendan)
Attachment #198659 - Flags: review?(brendan)
Despite my confusion on IRC, this fix still does fix this bug. The problem is that bug 296230 hasn't landed on the branch, and is the cause of an outstanding regression. That bug makes nsArraySH::GetProperty set *vp = JSVAL_VOID, which fixes this on trunk. Brendan had some misgivings about this approach on IRC, but I don't see a way around it... Thoughts welcome.
(In reply to comment #6) > Brendan had some misgivings about this approach on IRC, but I don't see a way > around it... Thoughts welcome. It's fine to use JSPROP_SHARED so long as the object did not hold the property value by the slot, and only by that strong ref. Otherwise, you'll recompute and recreate the value on every get. That's not an issue with XPCWrappedNatives, but it could be with other sorts of objects. /be
Comment on attachment 198659 [details] [diff] [review] Fix This is ok, we think, thanks to XPConnect wrapped native caching. /be
Attachment #198659 - Flags: superreview?(brendan)
Attachment #198659 - Flags: superreview+
Attachment #198659 - Flags: review?(brendan)
Attachment #198659 - Flags: review+
Attachment #198659 - Flags: approval1.8b5+
Checked in to MOZILLA_1_8_BRANCH, where this is needed. Trunk is OK as is.
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Keywords: fixed1.8
Resolution: --- → FIXED
Version: Trunk → 1.8 Branch
(In reply to comment #9) > Checked in to MOZILLA_1_8_BRANCH, where this is needed. Trunk is OK as is. I think we want JSPROP_SHARED in both places -- do we have that on the trunk already? If we did have it on the trunk, we wouldn't need to set *vp = JSVAL_VOID in any peterv patch.... /be
Testcase Pass on: Windows 2005-10-06-05-mozilla1.8 Linux 2005-10-06-04-mozilla1.8
Keywords: fixed1.8verified1.8
Looks good on Mac Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8b5) Gecko/20051006 Firefox/1.4.1. Test case passes.
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: