...we didn't notice this until vidur and jst started passing around readable and writable references. We had already noticed this and fixed it (some time ago) in |ns[C]String| and subclasses. The basic problem is that even if you supply _other_ |operator=|s, if you don't specifically declare the one that is the copy- assignment operator, the compiler will auto-generate one for you. |nsAReadableString| shouldn't have one at all (since it's immutable). The one that gets generated for |nsAWritableString| does nothing (since writable has no concrete state), but that's bad if this one gets picked for an assignment instead of one of the ones that does work ... which is what happened.
Created attachment 12703 [details] [diff] [review] adding appropriate signatures, and commenting things better
this builds and runs in my tests (adding new tests to account for the problem), just need r= and a=
Status: NEW → ASSIGNED
the code from the patch is fine, there are a couple of small changes I want to make to some of the comments though
Created attachment 12704 [details] [diff] [review] fixes typos and respects the difference between 'default' and 'auto-generated'
For a= purposes, in case I didn't mention: this bug blocks vidur and jst's work on converting the DOM APIs.
fix checked in
Status: ASSIGNED → RESOLVED
Last Resolved: 18 years ago
Resolution: --- → FIXED
Marking Verified. Please reopen if problem reoccurs.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.