Bug 114768 - Automate generation of toJS function for classes that need to report extra memory usage
Summary: Automate generation of toJS function for classes that need to report extra me...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Oliver Hunt
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-17 14:59 PDT by Oliver Hunt
Modified: 2013-04-17 17:53 PDT (History)
1 user (show)

See Also:


Attachments
Patch (18.00 KB, patch)
2013-04-17 15:03 PDT, Oliver Hunt
no flags Details | Formatted Diff | Diff
Patch (23.06 KB, patch)
2013-04-17 15:46 PDT, Oliver Hunt
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Hunt 2013-04-17 14:59:20 PDT
Automate generation of toJS function for classes that need to report extra memory usage
Comment 1 Oliver Hunt 2013-04-17 15:03:48 PDT
Created attachment 198614 [details]
Patch
Comment 2 Geoffrey Garen 2013-04-17 15:15:22 PDT
Comment on attachment 198614 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=198614&action=review

r=me

> Source/WebCore/bindings/js/JSDOMBinding.h:528
> +        typedef char YesType;

Let's call this HasMemoryCostMemberFunction.

> Source/WebCore/bindings/js/JSDOMBinding.h:544
> +        static NoType memoryCostCheck(U*, TypeChecker<void (BaseMixin::*)(), &U::memoryCost>* = 0);
> +        static YesType memoryCostCheck(...);

Let's call these dummy.

> Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:2718
> +template <typename T, bool hasReportCostFunction = HasMemoryCost<T>::value > struct ReportCost;

Let's call this "template<typename T, bool hasMemoryCostMemberFunction = HasMemoryCostMemberFunction<T>::value> struct ReportMemoryCost".

> Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:2720
> +    static void reportExtraCost(ExecState* exec, T* impl)

Let's call this reportMemoryCost.
Comment 3 Build Bot 2013-04-17 15:40:32 PDT
Comment on attachment 198614 [details]
Patch

Attachment 198614 [details] did not pass win-ews (win):
Output: http://webkit-queues.appspot.com/results/102507
Comment 4 Oliver Hunt 2013-04-17 15:46:11 PDT
Created attachment 198621 [details]
Patch
Comment 5 Oliver Hunt 2013-04-17 16:07:53 PDT
Just making sure that i haven't horned windows
Comment 6 Oliver Hunt 2013-04-17 16:52:37 PDT
Comment on attachment 198621 [details]
Patch

Committed r148648
Comment 7 Roger Fong 2013-04-17 17:49:52 PDT
(In reply to comment #5)
> Just making sure that i haven't horned windows

Unfortunately it would seem that another build failure was masking this one, or something along those lines:

http://build.webkit.org/builders/Apple%20Win%20Release%20%28Build%29/builds/47641/steps/compile-webkit/logs/stdio

Any idea how to fix it?

I've tried a clean build, also curious that one bot (The opensource debug builder) seems to be okay with the change...
Comment 8 Oliver Hunt 2013-04-17 17:53:41 PDT
(In reply to comment #7)
> (In reply to comment #5)
> > Just making sure that i haven't horned windows
> 
> Unfortunately it would seem that another build failure was masking this one, or something along those lines:
> 
> http://build.webkit.org/builders/Apple%20Win%20Release%20%28Build%29/builds/47641/steps/compile-webkit/logs/stdio
> 
> Any idea how to fix it?
> 
> I've tried a clean build, also curious that one bot (The opensource debug builder) seems to be okay with the change...

The bot seems to be trying to share the definition of ReportMemoryCost between different JS bindings files, has someone decided to allinonefile them?