Bug 52911

Summary: [v8] Refactoring: extract IntrusiveDOMWrapperMap into a seprate class and files.
Product: WebKit Reporter: anton muhin <antonm>
Component: WebKit Misc.Assignee: anton muhin <antonm>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, commit-queue, japhet, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch
none
Patch none

Description anton muhin 2011-01-21 12:12:27 PST
[v8] Refactoring: extract IntrusiveDOMWrapperMap into a seprate class and files.
Comment 1 anton muhin 2011-01-21 12:18:54 PST
Created attachment 79773 [details]
Patch
Comment 2 anton muhin 2011-01-21 12:20:22 PST
It violates style rule about indentation in namespaces.  I'd ask for waiver as it's a common style under bindings/v8.  But I can easily adjust
Comment 3 WebKit Review Bot 2011-01-21 12:21:41 PST
Attachment 79773 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCor..." exit_code: 1

Source/WebCore/bindings/v8/IntrusiveDOMWrapperMap.h:39:  Code inside a namespace should not be indented.  [whitespace/indent] [4]
Total errors found: 1 in 5 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 4 Nate Chapin 2011-01-21 12:27:27 PST
Comment on attachment 79773 [details]
Patch

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

I'd be inclined to just go ahead and fix the namespace indent.  Start this file off confirming to style guide and all that :)

> Source/WebCore/bindings/v8/IntrusiveDOMWrapperMap.cpp:36
> +bool IntrusiveDOMWrapperMap::removeIfPresent(Node* obj, v8::Persistent<v8::Object> value)

Is there something special about this function that it's the only one implemented in the cpp?  Just seems a weird split between the .h and the .cpp to me.
Comment 5 anton muhin 2011-01-21 12:33:54 PST
(In reply to comment #4)
> (From update of attachment 79773 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=79773&action=review
> 
> I'd be inclined to just go ahead and fix the namespace indent.  Start this file off confirming to style guide and all that :)

Ok, np.

> 
> > Source/WebCore/bindings/v8/IntrusiveDOMWrapperMap.cpp:36
> > +bool IntrusiveDOMWrapperMap::removeIfPresent(Node* obj, v8::Persistent<v8::Object> value)
> 
> Is there something special about this function that it's the only one implemented in the cpp?  Just seems a weird split between the .h and the .cpp to me.

I don't remember---something tells me it was missing class definitions, but I am not sure.  I'll give a try next week.  It's not performance critical though, so keeping it in .cpp might be a good thing code-size-wise.

Thanks a lot for feedback, Nate!  And have a nice weekend.
Comment 6 anton muhin 2011-01-24 09:33:24 PST
Created attachment 79935 [details]
Patch
Comment 7 anton muhin 2011-01-24 09:34:49 PST
Nate, I've uploaded new version which fixes style violation and brings removeIfPresent method into the header.  May you have another look?

(In reply to comment #5)
> (In reply to comment #4)
> > (From update of attachment 79773 [details] [details])
> > View in context: https://bugs.webkit.org/attachment.cgi?id=79773&action=review
> > 
> > I'd be inclined to just go ahead and fix the namespace indent.  Start this file off confirming to style guide and all that :)
> 
> Ok, np.
> 
> > 
> > > Source/WebCore/bindings/v8/IntrusiveDOMWrapperMap.cpp:36
> > > +bool IntrusiveDOMWrapperMap::removeIfPresent(Node* obj, v8::Persistent<v8::Object> value)
> > 
> > Is there something special about this function that it's the only one implemented in the cpp?  Just seems a weird split between the .h and the .cpp to me.
> 
> I don't remember---something tells me it was missing class definitions, but I am not sure.  I'll give a try next week.  It's not performance critical though, so keeping it in .cpp might be a good thing code-size-wise.
> 
> Thanks a lot for feedback, Nate!  And have a nice weekend.
Comment 8 anton muhin 2011-01-24 11:43:24 PST
Comment on attachment 79935 [details]
Patch

Thanks a lot, Nate
Comment 9 WebKit Commit Bot 2011-01-24 12:22:36 PST
Comment on attachment 79935 [details]
Patch

Clearing flags on attachment: 79935

Committed r76541: <http://trac.webkit.org/changeset/76541>
Comment 10 WebKit Commit Bot 2011-01-24 12:22:42 PST
All reviewed patches have been landed.  Closing bug.