Closed
Bug 1288985
Opened 10 years ago
Closed 10 years ago
Fix a leak in makeTypedArrayWithTemplate
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla51
People
(Reporter: n.nethercote, Assigned: n.nethercote)
References
(Blocks 1 open bug)
Details
(Keywords: coverity, Whiteboard: CID 1364094, CID 1364095, 1364096)
Attachments
(1 file)
|
1.59 KB,
patch
|
bbouvier
:
review+
|
Details | Diff | Splinter Review |
makeTypedArrayWithTemplate has a leak on an error path.
| Assignee | ||
Comment 1•10 years ago
|
||
Attachment #8774163 -
Flags: review?(jdemooij)
| Assignee | ||
Updated•10 years ago
|
Assignee: nobody → n.nethercote
Status: NEW → ASSIGNED
Comment 2•10 years ago
|
||
Comment on attachment 8774163 [details] [diff] [review]
Fix a leak in an error path in makeTypedArrayWithTemplate
Review of attachment 8774163 [details] [diff] [review]:
-----------------------------------------------------------------
Apologies for the drive-by :)
::: js/src/vm/TypedArrayObject.cpp
@@ +630,5 @@
> RootedObjectGroup group(cx, templateObj->group());
>
> NewObjectKind newKind = GenericObject;
>
> + ScopedJSFreePtr<void> buf;
IIRC, Scoped* pointers are deprecated in favor of mozilla::UniquePtr.
| Assignee | ||
Comment 3•10 years ago
|
||
> IIRC, Scoped* pointers are deprecated in favor of mozilla::UniquePtr.
But UniquePtr<void> doesn't work:
> 0:05.44 ../../dist/include/mozilla/UniquePtr.h:317:4: error: cannot form a reference to 'void'
> 0:05.44 T& operator*() const { return *get(); }
:(
| Assignee | ||
Updated•10 years ago
|
Attachment #8774163 -
Flags: review?(jdemooij) → review?(bbouvier)
Comment 4•10 years ago
|
||
Comment on attachment 8774163 [details] [diff] [review]
Fix a leak in an error path in makeTypedArrayWithTemplate
Review of attachment 8774163 [details] [diff] [review]:
-----------------------------------------------------------------
Looks good, thank you for the patch.
Attachment #8774163 -
Flags: review?(bbouvier) → review+
| Assignee | ||
Comment 5•10 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/3d72e8e5f5ad18d9ded651ecb1adf7060023c103
Bug 1288985 - Fix a leak in an error path in makeTypedArrayWithTemplate. r=bbouvier.
Comment 6•10 years ago
|
||
| bugherder | ||
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
status-firefox51:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla51
You need to log in
before you can comment on or make changes to this bug.
Description
•