[webkit-dev] Initialization of Attribute Map

Fady Samuel fsamuel at chromium.org
Fri Jun 18 13:39:50 PDT 2010

Hi all,

I'm looking at a bug listed on chromium.org (
http://code.google.com/p/chromium/issues/detail?id=46025) but it's actually
a WebKit bug...I've verified that the crash is in WebKit and Safari also
crashes on Mac. It seems that the javascript line:

ellipse.className.baseVal = "cls1";

results in a call to StyledElement::classNames which then requests the
classNames from the attiribute map.

At the time, the attribute map does not exist. An assert fails because
it has not yet been created.

It seems a simple fix is to create it if it hasn't been created.

Looking at other code, it appears that the attribute map is created
lazily when needed.

Is this the solution or is there a fundamental assumption being
violated here that I should dig deeper into?


Fady Samuel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20100618/8a7d4626/attachment.html>

More information about the webkit-dev mailing list