Closed
Bug 48464
Opened 25 years ago
Closed 25 years ago
auto-generated |operator=| interfering with string usage
Categories
(Core :: XPCOM, defect, P3)
Core
XPCOM
Tracking
()
VERIFIED
FIXED
People
(Reporter: scc, Assigned: scc)
Details
Attachments
(2 files)
...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.
Assignee | ||
Comment 1•25 years ago
|
||
Assignee | ||
Comment 2•25 years ago
|
||
this builds and runs in my tests (adding new tests to account for the problem),
just need r= and a=
Status: NEW → ASSIGNED
Assignee | ||
Comment 3•25 years ago
|
||
the code from the patch is fine, there are a couple of small changes I want to
make to some of the comments though
Assignee | ||
Comment 4•25 years ago
|
||
Assignee | ||
Comment 5•25 years ago
|
||
For a= purposes, in case I didn't mention: this bug blocks vidur and jst's work
on converting the DOM APIs.
Assignee | ||
Comment 6•25 years ago
|
||
fix checked in
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Comment 7•24 years ago
|
||
please verify
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.
Description
•