Ignore:
Timestamp:
Mar 7, 2007, 7:37:06 AM (18 years 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:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/wtf/FastMalloc.h

    r17222 r20019  
    3535    void *fastRealloc(void* p, size_t n);
    3636
     37#ifndef NDEBUG   
     38    void fastMallocForbid();
     39    void fastMallocAllow();
     40#endif
     41
    3742} // namespace WTF
    3843
     
    4146using WTF::fastRealloc;
    4247using WTF::fastFree;
     48
     49#ifndef NDEBUG   
     50using WTF::fastMallocForbid;
     51using WTF::fastMallocAllow;
     52#endif
    4353
    4454#if PLATFORM(GCC) && PLATFORM(DARWIN)
Note: See TracChangeset for help on using the changeset viewer.