Bug 37596

Summary: [Qt] QScriptEngine::evaluate has 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: P1 Keywords: Qt
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 31863    
Attachments:
Description Flags
Fix v1
kenneth: review-
Fix v2 none

Description Jędrzej Nowacki 2010-04-14 12:30:17 PDT
Method QScriptValuePrivate* QScriptEnginePrivate::evaluate(const QString& program, const QString& fileName, int lineNumber) creates two temporary values, but it doesn't release them. That produces memory leak.
Comment 1 Jędrzej Nowacki 2010-04-14 12:36:20 PDT
Created attachment 53353 [details]
Fix v1
Comment 2 Kenneth Rohde Christiansen 2010-04-14 16:01:01 PDT
Comment on attachment 53353 [details]
Fix v1


> +  Evaluates given JavaScript program and returns result of the evaluation.
> +  \attention this function doesn't take parameters ownership.

this function doesn't take ownership of the parameters.
Comment 3 Jędrzej Nowacki 2010-04-14 16:54:01 PDT
Created attachment 53385 [details]
Fix v2

Done
Comment 4 WebKit Commit Bot 2010-04-15 02:53:59 PDT
Comment on attachment 53385 [details]
Fix v2

Clearing flags on attachment: 53385

Committed r57637: <http://trac.webkit.org/changeset/57637>
Comment 5 WebKit Commit Bot 2010-04-15 02:54:04 PDT
All reviewed patches have been landed.  Closing bug.