RESOLVED FIXED Bug 78406
Move CSSOM wrapper pointer out of StylePropertySet
https://bugs.webkit.org/show_bug.cgi?id=78406
Summary Move CSSOM wrapper pointer out of StylePropertySet
Antti Koivisto
Reported 2012-02-10 18:51:09 PST
...to a global HashMap.
Attachments
patch (5.28 KB, patch)
2012-02-10 23:04 PST, Antti Koivisto
kling: review+
kling: commit-queue-
Antti Koivisto
Comment 1 2012-02-10 23:04:24 PST
Andreas Kling
Comment 2 2012-02-10 23:33:15 PST
Comment on attachment 126620 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=126620&action=review r=me with one fix: > Source/WebCore/css/StylePropertySet.cpp:49 > +static PropertySetCSSOMWrapperMap* propertySetCSSOMWrapperMap; This pointer needs to be explicitly initialized. Also, a common pattern in WebKit is to write these like so: static PropertySetCSSOMWrapperMap& propertySetCSSOMWrapperMap() { DEFINE_STATIC_LOCAL(PropertySetCSSOMWrapperMap, derp, ()); return derp; }
Andreas Kling
Comment 3 2012-02-10 23:39:17 PST
(In reply to comment #2) > (From update of attachment 126620 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=126620&action=review > > r=me with one fix: > > > Source/WebCore/css/StylePropertySet.cpp:49 > > +static PropertySetCSSOMWrapperMap* propertySetCSSOMWrapperMap; > > This pointer needs to be explicitly initialized. Disregard this cool story, bro. TIL that static globals are zero-initialized..
Antti Koivisto
Comment 4 2012-02-10 23:52:57 PST
http://trac.webkit.org/changeset/107474 The pattern looks nicer so I did it anyway.
Note You need to log in before you can comment on or make changes to this bug.