WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
26907
[Chromium] Upstream V8SVGPODTypeWrapper
https://bugs.webkit.org/show_bug.cgi?id=26907
Summary
[Chromium] Upstream V8SVGPODTypeWrapper
Nate Chapin
Reported
2009-07-01 15:36:08 PDT
See summary.
Attachments
patch
(13.48 KB, patch)
2009-07-01 15:41 PDT
,
Nate Chapin
levin
: review-
Details
Formatted Diff
Diff
patch2
(13.49 KB, patch)
2009-07-01 16:43 PDT
,
Nate Chapin
levin
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Nate Chapin
Comment 1
2009-07-01 15:41:29 PDT
Created
attachment 32150
[details]
patch
David Levin
Comment 2
2009-07-01 15:58:01 PDT
Comment on
attachment 32150
[details]
patch Just a few things to take care of.
> Index: WebCore/bindings/v8/V8SVGPODTypeWrapper.h > +/* > + * Copyright (C) 2006, 2008 Nikolas Zimmermann <
zimmermann@kde.org
> > + * Copyright (C) 2008 Apple Inc. All rights reserved. > + * Copyright (C) 2008 The Chromium Authors. All rights reserved.
I think this should be "Google" instead of "The Chromium Authors". Also I'm sure you did enough changes to add 2009.
> +#ifndef V8SVGPODTypeWrapper_h > +#define V8SVGPODTypeWrapper_h > + > +#if ENABLE(SVG) > + > +#include "config.h"
I don't think header files are suppose to include config.h.
> +public: > + V8SVGStaticPODTypeWrapper(PODType type) > + : m_podType(type) > + { }
Once you've put the { } on a new line, just put each on its own line.
> +private: > + // Update callbacks
Is this comment useful?
> + explicit PODTypeWrapperCacheInfo(WTF::HashTableDeletedValueType) > + : creator(reinterpret_cast<PODTypeCreator*>(-1)) > + , getter(0) > + , setter(0) > + { > + } > + bool isHashTableDeletedValue() const
Add a blank line before this method.
> +template<typename PODType, typename PODTypeCreator> > +struct PODTypeWrapperCacheInfoHash { > + static unsigned hash(const PODTypeWrapperCacheInfo<PODType, PODTypeCreator>& info) > + { > + unsigned creator = reinterpret_cast<unsigned>(info.creator); > + unsigned getter = reinterpret_cast<unsigned>(*(void**)&info.getter); > + unsigned setter = reinterpret_cast<unsigned>(*(void**)&info.setter);
Can reinterpret_cast be used for the void**?
> +template<typename PODType, typename PODTypeCreator> > +struct PODTypeWrapperCacheInfoTraits : WTF::GenericHashTraits<PODTypeWrapperCacheInfo<PODType, PODTypeCreator> > { > + typedef PODTypeWrapperCacheInfo<PODType, PODTypeCreator> CacheInfo; > + > + static const bool emptyValueIsZero = true; > + static const bool needsDestruction = false; > + > + static const CacheInfo& emptyValue() > + { > + static CacheInfo key;
Consider using DEFINE_STATIC_LOCAL.
> + static DynamicWrapperHashMap& dynamicWrapperHashMap() > + { > + static DynamicWrapperHashMap _dynamicWrapperHashMap;
Consider using DEFINE_STATIC_LOCAL (and getting rid of the preceding "_").
> +template <class P> > +P V8SVGPODTypeUtil::toSVGPODType(V8ClassIndex::V8WrapperType type, v8::Handle<v8::Value> object, bool& ok) {
Brace style
Nate Chapin
Comment 3
2009-07-01 16:43:06 PDT
Created
attachment 32158
[details]
patch2
Dimitri Glazkov (Google)
Comment 4
2009-07-10 13:22:50 PDT
This has landed, right?
Nate Chapin
Comment 5
2009-07-10 13:28:42 PDT
Yes, this landed at
r45659
. Sorry about that.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug