Closed Bug 709977 Opened 13 years ago Closed 13 years ago

Don't use xpc_qsAString in IDB Key.h

Categories

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

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla11

People

(Reporter: Ms2ger, Assigned: Ms2ger)

References

Details

Attachments

(1 file)

Attached patch Patch v1 (deleted) — Splinter Review
SetFromJSVal is currently the only user of xpc_qsAString outside of XPConnect. Except for the additional API exposed, there are two problems with that. First, we don't check if IsValid() before using the string, which could (if I'm not mistaken, I may be) lead to dereferencing uninitialized memory in case of OOM, and second, there's really no need to invoke all the generic value -> string conversion code, because we already know we've got a string. Fortunately, it can easily be replaced by nsDependentJSString.
Attachment #581063 - Flags: review?(bent.mozilla)
Attachment #581063 - Flags: review?(bent.mozilla) → review+
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla11
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: