Bug 36650

Summary: [Qt] Add API for reporting additional memory cost of JavaScript objects
Product: WebKit Reporter: Kent Hansen <kent.hansen>
Component: JavaScriptCoreAssignee: Kent Hansen <kent.hansen>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, jedrzej.nowacki
Priority: P2 Keywords: Qt
Version: 528+ (Nightly build)   
Hardware: PC   
OS: All   
Bug Depends on:    
Bug Blocks: 31863    
Attachments:
Description Flags
Proposed patch none

Kent Hansen
Reported 2010-03-26 03:24:56 PDT
Currently there's no way to indicate the actual amount of memory consumed by native script objects (i.e. objects that wrap arbitrary data, such as Qt/C++ objects). This can make the garbage collector unresponsive (not freeing objects as often as it should), because it doesn't know the real cost of all objects (since it doesn't know about the native data). It would be nice if QtScript had an API for registering this cost, so that the GC can take it into account.
Attachments
Proposed patch (5.82 KB, patch)
2010-03-26 03:30 PDT, Kent Hansen
no flags
Kent Hansen
Comment 1 2010-03-26 03:30:54 PDT
Created attachment 51723 [details] Proposed patch This uses JSC API from JSBasePrivate.h, but see the discussion at https://lists.webkit.org/pipermail/squirrelfish-dev/2010-March/000097.html why this is OK.
Jędrzej Nowacki
Comment 2 2010-03-26 03:43:26 PDT
Look good to me :-)
WebKit Commit Bot
Comment 3 2010-03-28 03:43:15 PDT
Comment on attachment 51723 [details] Proposed patch Clearing flags on attachment: 51723 Committed r56689: <http://trac.webkit.org/changeset/56689>
WebKit Commit Bot
Comment 4 2010-03-28 03:43:19 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.