<?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>115448</bug_id>
          
          <creation_ts>2013-04-30 15:06:29 -0700</creation_ts>
          <short_desc>ipc-posix-shm backwards compatibility</short_desc>
          <delta_ts>2013-05-01 21:49:07 -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>528+ (Nightly build)</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.7</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Major</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Simon Cooper">scooper</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ap</cc>
    
    <cc>commit-queue</cc>
    
    <cc>mrowe</cc>
    
    <cc>scooper</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>883241</commentid>
    <comment_count>0</comment_count>
    <who name="Simon Cooper">scooper</who>
    <bug_when>2013-04-30 15:06:29 -0700</bug_when>
    <thetext>Need backwards compatibility for older ipc-posix-shm operations.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>883357</commentid>
    <comment_count>1</comment_count>
      <attachid>200194</attachid>
    <who name="Simon Cooper">scooper</who>
    <bug_when>2013-04-30 17:35:28 -0700</bug_when>
    <thetext>Created attachment 200194
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>883387</commentid>
    <comment_count>2</comment_count>
      <attachid>200194</attachid>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2013-04-30 22:26:46 -0700</bug_when>
    <thetext>Comment on attachment 200194
Patch

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

r=me

&gt; Source/WebKit2/Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb:250
&gt; +(if (not (defined? &apos;ipc-posix-shm*))
&gt; +    (define ipc-posix-shm* ipc-posix-shm))

I wish we pre-processed plug-in sandbox profile files, so that we could do conditional compilation. With an #if check, removing obsolete code is much more straightforward.

Also, we wouldn&apos;t have to merge parts at runtime, as we could simply #include &quot;com.apple.WebKit.plugin-common.sb&quot;, and let preprocessor build a complete profile.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>883389</commentid>
    <comment_count>3</comment_count>
      <attachid>200194</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2013-04-30 23:07:57 -0700</bug_when>
    <thetext>Comment on attachment 200194
Patch

Clearing flags on attachment: 200194

Committed r149427: &lt;http://trac.webkit.org/changeset/149427&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>883390</commentid>
    <comment_count>4</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2013-04-30 23:08:00 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>883541</commentid>
    <comment_count>5</comment_count>
    <who name="Simon Cooper">scooper</who>
    <bug_when>2013-05-01 14:48:20 -0700</bug_when>
    <thetext>(In reply to comment #2)
&gt; (From update of attachment 200194 [details])
&gt; View in context: https://bugs.webkit.org/attachment.cgi?id=200194&amp;action=review
&gt; 
&gt; r=me
&gt; 
&gt; &gt; Source/WebKit2/Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb:250
&gt; &gt; +(if (not (defined? &apos;ipc-posix-shm*))
&gt; &gt; +    (define ipc-posix-shm* ipc-posix-shm))
&gt; 
&gt; I wish we pre-processed plug-in sandbox profile files, so that we could do conditional compilation. With an #if check, removing obsolete code is much more straightforward.

This isn&apos;t obsolete code -- it provides backwards compatibility.

&gt; Also, we wouldn&apos;t have to merge parts at runtime, as we could simply #include &quot;com.apple.WebKit.plugin-common.sb&quot;, and let preprocessor build a complete profile.

This is not a good idea. 

- This will not work if the AppleConnect profile is moved to a different project.

- Forcing cpp preprocessing means that some sort of  &quot;compilation step&quot; has to occur before passing to sandbox which makes it harder to develop and debug profiles.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>883551</commentid>
    <comment_count>6</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2013-05-01 15:02:34 -0700</bug_when>
    <thetext>&gt; This isn&apos;t obsolete code -- it provides backwards compatibility.

It will be obsolete relatively soon, at which point we&apos;ll certainly forget to remove it, because there is no indication in code about when it can be removed. We know this currently, and being good forward looking engineers, we can pave the path now.

Conditional compilation macros is how we do this in other code, so this would be the most straightforward way for profiles too.

&gt; - This will not work if the AppleConnect profile is moved to a different project.

I can&apos;t agree with that. In fact, it&apos;s the opposite - having half of the profile in WebKit and another half in a different project is not workable long term.

&gt; - Forcing cpp preprocessing means that some sort of  &quot;compilation step&quot; has to occur before passing to sandbox which makes it harder to develop and debug profiles.

We perform preprocessing for some of the profiles, and haven&apos;t had any issues with that yet.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>883699</commentid>
    <comment_count>7</comment_count>
    <who name="Simon Cooper">scooper</who>
    <bug_when>2013-05-01 18:20:04 -0700</bug_when>
    <thetext>(In reply to comment #6)
&gt; &gt; This isn&apos;t obsolete code -- it provides backwards compatibility.
&gt; 
&gt; It will be obsolete relatively soon, at which point we&apos;ll certainly forget to remove it, because there is no indication in code about when it can be removed. We know this currently, and being good forward looking engineers, we can pave the path now.

If that is the issue, it can certainly be addressed.  What specifically do you need to see?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>883719</commentid>
    <comment_count>8</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2013-05-01 21:49:07 -0700</bug_when>
    <thetext>CC&apos;ing Mark, as I think that he is the one who most frequently does such cleanup. I _think_ that preprocessor checks like &quot;#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1070&quot; would make it easiest.

Alternatively, a FIXME comment explaining when the code can be removed would help us do that eventually, even if with a bit more manual work.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>200194</attachid>
            <date>2013-04-30 17:35:28 -0700</date>
            <delta_ts>2013-04-30 23:07:57 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-115448-20130430173442.patch</filename>
            <type>text/plain</type>
            <size>1854</size>
            <attacher name="Simon Cooper">scooper</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMTQ5MjE3CmRpZmYgLS1naXQgYS9Tb3VyY2UvV2ViS2l0Mi9D
aGFuZ2VMb2cgYi9Tb3VyY2UvV2ViS2l0Mi9DaGFuZ2VMb2cKaW5kZXggYTQ3MDE4ZjVkYzcwY2M0
ZTVhZmNjYjZjM2ZmY2FjOWQ2ZjE3OWU3Ny4uYjViNGYxZWY4YTY2ZWM2Njc5MzQzMzZjMTZiNjg5
ZmIwODcwMDUxZSAxMDA2NDQKLS0tIGEvU291cmNlL1dlYktpdDIvQ2hhbmdlTG9nCisrKyBiL1Nv
dXJjZS9XZWJLaXQyL0NoYW5nZUxvZwpAQCAtMSwzICsxLDE2IEBACisyMDEzLTA0LTMwICBTaW1v
biBDb29wZXIgIDxzY29vcGVyQGFwcGxlLmNvbT4KKworICAgICAgICBpcGMtcG9zaXgtc2htIGJh
Y2t3YXJkcyBjb21wYXRpYmlsaXR5IAorICAgICAgICBodHRwczovL2J1Z3Mud2Via2l0Lm9yZy9z
aG93X2J1Zy5jZ2k/aWQ9MTE1NDQ4CisgICAgICAgIDxyZGFyOi8vcHJvYmxlbS8xMzc0MzAzNz4K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