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
Nate Chapin
2009-06-17 15:32:05 PDT
Created attachment 31451 [details] patch Associated chromium patch: http://codereview.chromium.org/126296 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. 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). s/HTMLDataEditGrid/HTMLDataGridElement/ Created attachment 31502 [details]
patch2
Assign to japhet for landing. Does japhet@ have commit bit? I don't remember seeing his nomination go by... If not, then someone else will need to land this. |