[Webkit-unassigned] [Bug 26953] [V8] Do not do unnecessary handles casts and inline couple of methods
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Jul 7 05:36:12 PDT 2009
https://bugs.webkit.org/show_bug.cgi?id=26953
--- Comment #2 from Mads Ager <ager at chromium.org> 2009-07-07 05:36:11 PDT ---
> template <class C>
> - static C* convertToNativeObject(V8ClassIndex::V8WrapperType type, v8::Handle<v8::Value> object)
> + static C* convertToNativeObject(V8ClassIndex::V8WrapperType type, v8::Handle<v8::Object> object)
> {
> - return static_cast<C*>(convertToNativeObjectImpl(type, object));
> - }
> + // Native event listener is per frame, it cannot be handled by this generic function.
> + ASSERT(type != V8ClassIndex::EVENTLISTENER);
> + ASSERT(type != V8ClassIndex::EVENTTARGET);
> +
> + ASSERT(maybeDOMWrapper(object));
> +
> + ASSERT(
> + #define MAKE_CASE(TYPE, NAME) (type != V8ClassIndex::TYPE) &&
> + DOM_NODE_TYPES(MAKE_CASE)
> + #if ENABLE(SVG)
> + SVG_NODE_TYPES(MAKE_CASE)
> + #endif
> + true
> + );
> +
> + return convertDOMWrapperToNative<C>(object);
> + #undef MAKE_CASE
> + }
Indentation is broken here (tab?).
You should undef MAKE_CASE as soon as it is no longer used.
Do we really need that massive macro-generated assert?
-- Mads
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list