<?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>165987</bug_id>
          
          <creation_ts>2016-12-16 20:17:19 -0800</creation_ts>
          <short_desc>warning: the compiler can assume that the address of ‘thisObject’ will always evaluate to ‘true’ [-Waddress] in WebCore::JSHTMLDocument::getOwnPropertySlot</short_desc>
          <delta_ts>2016-12-17 10:14:12 -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>WebCore JavaScript</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</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>Trivial</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Michael Catanzaro">mcatanzaro</reporter>
          <assigned_to name="Michael Catanzaro">mcatanzaro</assigned_to>
          <cc>darin</cc>
    
    <cc>mark.lam</cc>
    
    <cc>mcatanzaro</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1260879</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2016-12-16 20:17:19 -0800</bug_when>
    <thetext>Seems ASSERT_GC_OBJECT_LOOKS_VALID is causing a warning again (like in r194303). Ways to fix this:

 * Use ASSERT_THIS_GC_OBJECT_INHERITS instead of ASSERT_GC_OBJECT_INHERITS. The only difference is ASSERT_THIS_GC_OBJECT_INHERITS doesn&apos;t have the null check that triggers the warning, so the behavior is what we want, but it&apos;d be evil because here we are checking |thisObject| which is a normal parameter, not |this|.
 * Add more macros that do the same thing, with different names.
 * Just pass the original pointer rather than taking the address of a reference.

If this starts happening in more cases we should probably go with the second option, but the last option seems cleanest for now.


[1244/4409] Building CXX object Source...bindings/js/JSHTMLDocumentCustom.cpp.o
In file included from ../../Source/WTF/wtf/StdLibExtras.h:33:0,
                 from ../../Source/WTF/wtf/FastMalloc.h:26,
                 from ../../Source/WebCore/config.h:75,
                 from ../../Source/WebCore/bindings/js/JSHTMLDocumentCustom.cpp:26:
../../Source/WebCore/bindings/js/JSHTMLDocumentCustom.cpp: In static member function ‘static bool WebCore::JSHTMLDocument::getOwnPropertySlot(JSC::JSObject*, JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&amp;)’:
../../Source/WTF/wtf/Assertions.h:283:20: warning: the compiler can assume that the address of ‘thisObject’ will always evaluate to ‘true’ [-Waddress]
     if (!(assertion)) { \
                    ^
../../Source/WTF/wtf/Assertions.h:437:35: note: in expansion of macro ‘ASSERT’
 #define RELEASE_ASSERT(assertion) ASSERT(assertion)
                                   ^~~~~~
../../Source/JavaScriptCore/heap/GCAssertions.h:34:5: note: in expansion of macro ‘RELEASE_ASSERT’
     RELEASE_ASSERT(cell);\
     ^~~~~~~~~~~~~~
../../Source/JavaScriptCore/heap/GCAssertions.h:39:5: note: in expansion of macro ‘ASSERT_GC_OBJECT_LOOKS_VALID’
     ASSERT_GC_OBJECT_LOOKS_VALID(object); \
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../Source/WebCore/bindings/js/JSHTMLDocumentCustom.cpp:58:5: note: in expansion of macro ‘ASSERT_GC_OBJECT_INHERITS’
     ASSERT_GC_OBJECT_INHERITS((&amp;thisObject), info());
     ^
../../Source/WTF/wtf/Assertions.h:283:20: warning: the compiler can assume that the address of ‘thisObject’ will always evaluate to ‘true’ [-Waddress]
     if (!(assertion)) { \
                    ^
../../Source/WTF/wtf/Assertions.h:437:35: note: in expansion of macro ‘ASSERT’
 #define RELEASE_ASSERT(assertion) ASSERT(assertion)
                                   ^~~~~~
../../Source/JavaScriptCore/heap/GCAssertions.h:34:5: note: in expansion of macro ‘RELEASE_ASSERT’
     RELEASE_ASSERT(cell);\
     ^~~~~~~~~~~~~~
../../Source/JavaScriptCore/heap/GCAssertions.h:39:5: note: in expansion of macro ‘ASSERT_GC_OBJECT_LOOKS_VALID’
     ASSERT_GC_OBJECT_LOOKS_VALID(object); \
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../Source/WebCore/bindings/js/JSHTMLDocumentCustom.cpp:58:5: note: in expansion of macro ‘ASSERT_GC_OBJECT_INHERITS’
     ASSERT_GC_OBJECT_INHERITS((&amp;thisObject), info());
     ^</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1260920</commentid>
    <comment_count>1</comment_count>
      <attachid>297404</attachid>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2016-12-17 07:00:01 -0800</bug_when>
    <thetext>Created attachment 297404
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1260930</commentid>
    <comment_count>2</comment_count>
      <attachid>297404</attachid>
    <who name="Mark Lam">mark.lam</who>
    <bug_when>2016-12-17 08:45:53 -0800</bug_when>
    <thetext>Comment on attachment 297404
Patch

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

r=me

&gt; Source/WebCore/ChangeLog:3
&gt; +        warning: the compiler can assume that the address of âthisObjectâ will always evaluate to âtrueâ [-Waddress] in WebCore::JSHTMLDocument::getOwnPropertySlot

please fix non-ascii chars.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1260940</commentid>
    <comment_count>3</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2016-12-17 10:14:12 -0800</bug_when>
    <thetext>Committed r209965: &lt;http://trac.webkit.org/changeset/209965&gt;</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>297404</attachid>
            <date>2016-12-17 07:00:01 -0800</date>
            <delta_ts>2016-12-17 08:45:53 -0800</delta_ts>
            <desc>Patch</desc>
            <filename>bug-165987-20161217085905.patch</filename>
            <type>text/plain</type>
            <size>1912</size>
            <attacher name="Michael Catanzaro">mcatanzaro</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMjA5OTU2CmRpZmYgLS1naXQgYS9Tb3VyY2UvV2ViQ29yZS9D
aGFuZ2VMb2cgYi9Tb3VyY2UvV2ViQ29yZS9DaGFuZ2VMb2cKaW5kZXggMWQwYWY4ZmU0ZWM1ODQy
ZjMwODgxMjY2NGEwMDE0NjdiN2M0MzVmMC4uYjQ0NGIwNTFmNWUxNzE0ODZhMmE3Mzg3ZjE4NmE0
YTc5MDY3M2Y2ZSAxMDA2NDQKLS0tIGEvU291cmNlL1dlYkNvcmUvQ2hhbmdlTG9nCisrKyBiL1Nv
dXJjZS9XZWJDb3JlL0NoYW5nZUxvZwpAQCAtMSwzICsxLDE3IEBACisyMDE2LTEyLTE3ICBNaWNo
YWVsIENhdGFuemFybyAgPG1jYXRhbnphcm9AaWdhbGlhLmNvbT4KKworICAgICAgICB3YXJuaW5n
OiB0aGUgY29tcGlsZXIgY2FuIGFzc3VtZSB0aGF0IHRoZSBhZGRyZXNzIG9mIOKAmHRoaXNPYmpl
Y3TigJkgd2lsbCBhbHdheXMgZXZhbHVhdGUgdG8g4oCYdHJ1ZeKAmSBbLVdhZGRyZXNzXSBpbiBX
ZWJDb3JlOjpKU0hUTUxEb2N1bWVudDo6Z2V0T3duUHJvcGVydHlTbG90CisgICAgICAgIGh0dHBz
Oi8vYnVncy53ZWJraXQub3JnL3Nob3dfYnVnLmNnaT9pZD0xNjU5ODcKKworICAgICAgICBSZXZp
ZXdlZCBieSBOT0JPRFkgKE9PUFMhKS4KKworICAgICAgICBXb3JrIGFyb3VuZCB0aGUgd2Fybmlu
ZyBieSBwYXNzaW5nIHRoZSBKU09i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HVlIHRvSlMoRXhlY1N0YXRlKiBzdGF0ZSwgSlNET01HbG9iYWxPYmplY3QqIGdsb2Jh
bE9iamVjdCwgSFRNTERvY3VtZW50JiBkbwogYm9vbCBKU0hUTUxEb2N1bWVudDo6Z2V0T3duUHJv
cGVydHlTbG90KEpTT2JqZWN0KiBvYmplY3QsIEV4ZWNTdGF0ZSogc3RhdGUsIFByb3BlcnR5TmFt
ZSBwcm9wZXJ0eU5hbWUsIFByb3BlcnR5U2xvdCYgc2xvdCkKIHsKICAgICBhdXRvJiB0aGlzT2Jq
ZWN0ID0gKmpzQ2FzdDxKU0hUTUxEb2N1bWVudCo+KG9iamVjdCk7Ci0gICAgQVNTRVJUX0dDX09C
SkVDVF9JTkhFUklUUygoJnRoaXNPYmplY3QpLCBpbmZvKCkpOworICAgIEFTU0VSVF9HQ19PQkpF
Q1RfSU5IRVJJVFMob2JqZWN0LCBpbmZvKCkpOwogCiAgICAgaWYgKHByb3BlcnR5TmFtZSA9PSAi
b3BlbiIpIHsKICAgICAgICAgaWYgKEJhc2U6OmdldE93blByb3BlcnR5U2xvdCgmdGhpc09iamVj
dCwgc3RhdGUsIHByb3BlcnR5TmFtZSwgc2xvdCkpCg==
</data>
<flag name="review"
          id="319719"
          type_id="1"
          status="+"
          setter="mark.lam"
    />
          </attachment>
      

    </bug>

</bugzilla>