RESOLVED FIXED 92966
Web Inspector: rename reportMemoryUsage to reportDescendantMemoryUsage in StyleRuleBase descendants
https://bugs.webkit.org/show_bug.cgi?id=92966
Summary Web Inspector: rename reportMemoryUsage to reportDescendantMemoryUsage in Sty...
Yury Semikhatsky
Reported 2012-08-02 02:48:40 PDT
Current implementation of StyleRuleBase::reportMemoryUsage has a switch by the rule type, then casts it to the corresponding descendant type and calls reportMemoryUsage on it. This scheme can be accidentally broken by adding another type to the switch: if the descendant doesn't provide its own reportMemoryUsage implementation we will end up with recursive call to StyleRuleBase::reportMemoryUsage. Compiler won't help us in that case. This can be fixed by changing the name of the method that actually provides the memory instrumentation in the descendants.
Attachments
Patch (10.97 KB, patch)
2012-08-02 02:50 PDT, Yury Semikhatsky
apavlov: review+
Yury Semikhatsky
Comment 1 2012-08-02 02:50:37 PDT
Ilya Tikhonovsky
Comment 2 2012-08-02 02:55:56 PDT
Comment on attachment 156021 [details] Patch lgtm
Alexander Pavlov (apavlov)
Comment 3 2012-08-02 03:11:47 PDT
Comment on attachment 156021 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=156021&action=review > Source/WebCore/ChangeLog:9 > + StyleRuleBase to avoid accidental recurive calls to StyleRuleBase::reportMemoryUsage recurive -> recursive
Yury Semikhatsky
Comment 4 2012-08-02 03:12:52 PDT
(In reply to comment #3) > (From update of attachment 156021 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=156021&action=review > > > Source/WebCore/ChangeLog:9 > > + StyleRuleBase to avoid accidental recurive calls to StyleRuleBase::reportMemoryUsage > > recurive -> recursive Done.
Yury Semikhatsky
Comment 5 2012-08-02 03:16:55 PDT
Note You need to log in before you can comment on or make changes to this bug.