Changeset 236099 in webkit


Ignore:
Timestamp:
Sep 17, 2018 7:54:37 PM (6 years ago)
Author:
Fujii Hironori
Message:

[Win][Clang][WebKitLegacy] error: cannot pass object of non-trivial type through variadic function
https://bugs.webkit.org/show_bug.cgi?id=189612

Reviewed by Alex Christensen.

Non-trivial types can't be used as aruguments of LOG_ERROR and
ASSERT_WITH_MESSAGE.

  • DefaultPolicyDelegate.cpp:

(DefaultPolicyDelegate::unableToImplementPolicyWithError): Apply
static_cast<BSTR> to convert BString.

  • WebLocalizableStrings.cpp:

(copyLocalizedStringFromBundle): Convert 'key' from WTF::String to
char* by using 'key.utf8().data()'.

Location:
trunk/Source/WebKitLegacy/win
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKitLegacy/win/ChangeLog

    r235979 r236099  
     12018-09-17  Fujii Hironori  <Hironori.Fujii@sony.com>
     2
     3        [Win][Clang][WebKitLegacy] error: cannot pass object of non-trivial type through variadic function
     4        https://bugs.webkit.org/show_bug.cgi?id=189612
     5
     6        Reviewed by Alex Christensen.
     7
     8        Non-trivial types can't be used as aruguments of LOG_ERROR and
     9        ASSERT_WITH_MESSAGE.
     10
     11        * DefaultPolicyDelegate.cpp:
     12        (DefaultPolicyDelegate::unableToImplementPolicyWithError): Apply
     13        static_cast<BSTR> to convert BString.
     14        * WebLocalizableStrings.cpp:
     15        (copyLocalizedStringFromBundle): Convert 'key' from WTF::String to
     16        char* by using 'key.utf8().data()'.
     17
    1182018-09-13  Ryan Haddad  <ryanhaddad@apple.com>
    219
  • trunk/Source/WebKitLegacy/win/DefaultPolicyDelegate.cpp

    r188662 r236099  
    180180    frame->name(&frameName);
    181181
    182     LOG_ERROR("called unableToImplementPolicyWithError:%S inFrame:%S", errorStr ? errorStr : TEXT(""), frameName ? frameName : TEXT(""));
     182    LOG_ERROR("called unableToImplementPolicyWithError:%S inFrame:%S", errorStr ? static_cast<BSTR>(errorStr) : TEXT(""), frameName ? static_cast<BSTR>(frameName) : TEXT(""));
    183183
    184184    return S_OK;
  • trunk/Source/WebKitLegacy/win/WebLocalizableStrings.cpp

    r230303 r236099  
    162162    CFStringRef result = CFCopyLocalizedStringWithDefaultValue(key.createCFString().get(), 0, bundle, notFound, 0);
    163163
    164     ASSERT_WITH_MESSAGE(result != notFound, "could not find localizable string %s in bundle", key);
     164    ASSERT_WITH_MESSAGE(result != notFound, "could not find localizable string %s in bundle", key.utf8().data());
    165165    return result;
    166166}
Note: See TracChangeset for help on using the changeset viewer.