WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
158144
Web Inspector: ReportExtraMemoryCost IDL attribute should also be used to generate estimatedSize method
https://bugs.webkit.org/show_bug.cgi?id=158144
Summary
Web Inspector: ReportExtraMemoryCost IDL attribute should also be used to gen...
Joseph Pecoraro
Reported
2016-05-26 20:09:41 PDT
* SUMMARY ReportExtraMemoryCost IDL attribute should also be used to generate estimatedSize method. The pattern for including the JSCell estimatedSize() method is "if a cell reports extra memory to the Heap, it should also include that in its estimated size". We were missing this for WebCore objects (of which there are only a few). The existing ReportExtraMemoryCost IDL attribute already handles reporting extra memory to the Heap using wrapper().memoryCost(). The exact same thing can be used in estimatedSize().
Attachments
[PATCH] Proposed Fix
(35.52 KB, patch)
2016-05-26 20:15 PDT
,
Joseph Pecoraro
darin
: review+
bburg
: commit-queue-
Details
Formatted Diff
Diff
[PATCH] For Landing
(34.28 KB, patch)
2016-05-31 16:50 PDT
,
Joseph Pecoraro
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2016-05-26 20:11:24 PDT
<
rdar://problem/26510790
>
Joseph Pecoraro
Comment 2
2016-05-26 20:15:41 PDT
Created
attachment 279942
[details]
[PATCH] Proposed Fix
Darin Adler
Comment 3
2016-05-28 21:19:04 PDT
Comment on
attachment 279942
[details]
[PATCH] Proposed Fix View in context:
https://bugs.webkit.org/attachment.cgi?id=279942&action=review
> Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:1049 > + my $needsEstimatedSize = InstanceNeedsEstimatedSize($interface);
Seems better to just call this the one place it’s used instead of putting it into a local variable.
> Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:2012 > + my $needsEstimatedSize = InstanceNeedsEstimatedSize($interface);
Seems better to just call this the one place it’s used instead of putting it into a local variable.
> Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:3276 > + push(@implContent, " ASSERT_GC_OBJECT_INHERITS(thisObject, info());\n");
It seems peculiar to do this assertion after the jsCast. Doesn’t the JSCast do this check already? If it doesn’t then I’d suggest asserting first.
> Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:3278 > + push(@implContent, " size_t extraSize = thisObject->wrapped().memoryCost();\n"); > + push(@implContent, " return Base::estimatedSize(thisObject) + extraSize;\n");
This would read better without the local variable, I think.
Joseph Pecoraro
Comment 4
2016-05-31 16:50:34 PDT
Created
attachment 280199
[details]
[PATCH] For Landing
WebKit Commit Bot
Comment 5
2016-05-31 17:44:42 PDT
Comment on
attachment 280199
[details]
[PATCH] For Landing Clearing flags on attachment: 280199 Committed
r201541
: <
http://trac.webkit.org/changeset/201541
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug