<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - warning: the compiler can assume that the address of ‘thisObject’ will always evaluate to ‘true’ [-Waddress] in WebCore::JSHTMLDocument::getOwnPropertySlot"
href="https://bugs.webkit.org/show_bug.cgi?id=165987">165987</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>warning: the compiler can assume that the address of ‘thisObject’ will always evaluate to ‘true’ [-Waddress] in WebCore::JSHTMLDocument::getOwnPropertySlot
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr>
<tr>
<th>Product</th>
<td>WebKit
</td>
</tr>
<tr>
<th>Version</th>
<td>WebKit Nightly Build
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>Trivial
</td>
</tr>
<tr>
<th>Priority</th>
<td>P2
</td>
</tr>
<tr>
<th>Component</th>
<td>WebCore JavaScript
</td>
</tr>
<tr>
<th>Assignee</th>
<td>webkit-unassigned@lists.webkit.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>mcatanzaro@igalia.com
</td>
</tr></table>
<p>
<div>
<pre>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't have the null check that triggers the warning, so the behavior is what we want, but it'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&)’:
../../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((&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((&thisObject), info());
^</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>