<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>125789</bug_id>
          
          <creation_ts>2013-12-16 11:00:20 -0800</creation_ts>
          <short_desc>CStack Branch: REGRESSION(r160600) ASSERT failure in Heap::collect()</short_desc>
          <delta_ts>2013-12-16 13:20:53 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>JavaScriptCore</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Michael Saboff">msaboff</reporter>
          <assigned_to name="Michael Saboff">msaboff</assigned_to>
          
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>960136</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Saboff">msaboff</who>
    <bug_when>2013-12-16 11:00:20 -0800</bug_when>
    <thetext>ASSERTION FAILED: vm()-&gt;currentThreadIsHoldingAPILock()
/Volumes/Data/src/webkit.cstack/Source/JavaScriptCore/heap/Heap.cpp(755) : void JSC::Heap::collect(JSC::Heap::SweepToggle)
1   0x1006c5700 WTFCrash
2   0x10034fdf2 JSC::Heap::collect(JSC::Heap::SweepToggle)
3   0x10034e694 JSC::Heap::collectIfNecessaryOrDefer()
4   0x10012467f JSC::CopiedSpace::allocateBlock()
5   0x1001230ef JSC::CopiedSpace::init()
6   0x10034e209 JSC::Heap::Heap(JSC::VM*, JSC::HeapType)
7   0x10034df63 JSC::Heap::Heap(JSC::VM*, JSC::HeapType)
8   0x100666033 JSC::VM::VM(JSC::VM::VMType, JSC::HeapType)
9   0x100665f31 JSC::VM::VM(JSC::VM::VMType, JSC::HeapType)
10  0x100668a2e JSC::VM::create(JSC::HeapType)
11  0x100001993 jscmain(int, char**)
12  0x1000018b6 main
13  0x7fff93a6e5fd start
14  0x2

We don&apos;t have the API lock because we are still initializing the VM.  We should try collecting since we haven&apos;t allocated anything.  I think we need to put the shouldCollect() check back in collectIfNecessaryOrDefer().</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>960143</commentid>
    <comment_count>1</comment_count>
      <attachid>219333</attachid>
    <who name="Michael Saboff">msaboff</who>
    <bug_when>2013-12-16 11:04:37 -0800</bug_when>
    <thetext>Created attachment 219333
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>960190</commentid>
    <comment_count>2</comment_count>
      <attachid>219333</attachid>
    <who name="Mark Lam">mark.lam</who>
    <bug_when>2013-12-16 12:56:14 -0800</bug_when>
    <thetext>Comment on attachment 219333
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=219333&amp;action=review

&gt; Source/JavaScriptCore/ChangeLog:8
&gt; +        Restored the chouldCollect() check so we don&apos;t collect on start up.

typo: chouldCollect() ==&gt; shouldCollect().</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>960194</commentid>
    <comment_count>3</comment_count>
      <attachid>219333</attachid>
    <who name="Geoffrey Garen">ggaren</who>
    <bug_when>2013-12-16 13:08:56 -0800</bug_when>
    <thetext>Comment on attachment 219333
Patch

r=me</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>960198</commentid>
    <comment_count>4</comment_count>
    <who name="Michael Saboff">msaboff</who>
    <bug_when>2013-12-16 13:20:53 -0800</bug_when>
    <thetext>Committed r160658: &lt;http://trac.webkit.org/changeset/160658&gt;</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>219333</attachid>
            <date>2013-12-16 11:04:37 -0800</date>
            <delta_ts>2013-12-16 13:08:56 -0800</delta_ts>
            <desc>Patch</desc>
            <filename>125789.patch</filename>
            <type>text/plain</type>
            <size>1309</size>
            <attacher name="Michael Saboff">msaboff</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9KYXZhU2NyaXB0Q29yZS9DaGFuZ2VMb2cKPT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gU291
cmNlL0phdmFTY3JpcHRDb3JlL0NoYW5nZUxvZwkocmV2aXNpb24gMTYwNjQ5KQorKysgU291cmNl
L0phdmFTY3JpcHRDb3JlL0NoYW5nZUxvZwkod29ya2luZyBjb3B5KQpAQCAtMSwzICsxLDE4IEBA
CisyMDEzLTEyLTE2ICBNaWNoYWVsIFNhYm9mZiAgPG1zYWJvZmZAYXBwbGUuY29tPgorCisgICAg
ICAgIENTdGFjayBCcmFuY2g6IFJFR1JFU1NJT04ocjE2MDYwMCkgQVNTRVJUIGZhaWx1cmUgaW4g
SGVhcDo6Y29sbGVjdCgpCisgICAgICAgIGh0dHBzOi8vYnVncy53ZWJraXQub3JnL3Nob3dfYnVn
LmNnaT9pZD0xMjU3ODkKKworICAgICAgICBSZXZpZXdlZCBieSBOT0JPRFkgKE9PUFMhKS4KKwor
ICAgICAgICBSZXN0b3JlZCB0aGUgY2hvdWxkQ29sbGVjdCgpIGNoZWNrIHNvIHdlIGRvbid0IGNv
bGxlY3Qgb24gc3RhcnQgdXAuCisgICAgICAgIEVsaW1pbmF0ZWQgdGhlIE9wdGlvbnM6OmRpc2Fi
bGVHQygpIGNoZWNrIHNpbmNlIGl0IGlzIHBhcnQgb2YgdGhlIAorICAgICAgICBpc0RlZmVycmVk
KCkgY2hlY2suCisgICAgICAgIAorCisgICAgICAgICogaGVhcC9IZWFwLmNwcDoKKyAgICAgICAg
KEpTQzo6SGVhcDo6Y29sbGVjdElmTmVjZXNzYXJ5T3JEZWZlcik6CisKIDIwMTMtMTItMTQgIEZp
bGlwIFBpemxvICA8ZnBpemxvQGFwcGxlLmNvbT4KIAogICAgICAgICBGVEwgc2hvdWxkICpyZWFs
bHkqIGtub3cgd2hlbiB0aGluZ3MgYXJlIGZsdXNoZWQKSW5kZXg6IFNvdXJjZS9KYXZhU2NyaXB0
Q29yZS9oZWFwL0hlYXAuY3BwCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIFNvdXJjZS9KYXZhU2NyaXB0Q29yZS9o
ZWFwL0hlYXAuY3BwCShyZXZpc2lvbiAxNjA2NDEpCisrKyBTb3VyY2UvSmF2YVNjcmlwdENvcmUv
aGVhcC9IZWFwLmNwcAkod29ya2luZyBjb3B5KQpAQCAtODc3LDEwICs4NzcsMTAgQEAgYm9vbCBI
ZWFwOjpjb2xsZWN0SWZOZWNlc3NhcnlPckRlZmVyKCkKIHsKICAgICBpZiAoaXNEZWZlcnJlZCgp
KQogICAgICAgICByZXR1cm4gZmFsc2U7Ci0gICAgCi0gICAgaWYgKE9wdGlvbnM6OmRpc2FibGVH
QygpKQorCisgICAgaWYgKCFzaG91bGRDb2xsZWN0KCkpCiAgICAgICAgIHJldHVybiBmYWxzZTsK
LSAgICAKKwogICAgIGNvbGxlY3QoRG9Ob3RTd2VlcCk7CiAgICAgcmV0dXJuIHRydWU7CiB9Cg==
</data>
<flag name="review"
          id="242943"
          type_id="1"
          status="+"
          setter="ggaren"
    />
          </attachment>
      

    </bug>

</bugzilla>