Bug 37596 - [Qt] QScriptEngine::evaluate has memory leak.
Summary: [Qt] QScriptEngine::evaluate has memory leak.
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P1 Normal
Assignee: Jędrzej Nowacki
Keywords: Qt
Depends on:
Blocks: 31863
  Show dependency treegraph
Reported: 2010-04-14 12:30 PDT by Jędrzej Nowacki
Modified: 2010-04-15 02:54 PDT (History)
4 users (show)

See Also:

Fix v1 (1.96 KB, patch)
2010-04-14 12:36 PDT, Jędrzej Nowacki
kenneth: review-
Details | Formatted Diff | Diff
Fix v2 (1.97 KB, patch)
2010-04-14 16:54 PDT, Jędrzej Nowacki
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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

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.