<?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>60835</bug_id>
          
          <creation_ts>2011-05-14 02:04:17 -0700</creation_ts>
          <short_desc>initializeMainThread in jsc executable</short_desc>
          <delta_ts>2011-05-14 22:02:06 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>New Bugs</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>59762</dup_id>
          
          <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="Patrick R. Gansterer">paroga</reporter>
          <assigned_to name="Patrick R. Gansterer">paroga</assigned_to>
          <cc>abarth</cc>
    
    <cc>ap</cc>
    
    <cc>barraclough</cc>
    
    <cc>levin</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>404045</commentid>
    <comment_count>0</comment_count>
    <who name="Patrick R. Gansterer">paroga</who>
    <bug_when>2011-05-14 02:04:17 -0700</bug_when>
    <thetext>initializeMainThread in jsc executable</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>404046</commentid>
    <comment_count>1</comment_count>
      <attachid>93551</attachid>
    <who name="Patrick R. Gansterer">paroga</who>
    <bug_when>2011-05-14 02:07:08 -0700</bug_when>
    <thetext>Created attachment 93551
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>404079</commentid>
    <comment_count>2</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2011-05-14 11:13:20 -0700</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 59762 ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>404090</commentid>
    <comment_count>3</comment_count>
    <who name="Patrick R. Gansterer">paroga</who>
    <bug_when>2011-05-14 12:41:32 -0700</bug_when>
    <thetext>Can you please explain the r-?
What&apos;s wrong with this change?
Isn&apos;t the knowledge about the MainThread allowed in JSC? Why is it part of WTF in that case?
At the moment we get an assertion at http://trac.webkit.org/browser/trunk/Source/JavaScriptCore/wtf/CryptographicallyRandomNumber.cpp?rev=84466#L146 when not using ENABLE(WTF_MULTIPLE_THREADS).
I don&apos;t think that removing the assertion will be the right way???</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>404104</commentid>
    <comment_count>4</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2011-05-14 13:20:56 -0700</bug_when>
    <thetext>Sorry, I thought that the explanation in the bug I duped this to was sufficient. A JavaScriptCore API client can use any thread - there is no requirement that the first call to JavaScriptCore is from main thread, or that the client initializes main thread explicitly. So, jsc is testing a common and perfectly normal scenario.

&gt; At the moment we get an assertion at http://trac.webkit.org/browser/trunk/Source/JavaScriptCore/wtf/CryptographicallyRandomNumber.cpp?rev=84466#L146 when not using ENABLE(WTF_MULTIPLE_THREADS).

It would be cleanest to open a new bug for the symptom that you observe, and discuss solutions there. Please post a stack trace for the assertion in that bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>404114</commentid>
    <comment_count>5</comment_count>
    <who name="Patrick R. Gansterer">paroga</who>
    <bug_when>2011-05-14 13:50:41 -0700</bug_when>
    <thetext>(In reply to comment #4)
&gt; Sorry, I thought that the explanation in the bug I duped this to was sufficient.

I didn&apos;t find the info i wanted. :-(

&gt; A JavaScriptCore API client can use any thread - there is no requirement that the first call to JavaScriptCore is from main thread, or that the client initializes main thread explicitly. So, jsc is testing a common and perfectly normal scenario.

IMHO then every isMainThread call is wrong in WTF/JSC and we should move MainThread to WebCore.

&gt; &gt; At the moment we get an assertion at http://trac.webkit.org/browser/trunk/Source/JavaScriptCore/wtf/CryptographicallyRandomNumber.cpp?rev=84466#L146 when not using ENABLE(WTF_MULTIPLE_THREADS).
&gt; 
&gt; It would be cleanest to open a new bug for the symptom that you observe, and discuss solutions there. Please post a stack trace for the assertion in that bug.

Created bug 60846.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>404143</commentid>
    <comment_count>6</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2011-05-14 22:02:06 -0700</bug_when>
    <thetext>&gt; IMHO then every isMainThread call is wrong in WTF/JSC and we should move MainThread to WebCore.

There are only two uses outside MainThread.* files - in AtomicString::init() and in CryptographicallyRandomNumber.cpp. This does seem confusing and misplaced to me.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>93551</attachid>
            <date>2011-05-14 02:07:08 -0700</date>
            <delta_ts>2011-05-14 11:13:29 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-60835-20110514110706.patch</filename>
            <type>text/plain</type>
            <size>1246</size>
            <attacher name="Patrick R. Gansterer">paroga</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogODY0NjIKZGlmZiAtLWdpdCBhL1NvdXJjZS9KYXZhU2NyaXB0
Q29yZS9DaGFuZ2VMb2cgYi9Tb3VyY2UvSmF2YVNjcmlwdENvcmUvQ2hhbmdlTG9nCmluZGV4IDQw
YzhhMzE1ZjQ2MjcxMTgzNWUyYzZiZGZjY2U2N2UyODA2NzYzNTIuLjkzOGQ4MzllNmJlMWMwNGI2
MGUxY2ZkMmMwMTExOGQ0ZGNmNTY2NjAgMTAwNjQ0Ci0tLSBhL1NvdXJjZS9KYXZhU2NyaXB0Q29y
ZS9DaGFuZ2VMb2cKKysrIGIvU291cmNlL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uCiAgICAgSlNDOjppbml0aWFsaXplVGhy
ZWFkaW5nKCk7CisgICAgV1RGOjppbml0aWFsaXplTWFpblRocmVhZCgpOwogCiAgICAgLy8gV2Ug
Y2FuJ3QgdXNlIGRlc3RydWN0b3JzIGluIHRoZSBmb2xsb3dpbmcgY29kZSBiZWNhdXNlIGl0IHVz
ZXMgV2luZG93cwogICAgIC8vIFN0cnVjdHVyZWQgRXhjZXB0aW9uIEhhbmRsaW5nCg==
</data>
<flag name="review"
          id="86725"
          type_id="1"
          status="-"
          setter="ap"
    />
    <flag name="commit-queue"
          id="86726"
          type_id="3"
          status="-"
          setter="ap"
    />
          </attachment>
      

    </bug>

</bugzilla>