Bug 37617

Summary: [Qt] QScriptValue::inherits has a memory leak.
Product: WebKit Reporter: Jędrzej Nowacki <jedrzej.nowacki>
Component: JavaScriptCoreAssignee: Jędrzej Nowacki <jedrzej.nowacki>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, jedrzej.nowacki, kenneth, kent.hansen
Priority: P2 Keywords: Qt
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 31863    
Attachments:
Description Flags
Fix v1 none

Description Jędrzej Nowacki 2010-04-14 15:36:41 PDT
Valgrind report memory leak inside QScriptValue::inherits. 

==7532== 34 (24 direct, 10 indirect) bytes in 1 blocks are definitely lost in loss record 72 of 243                                                                                                  
==7532==    at 0x4C221A7: malloc (vg_replace_malloc.c:195)                                                                                                                                           
==7532==    by 0x50BCBC4: WTF::fastMalloc(unsigned long) (FastMalloc.cpp:249)                                                                                                                        
==7532==    by 0x5007369: WTF::FastAllocBase::operator new(unsigned long) (FastAllocBase.h:96)                                                                                                       
==7532==    by 0x50208BF: OpaqueJSString::create(unsigned short const*, unsigned int) (OpaqueJSString.h:45)                                                                                          
==7532==    by 0x502051F: JSStringCreateWithUTF8CString (JSStringRef.cpp:50)                                                                                                                         
==7532==    by 0x50026DD: QScriptConverter::toString(char const*) (qscriptconverter_p.h:63)                                                                                                          
==7532==    by 0x5004B50: QScriptValuePrivate::inherits(char const*) (qscriptvalue_p.h:765)                                                                                                          
==7532==    by 0x5003C04: QScriptValuePrivate::isError() (qscriptvalue_p.h:413)                                                                                                                      
==7532==    by 0x500212D: QScriptValue::isError() const (qscriptvalue.cpp:291)                                                                                                                       
==7532==    by 0x4064C5: tst_QScriptEngine::evaluateProgram() (tst_qscriptengine.cpp:161)                                                                                                            
==7532==    by 0x409C39: tst_QScriptEngine::qt_metacall(QMetaObject::Call, int, void**) (tst_qscriptengine.moc:90)
Comment 1 Jędrzej Nowacki 2010-04-14 15:39:04 PDT
Created attachment 53378 [details]
Fix v1
Comment 2 WebKit Commit Bot 2010-04-14 20:17:38 PDT
Comment on attachment 53378 [details]
Fix v1

Clearing flags on attachment: 53378

Committed r57628: <http://trac.webkit.org/changeset/57628>
Comment 3 WebKit Commit Bot 2010-04-14 20:17:43 PDT
All reviewed patches have been landed.  Closing bug.