Changeset 209965 in webkit


Ignore:
Timestamp:
Dec 17, 2016 10:13:32 AM (7 years ago)
Author:
Michael Catanzaro
Message:

warning: the compiler can assume that the address of 'thisObject' will always evaluate to 'true' [-Waddress] in WebCore::JSHTMLDocument::getOwnPropertySlot
https://bugs.webkit.org/show_bug.cgi?id=165987

Reviewed by Mark Lam.

Work around the warning by passing the JSObject pointer this function receives directly to
ASSERT_GC_OBJECT_INHERITS, instead of casting it to a reference and then taking the address
of that, to avoid the -Waddress warning.

  • bindings/js/JSHTMLDocumentCustom.cpp:

(WebCore::JSHTMLDocument::getOwnPropertySlot):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r209964 r209965  
     12016-12-17  Michael Catanzaro  <mcatanzaro@igalia.com>
     2
     3        warning: the compiler can assume that the address of 'thisObject' will always evaluate to 'true' [-Waddress] in WebCore::JSHTMLDocument::getOwnPropertySlot
     4        https://bugs.webkit.org/show_bug.cgi?id=165987
     5
     6        Reviewed by Mark Lam.
     7
     8        Work around the warning by passing the JSObject pointer this function receives directly to
     9        ASSERT_GC_OBJECT_INHERITS, instead of casting it to a reference and then taking the address
     10        of that, to avoid the -Waddress warning.
     11
     12        * bindings/js/JSHTMLDocumentCustom.cpp:
     13        (WebCore::JSHTMLDocument::getOwnPropertySlot):
     14
    1152016-12-17  Jer Noble  <jer.noble@apple.com>
    216
  • trunk/Source/WebCore/bindings/js/JSHTMLDocumentCustom.cpp

    r209129 r209965  
    5656{
    5757    auto& thisObject = *jsCast<JSHTMLDocument*>(object);
    58     ASSERT_GC_OBJECT_INHERITS((&thisObject), info());
     58    ASSERT_GC_OBJECT_INHERITS(object, info());
    5959
    6060    if (propertyName == "open") {
Note: See TracChangeset for help on using the changeset viewer.