Bug 25309

Summary: Use AtomicStrings more effectively in the V8 bindings
Product: WebKit Reporter: Dave Moore <davemoore>
Component: WebKit Misc.Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: dglazkov
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Attachments:
Description Flags
Fix
dglazkov: review-
Fix dglazkov: review+

Description Dave Moore 2009-04-21 08:45:02 PDT
I've cleaned up some of the V8 bindings to use AtomicStrings better, making sure we don't covert strings more than we have to.
Comment 1 Dave Moore 2009-04-21 08:50:25 PDT
Created attachment 29648 [details]
Fix
Comment 2 Dimitri Glazkov (Google) 2009-04-21 09:31:11 PDT
Comment on attachment 29648 [details]
Fix

> Index: bindings/v8/V8Binding.h
> ===================================================================
> --- bindings/v8/V8Binding.h	(revision 42710)
> +++ bindings/v8/V8Binding.h	(working copy)
> @@ -34,7 +34,7 @@
>  // FIXME: This is a temporary forwarding header until all bindings have migrated
>  // over and v8_binding actually becomes V8Binding.
>  #include "v8_binding.h"
> -
> +#include "AtomicString.h"
>  namespace WebCore {
>  
>      // FIXME: Remove once migration is complete.
> @@ -51,7 +51,13 @@ namespace WebCore {
>      // FIXME: Remove once migration is complete.
>      inline String toWebCoreString(v8::Handle<v8::Value> obj)
>      {
> -        return ToWebCoreString(obj);
> +      return ToWebCoreString(obj);
> +    }
> +
> +    // FIXME: Remove once migration is complete.
> +    inline String toWebCoreString(v8::Handle<v8::String> obj)
> +    {
> +      return ToWebCoreString(obj);
>      }

Did you mean to put this file into this change? It's just reformatting to 2-space indent, which ain't good for WebKit anyway.

Otherwise, looks good.
Comment 3 Dave Moore 2009-04-21 09:50:41 PDT
Created attachment 29652 [details]
Fix
Comment 4 Dave Moore 2009-04-21 09:51:04 PDT
You're right...I removed the file from the patch.
Comment 5 Dimitri Glazkov (Google) 2009-04-21 10:01:03 PDT
Landed as http://trac.webkit.org/changeset/42714.