Bug 96483

Summary: Web Inspector: Persistent handle referenced from ScriptWrappable is double counted
Product: WebKit Reporter: Yury Semikhatsky <yurys>
Component: Web Inspector (Deprecated)Assignee: Yury Semikhatsky <yurys>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, alph, apavlov, benjamin, bweinstein, haraken, japhet, joepeck, keishi, loislo, pfeldman, pmuellr, rik, timothy, webkit.review.bot, yurys
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch apavlov: review+

Description Yury Semikhatsky 2012-09-12 02:21:19 PDT
ScriptWrappable::m_wrapper is a pointer to an entry in the array where all such handles are stored. Since the handle is a part of a bigger object we should not count it second time when visiting the pointer in ScriptWrappable.
Comment 1 Yury Semikhatsky 2012-09-12 02:31:31 PDT
Created attachment 163558 [details]
Patch
Comment 2 Alexander Pavlov (apavlov) 2012-09-12 02:35:04 PDT
Comment on attachment 163558 [details]
Patch

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

> Source/WTF/ChangeLog:10
> +        used on fields that are pointers to objects which a parts of bigger memory

"a parts" -> "are parts"?

> Source/WTF/ChangeLog:11
> +        blocks(field of another object, element in an array, object allocated in a

Missing whitespace between 's' and '('

> Source/WTF/ChangeLog:12
> +        memory arena etc.). We don't want to count such objects memory separately

objects'

> Source/WebCore/ChangeLog:11
> +        second time. In order to make the clang plugin that validate memory instrumentation

validate -> validates

> Source/WebCore/ChangeLog:12
> +        happy we report it here as weak pointer(no-op).

missing whitespace
Comment 3 Yury Semikhatsky 2012-09-12 02:37:14 PDT
(In reply to comment #2)
> (From update of attachment 163558 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=163558&action=review
> 
> > Source/WTF/ChangeLog:10
> > +        used on fields that are pointers to objects which a parts of bigger memory
> 
> "a parts" -> "are parts"?
> 
Done.

> > Source/WTF/ChangeLog:11
> > +        blocks(field of another object, element in an array, object allocated in a
> 
> Missing whitespace between 's' and '('
> 
Done.

> > Source/WTF/ChangeLog:12
> > +        memory arena etc.). We don't want to count such objects memory separately
> 
> objects'
> 
Done.

> > Source/WebCore/ChangeLog:11
> > +        second time. In order to make the clang plugin that validate memory instrumentation
> 
> validate -> validates
> 
Done.

> > Source/WebCore/ChangeLog:12
> > +        happy we report it here as weak pointer(no-op).
> 
> missing whitespace
Done.
Comment 4 Yury Semikhatsky 2012-09-12 02:44:56 PDT
Committed r128283: <http://trac.webkit.org/changeset/128283>