<?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>85748</bug_id>
          
          <creation_ts>2012-05-06 14:36:35 -0700</creation_ts>
          <short_desc>InlineBox::setHasBadParent should be debug only</short_desc>
          <delta_ts>2012-05-07 12:27: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>WebKit Misc.</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</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="Rob Buis">rwlbuis</reporter>
          <assigned_to name="Rob Buis">rwlbuis</assigned_to>
          <cc>darin</cc>
    
    <cc>eric</cc>
    
    <cc>webkit.review.bot</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>617170</commentid>
    <comment_count>0</comment_count>
    <who name="Rob Buis">rwlbuis</who>
    <bug_when>2012-05-06 14:36:35 -0700</bug_when>
    <thetext>The method InlineBox::setHasBadParent is only used in debug, so don&apos;t provide this function in release.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>617173</commentid>
    <comment_count>1</comment_count>
      <attachid>140436</attachid>
    <who name="Rob Buis">rwlbuis</who>
    <bug_when>2012-05-06 14:41:00 -0700</bug_when>
    <thetext>Created attachment 140436
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>617178</commentid>
    <comment_count>2</comment_count>
      <attachid>140436</attachid>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2012-05-06 14:49:45 -0700</bug_when>
    <thetext>Comment on attachment 140436
Patch

I&apos;m not sure this helps much.  I guess all callers were already wrapped behind NDEBUG flags?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>617179</commentid>
    <comment_count>3</comment_count>
    <who name="Rob Buis">rwlbuis</who>
    <bug_when>2012-05-06 14:54:43 -0700</bug_when>
    <thetext>Hi Eric,

(In reply to comment #2)
&gt; (From update of attachment 140436 [details])
&gt; I&apos;m not sure this helps much.  I guess all callers were already wrapped behind NDEBUG flags?

Not claiming a huge speedup :) But why provide a no-op method in release that is not called? Yes the one caller is wrapped in NDEBUG.
Cheers,

Rob.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>617180</commentid>
    <comment_count>4</comment_count>
    <who name="Rob Buis">rwlbuis</who>
    <bug_when>2012-05-06 14:55:12 -0700</bug_when>
    <thetext>(In reply to comment #3)
&gt; Hi Eric,
&gt; 
&gt; (In reply to comment #2)
&gt; &gt; (From update of attachment 140436 [details] [details])
&gt; &gt; I&apos;m not sure this helps much.  I guess all callers were already wrapped behind NDEBUG flags?
&gt; 
&gt; Not claiming a huge speedup :) But why provide a no-op method in release that is not called? Yes the one caller is wrapped in NDEBUG.
&gt; Cheers,
&gt; 
&gt; Rob.

I think I should have said, method with empty body.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>617240</commentid>
    <comment_count>5</comment_count>
      <attachid>140436</attachid>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2012-05-06 17:44:28 -0700</bug_when>
    <thetext>Comment on attachment 140436
Patch

Clearing flags on attachment: 140436

Committed r116253: &lt;http://trac.webkit.org/changeset/116253&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>617241</commentid>
    <comment_count>6</comment_count>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2012-05-06 17:44:33 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>617249</commentid>
    <comment_count>7</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2012-05-06 18:11:15 -0700</bug_when>
    <thetext>Why make this change? The other way can be nicer since you don’t have to #ifdef every call site if it’s the only thing that would require an ifdef.

Also, if we’re not doing the NDEBUG version, then I see no point in making this inline.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>617262</commentid>
    <comment_count>8</comment_count>
    <who name="Rob Buis">rwlbuis</who>
    <bug_when>2012-05-06 18:49:00 -0700</bug_when>
    <thetext>Hi Darin,
(In reply to comment #7)
&gt; Why make this change? The other way can be nicer since you don’t have to #ifdef every call site if it’s the only thing that would require an ifdef.

Right, but at the moment there is only one call site, and it is in a NDEBUG section.

&gt; Also, if we’re not doing the NDEBUG version, then I see no point in making this inline.

I am not even thinking about inline, the goal of my patch is to simply remove the method for release builds , since it is only useful in debug builds. Basically it is the way I would have done this code myself. I don&apos;t know if the release binary gets smaller or the compiler is clever enough to not generate code for this unused function (in release). Maybe the inline is enough of a clue for the compiler to do that, I just found my way clearer. Basically I happened to have this change in my git tree and I needed to get it out of the way :) If you feel strongly for the old approach, a revert is possible of course.
Cheers,

Rob.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>617685</commentid>
    <comment_count>9</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2012-05-07 10:25:30 -0700</bug_when>
    <thetext>(In reply to comment #8)
&gt; I don&apos;t know if the release binary gets smaller

I do know. It does not get smaller.

&gt; the compiler is clever enough to not generate code for this unused function (in release)

It is.

&gt; I just found my way clearer.

OK. We disagree on this. I like the old way.

I don’t think we should be changing things like this, especially in code that we’re not otherwise changing. I think fewer #ifdefs are better for code readability.

Functions that are empty inlines in release builds are a technique used all over the place in WebCore. So there should be no doubt that the technique works unless we see an actual problem.

I am not going to push you to change this in this case, but lets please not head in this direction in the future.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>617826</commentid>
    <comment_count>10</comment_count>
    <who name="Rob Buis">rwlbuis</who>
    <bug_when>2012-05-07 12:27:13 -0700</bug_when>
    <thetext>Hi Darin,

(In reply to comment #9)
&gt; (In reply to comment #8)
&gt; &gt; I don&apos;t know if the release binary gets smaller
&gt; 
&gt; I do know. It does not get smaller.
&gt; 
&gt; &gt; the compiler is clever enough to not generate code for this unused function (in release)
&gt; 
&gt; It is.
&gt; 
&gt; &gt; I just found my way clearer.
&gt; 
&gt; OK. We disagree on this. I like the old way.
&gt; 
&gt; I don’t think we should be changing things like this, especially in code that we’re not otherwise changing. I think fewer #ifdefs are better for code readability.
&gt; 
&gt; Functions that are empty inlines in release builds are a technique used all over the place in WebCore. So there should be no doubt that the technique works unless we see an actual problem.
&gt; 
&gt; I am not going to push you to change this in this case, but lets please not head in this direction in the future.

Ok, I did not know this, I&apos;ll indeed not do changes like that in the future.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>140436</attachid>
            <date>2012-05-06 14:41:00 -0700</date>
            <delta_ts>2012-05-06 17:44:28 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-85748-20120506174049.patch</filename>
            <type>text/plain</type>
            <size>1623</size>
            <attacher name="Rob Buis">rwlbuis</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMTE2MjM4CmRpZmYgLS1naXQgYS9Tb3VyY2UvV2ViQ29yZS9D
aGFuZ2VMb2cgYi9Tb3VyY2UvV2ViQ29yZS9DaGFuZ2VMb2cKaW5kZXggMDY2MDcwZTY2MzdjNzc5
YTUzMWQ2Y2Y0YTRlODEyMjk3Y2Q4M2Y2ZS4uZTExYzlkMGM4Mjg5YzZiMmYxMjRlN2JiNjBlNzY2
MGIyNjViMWY4NSAxMDA2NDQKLS0tIGEvU291cmNlL1dlYkNvcmUvQ2hhbmdlTG9nCisrKyBiL1Nv
dXJjZS9XZ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