Closed
Bug 1132655
Opened 10 years ago
Closed 10 years ago
Don't allow conversions from DOMString to const string references
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
FIXED
mozilla38
Tracking | Status | |
---|---|---|
firefox38 | --- | fixed |
People
(Reporter: bzbarsky, Assigned: bzbarsky)
Details
Attachments
(1 file)
DOMString is meant to be used as an outparam. When converting it to a const string reference, what will happen is that its conversion operator to nsString& will get invoked and then the result will be treated as a const nsString&.
But the conversion operator to nsString& on DOMString is only supposed to be used if the DOMString doesn't contain any data, and asserts so. Sadly, we have some codepaths that are clearly undertested...
In any case, the upshot is that you can only pass a DOMString to a const string ref without hitting asserts in the tree today if the DOMString is empty. It's highly unlikely that anyone is currently doing that correctly.
Assignee | ||
Comment 1•10 years ago
|
||
Attachment #8563653 -
Flags: review?(bugs)
Updated•10 years ago
|
Attachment #8563653 -
Flags: review?(bugs) → review+
Assignee | ||
Comment 2•10 years ago
|
||
Comment 3•10 years ago
|
||
Status: NEW → RESOLVED
Closed: 10 years ago
status-firefox38:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla38
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•