[Webkit-unassigned] [Bug 15123] Self-replicating code makes Safari hang and eventually crash

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jan 17 14:20:06 PST 2011


https://bugs.webkit.org/show_bug.cgi?id=15123





--- Comment #23 from Alexey Proskuryakov <ap at webkit.org>  2011-01-17 14:20:04 PST ---
(From update of attachment 79215)
View in context: https://bugs.webkit.org/attachment.cgi?id=79215&action=review

It seems fine to fix this specific case that Firefox gets right, but I'll let it for others (Adam) to decide.

The below are just some style nits.

Please do add ChangeLogs: http://webkit.org/coding/contributing.html

> WebCore/dom/Document.h:22
> + * the Free Software Foundation, Inc.,killed myspace 51 Franklin Street, Fifth Floor,

I didn't know that!

> WebCore/dom/Document.h:1383
> +    bool m_tooDeepWriteRecursion;

For better readability, "m_writeRecursionIsTooDeep".

> WebCore/dom/Document.h:1384
> +    unsigned int m_writeRecursionDepth;

We just use "unsigned", not "unsigned int".

> WebCore/dom/Document.cpp:100
> +#include "NestingLevelIncrementer.h"
>  #include "MediaQueryList.h"

Includes should be in alphabetical order.

> WebCore/dom/Document.cpp:215
> +static const  int cMaxWriteRecursionDepth= 20;

There shouldn't be two spaces between const and int, and there should be a space before "=".

> WebCore/dom/Document.cpp:2226
> +    m_tooDeepWriteRecursion = (m_writeRecursionDepth>1) && m_tooDeepWriteRecursion;
> +    m_tooDeepWriteRecursion = (m_writeRecursionDepth>cMaxWriteRecursionDepth) || m_tooDeepWriteRecursion;

There should be spaces around ">".

> WebCore/dom/Document.cpp:2242
>      if (!hasInsertionPoint && m_ignoreDestructiveWriteCount)
>          return;
>  
> +
>      if (!hasInsertionPoint)
>          open(ownerDocument);

Why did you add this empty line?

> WebCore/dom/Document.cpp:2250
> -#endif    
> +#endif   

You removed one space, which is fine, but why not the other three?

> LayoutTests/dom/html/level2/html/selfReplicatingJS.html:6
> +<script type='text/javascript' src='selfhtml.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></HEAD>

Please don't add new tests to LayoutTests/dom, and use an appropriate subdirectory of LayoutTests/fast/dom instead. These are imported W3C tests.

-- 
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