Closed
Bug 651973
Opened 14 years ago
Closed 14 years ago
RegExp not released on error path in createObjectNoStatics
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
People
(Reporter: mwu, Assigned: mwu)
Details
(Keywords: memory-leak, Whiteboard: fixed-in-tracemonkey)
Attachments
(1 file)
475 bytes,
patch
|
cdleary
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Attachment #527648 -
Flags: review?(cdleary)
Comment 1•14 years ago
|
||
Comment on attachment 527648 [details] [diff] [review]
Release RegExp on error
Nice catch! Only nit is that I think SpiderMonkey style prefers combining with the above test a la:
if (!obj ||
!obj->initRegExp(cx, re.get())) {
// common cleanup code
}
Attachment #527648 -
Flags: review?(cdleary) → review+
Comment 2•14 years ago
|
||
...except combine the two conditions to one line, like:
if (!obj || !obj->initRegExp(cx, re.get()))
because it all fits on one line, in 99ish characters.
Assignee | ||
Comment 3•14 years ago
|
||
http://hg.mozilla.org/tracemonkey/rev/152ef9c8b2bb
Hm I forgot to make it one line.. sorry about that!
It looks sorta nice on two lines IMO anyway..
Whiteboard: fixed-in-tracemonkey
Assignee | ||
Comment 4•14 years ago
|
||
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•