Closed
Bug 451058
Opened 17 years ago
Closed 17 years ago
Address post-review comments
Categories
(Core :: SQLite and Embedded Database Bindings, defect)
Core
SQLite and Embedded Database Bindings
Tracking
()
RESOLVED
FIXED
mozilla1.9.1b1
People
(Reporter: sdwilsh, Assigned: sdwilsh)
References
Details
Attachments
(1 file)
|
1.95 KB,
patch
|
neil
:
review+
|
Details | Diff | Splinter Review |
| Assignee | ||
Comment 1•17 years ago
|
||
Attachment #335834 -
Flags: review?(neil)
| Assignee | ||
Updated•17 years ago
|
Whiteboard: [has patch][needs review Neil]
Comment 2•17 years ago
|
||
Comment on attachment 335834 [details] [diff] [review]
v1.0
> *_result = NS_Alloc(sizeof(PRUint8) * aData.Length());
> NS_ENSURE_TRUE(*_result, NS_ERROR_OUT_OF_MEMORY);
>
>- PRUint8 *result = static_cast<PRUint8 *>(*_result);
>- for (PRUint32 i = 0; i < aData.Length(); i++)
>- result[i] = aData[i];
>+ *_result = nsMemory::Clone(aData.Elements(), aData.Length() * sizeof(PRUint8));
Clone allocates, so you don't need the NS_Alloc, but you do want to keep the NS_ENSURE_TRUE. r=me with that fixed.
Attachment #335834 -
Flags: review?(neil) → review+
| Assignee | ||
Comment 3•17 years ago
|
||
Pushed to mozilla-central with last comment fixed:
http://hg.mozilla.org/mozilla-central/rev/68c9ad2c735e
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Flags: in-testsuite-
Flags: in-litmus-
Resolution: --- → FIXED
Whiteboard: [has patch][needs review Neil]
Target Milestone: --- → mozilla1.9.1b1
Updated•1 year ago
|
Product: Toolkit → Core
You need to log in
before you can comment on or make changes to this bug.
Description
•