Bug 26495

Summary: Upstream V8Index
Product: WebKit Reporter: Nate Chapin <japhet>
Component: WebCore Misc.Assignee: Nate Chapin <japhet>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
patch
dglazkov: review+
patch2 dglazkov: review+

Description Nate Chapin 2009-06-17 15:32:05 PDT
Associated chromium issue: http://crbug.com/14466
Comment 1 Nate Chapin 2009-06-17 15:34:34 PDT
Created attachment 31451 [details]
patch

Associated chromium patch: http://codereview.chromium.org/126296
Comment 2 Dimitri Glazkov (Google) 2009-06-17 21:54:52 PDT
Comment on attachment 31451 [details]
patch

This whole file is total sadness. But I'd rather land it so that we have them all in one place.

> +// FIXME: Can we use a macro to include necessary headers by using WRAPPER_TYPES?

Nah.

> +    class V8ClassIndex {
> +    public:
> +        // Type must start at non-negative numbers. See ToInt, FromInt.
> +        enum V8WrapperType {
> +            INVALID_CLASS_INDEX = 0,
> +
> +#define DEFINE_ENUM(name, type) name, 
> +            ALL_WRAPPER_TYPES(DEFINE_ENUM)
> +#undef DEFINE_ENUM
> +
> +            CLASSINDEX_END,
> +            WRAPPER_TYPE_COUNT = CLASSINDEX_END
> +        };
> +
> +        static int ToInt(V8WrapperType type) { return static_cast<int>(type); }

Add a FIXME to convert to toInt. I realize it will be near-impossible to refactor it before all of the bindings land in one place.

> +
> +        static V8WrapperType FromInt(int v) {

Ditto.

> +            ASSERT(INVALID_CLASS_INDEX <= v && v < CLASSINDEX_END);
> +            return static_cast<V8WrapperType>(v);
> +        }
> +
> +        static FunctionTemplateFactory GetFactory(V8WrapperType type);

Ditto.

> +        // Returns a field to be used as cache for the template for the given type
> +        static v8::Persistent<v8::FunctionTemplate>* GetCache(V8WrapperType type);

Ditto.
Comment 3 David Levin 2009-06-18 01:24:48 PDT
Please pick up the latest changes to this file when checking in, so that the check in doesn't break the chromium build.

I just changed this file downstream due HTMLDataEditGrid (I think it was called).
Comment 4 David Levin 2009-06-18 01:29:05 PDT
s/HTMLDataEditGrid/HTMLDataGridElement/
Comment 5 Nate Chapin 2009-06-18 10:35:16 PDT
Created attachment 31502 [details]
patch2
Comment 6 David Levin 2009-06-25 10:10:27 PDT
Assign to japhet for landing.
Comment 7 Eric Seidel (no email) 2009-06-29 13:24:17 PDT
Does japhet@ have commit bit?  I don't remember seeing his nomination go by...   If not, then someone else will need to land this.
Comment 8 Nate Chapin 2009-06-29 13:26:35 PDT
I do, it was landed as r45193.   Sorry for forgetting about my cleanup...