<?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>238496</bug_id>
          
          <creation_ts>2022-03-29 02:23:13 -0700</creation_ts>
          <short_desc>IPC::Connection::Connection() is not usable from non-main threads</short_desc>
          <delta_ts>2022-04-05 02:24:13 -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>WebKit2</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>238515</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Kimmo Kinnunen">kkinnunen</reporter>
          <assigned_to name="Kimmo Kinnunen">kkinnunen</assigned_to>
          <cc>cdumez</cc>
    
    <cc>kkinnunen</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1855956</commentid>
    <comment_count>0</comment_count>
    <who name="Kimmo Kinnunen">kkinnunen</who>
    <bug_when>2022-03-29 02:23:13 -0700</bug_when>
    <thetext>IPC::Connection::Connection() is not usable from non-main threads</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1856115</commentid>
    <comment_count>1</comment_count>
      <attachid>456047</attachid>
    <who name="Kimmo Kinnunen">kkinnunen</who>
    <bug_when>2022-03-29 11:33:28 -0700</bug_when>
    <thetext>Created attachment 456047
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1856846</commentid>
    <comment_count>2</comment_count>
      <attachid>456047</attachid>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2022-03-31 10:14:59 -0700</bug_when>
    <thetext>Comment on attachment 456047
Patch

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

&gt; Source/WebKit/ChangeLog:8
&gt; +        Make it possible to instantiate Connection from non-main threads.

Is it OK that even we can now construct an IPC::Connection off the main thread, it will still always get destroyed on the main thread (meaning that the destruction thread differs from the construction thread)?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1857784</commentid>
    <comment_count>3</comment_count>
      <attachid>456047</attachid>
    <who name="Kimmo Kinnunen">kkinnunen</who>
    <bug_when>2022-04-04 01:53:35 -0700</bug_when>
    <thetext>Comment on attachment 456047
Patch

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

&gt;&gt; Source/WebKit/ChangeLog:8
&gt;&gt; +        Make it possible to instantiate Connection from non-main threads.
&gt; 
&gt; Is it OK that even we can now construct an IPC::Connection off the main thread, it will still always get destroyed on the main thread (meaning that the destruction thread differs from the construction thread)?

Yes, I think it is sound. This also preserves the assertions in the destructor.

However, currently the feature of constructing in arbitrary thread is not that useful. Also, the feature in practice cannot be used until more of the features (all?) are made thread agnostic. This means the work in this patch is mostly useful only at the point when ~Connection runs in arbitrary thread.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1858308</commentid>
    <comment_count>4</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2022-04-05 02:24:13 -0700</bug_when>
    <thetext>&lt;rdar://problem/91284136&gt;</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>456047</attachid>
            <date>2022-03-29 11:33:28 -0700</date>
            <delta_ts>2022-03-29 21:01:54 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-238496-20220329213327.patch</filename>
            <type>text/plain</type>
            <size>2303</size>
            <attacher name="Kimmo Kinnunen">kkinnunen</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMjkyMDIyCmRpZmYgLS1naXQgYS9Tb3VyY2UvV2ViS2l0L0No
YW5nZUxvZyBiL1NvdXJjZS9XZWJLaXQvQ2hhbmdlTG9nCmluZGV4IGNiZDg5NThhMDlkZjY3ZTJj
MWEzNGI3Njk3NmY3YjE3MTE3NGY4OTQuLmViMDBkZWM4MTMyNDkzZDkxZTcwOTg1ODhiZjQ0Zjc0
MjFmNTMxODYgMTAwNjQ0Ci0tLSBhL1NvdXJjZS9XZWJLaXQvQ2hhbmdlTG9nCisrKyBiL1NvdXJj
ZS9XZWJLaXQvQ2hhbmdlTG9nCkBAIC0xLDMgKzEsMTcgQEAKKzIwMjItMDMtMjkgIEtpbW1vIEtp
bm51bmVuICA8a2tpbm51bmVuQGFwcGxlLmNvbT4KKworICAgICAgICBJUEM6OkNvbm5lY3Rpb246
OkNvbm5lY3Rpb24oKSBpcyBub3QgdXNhYmxlIGZyb20gbm9uLW1haW4gdGhyZWFkcworICAgICAg
ICBodHRwczovL2J1Z3Mud2Via2l0Lm9yZy9zaG93X2J1Zy5jZ2k/aWQ9MjM4NDk2CisKKyAgICAg
ICAgUmV2aWV3ZWQgYnkgTk9CT0RZIChPT1BTISkuCisKKyAgICAgICAgTWFrZSBpdCBwb3NzaWJs
ZSB0byBpbnN0YW50aWF0ZSBDb25uZWN0aW9uIGZyb20gbm9uLW1haW4gdGhyZWFkcy4KKyAgICAg
ICAgVGhpcyBpcyBhIHdvcmsgdG93YXJkcyBiZWluZyBub24tbWFpbiB0aHJlYWQgQ29ubmVjdGlv
bi4KKworICAgICAgICAqIFBsYXRmb3JtL0lQQy9Db25uZWN0aW9uLmNwcDoKKyAgICAgICAgKElQ
Qzo6Q29ubmVjdGlvbjo6Q29ubmVjdGlvbik6CisgICAgICAgIChJUEM6OkNvbm5lY3Rpb246OmNv
bm5lY3Rpb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
          status="?"
          setter="kkinnunen"
    />
    <flag name="commit-queue"
          id="484284"
          type_id="3"
          status="-"
          setter="ews-feeder"
    />
          </attachment>
      

    </bug>

</bugzilla>