Closed Bug 366396 Opened 18 years ago Closed 18 years ago

"Assertion failure: !SPROP_HAS_STUB_GETTER(sprop)" with setter and %=

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
critical

Tracking

()

VERIFIED FIXED

People

(Reporter: jruderman, Assigned: brendan)

References

Details

(4 keywords)

Attachments

(1 file)

js> this.__defineSetter__("x", function() {}); x %= 5; Assertion failure: !SPROP_HAS_STUB_GETTER(sprop), at jsobj.c:3427
Attached patch fix (deleted) — Splinter Review
The JSMSG_GETTER_ONLY error makes for a big difference between js_NativeGet and js_NativeSet: the former must handle the stub case before calling SPROP_GET (which now requires a non-stub [null] getter), whether or not there's a slot allocated. OTOH, js_NativeSet knows that if there's no slot and no setter, SPROP_SET will throw before it might dereference a null (stub) setter. /be
Assignee: general → brendan
Status: NEW → ASSIGNED
Attachment #250927 - Flags: review?(mrbkap)
Attachment #250927 - Flags: review?(mrbkap) → review+
Fixed on trunk (with slightly improved comment): js/src/jsobj.c rev 3.319 /be
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
This was another regression from bug 365851. /be
Comment on attachment 250927 [details] [diff] [review] fix Yikes, this is needed on the branches, stat! /be
Attachment #250927 - Flags: approval1.8.1.2?
Attachment #250927 - Flags: approval1.8.0.10?
Flags: blocking1.8.1.2?
OS: Mac OS X → All
Hardware: Macintosh → All
Flags: blocking1.8.1.2?
Flags: blocking1.8.1.2+
Flags: blocking1.8.0.10+
Comment on attachment 250927 [details] [diff] [review] fix Approved for both branches, a=jay for drivers.
Attachment #250927 - Flags: approval1.8.1.2?
Attachment #250927 - Flags: approval1.8.1.2+
Attachment #250927 - Flags: approval1.8.0.10?
Attachment #250927 - Flags: approval1.8.0.10+
Fixed on 1.8 and 1.8 branches: js/src/jsobj.c rev 3.208.2.47 js/src/jsscope.h rev 3.38.4.2 js/src/jsobj.c rev 3.208.2.12.2.21 js/src/jsscope.h rev 3.38.12.1 /be
Keywords: fixed1.8.1fixed1.8.1.2
/cvsroot/mozilla/js/tests/js1_5/GetSet/regress-366396.js,v <-- regress-366396.js initial revision: 1.1
Flags: in-testsuite+
verified fixed 1.8.0, 1.8.1, 1.9.0 2007-01-23 win/mac*/linux
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: