Show
Ignore:
Timestamp:
03/07/07 07:37:06 (22 months ago)
Author:
ggaren
Message:

JavaScriptCore:

Reviewed by Maciej.

http://bugs.webkit.org/show_bug.cgi?id=12997

Wrap pthread-specific assertion in #if USE(MULTIPLE_THREADS).

  • kjs/collector.cpp: (KJS::Collector::markMainThreadOnlyObjects):

WebCore:

Reviewed by Maciej Stachowiak.


Fixed <rdar://problem/4576242> | http://bugs.webkit.org/show_bug.cgi?id=12586
PAC file: malloc deadlock sometimes causes a hang @ www.apple.com/pro/profiles/ (12586)


No test because this is very difficult to repro, and the new ASSERTs in
JavaScriptCore catch the underlying cause while running normal layout tests.


This is a modified version of r14752 on the branch.


The fix is to use a bit inside each node, instead of a hash table, to track
which node subtrees are in the process of being marked. This avoids a call
to malloc inside mark().


  • bindings/js/kjs_binding.cpp: (KJS::domObjects): (KJS::domNodesPerDocument):
  • bindings/js/kjs_dom.cpp: (KJS::DOMNode::mark):
  • dom/Node.cpp: (WebCore::Node::Node):
  • dom/Node.h:
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/dom/Node.h

    r19855 r20019  
    460460    short m_tabIndex; 
    461461 
     462    // 16 bit fields exactly -- adding another field would increase the size of all Nodes 
    462463    bool m_hasId : 1; 
    463464    bool m_hasClass : 1; 
     
    478479    bool m_inDetach : 1; 
    479480 
     481public: 
     482    bool m_inSubtreeMark : 1; 
     483 
    480484private: 
    481485    Element* ancestorElement() const;