Summary: | Web Inspector: ReportExtraMemoryCost IDL attribute should also be used to generate estimatedSize method | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Joseph Pecoraro <joepeck> | ||||||
Component: | Web Inspector | Assignee: | Joseph Pecoraro <joepeck> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | bburg, cdumez, cgarcia, commit-queue, esprehn+autocc, ggaren, graouts, joepeck, kondapallykalyan, mark.lam, mattbaker, nvasilyev, timothy, webkit-bug-importer | ||||||
Priority: | P2 | Keywords: | InRadar | ||||||
Version: | WebKit Nightly Build | ||||||||
Hardware: | All | ||||||||
OS: | All | ||||||||
Attachments: |
|
Description
Joseph Pecoraro
2016-05-26 20:09:41 PDT
Created attachment 279942 [details]
[PATCH] Proposed Fix
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. Created attachment 280199 [details]
[PATCH] For Landing
Comment on attachment 280199 [details] [PATCH] For Landing Clearing flags on attachment: 280199 Committed r201541: <http://trac.webkit.org/changeset/201541> |