Bug 217591 - -Wdeprecated-declarations caused by WKTR using WKBundlePostSynchronousMessage
Summary: -Wdeprecated-declarations caused by WKTR using WKBundlePostSynchronousMessage
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: PC Linux
: P2 Normal
Assignee: Michael Catanzaro
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-10-11 15:57 PDT by Michael Catanzaro
Modified: 2020-10-11 19:16 PDT (History)
4 users (show)

See Also:


Attachments
Patch (1.60 KB, patch)
2020-10-11 16:11 PDT, Michael Catanzaro
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Catanzaro 2020-10-11 15:57:04 PDT
Deprecating WKBundlePostSynchronousMessage (r262346) seems great, but now we need to use ALLOW_DEPRECATED_DECLARATIONS_[BEGIN,END] when using it ourselves. (I think GCC didn't previously notice this, because r262346 was several months ago, but I haven't seen it before.)

[2262/2435] Building CXX object Tools/WebKitTestRunner/CM...nerInjectedBundle.dir/InjectedBundle/InjectedBundle.cpp.o
In file included from ../../Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:27:
../../Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.h: In instantiation of ‘void WTR::postSynchronousMessage(const char*, const WebKit::WKRetainPtr<T>&) [with T = const void*]’:
../../Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:914:60:   required from here
../../Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.h:246:35: warning: ‘void WKBundlePostSynchronousMessage(WKBundleRef, WKStringRef, WKTypeRef, const void**)’ is deprecated: No longer supported [-Wdeprecated-declarations]
  246 |     WKBundlePostSynchronousMessage(InjectedBundle::singleton().bundle(), toWK(name).get(), value.get(), nullptr);
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from DerivedSources/ForwardingHeaders/WebKit/WKBundle.h:1,
                 from ../../Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:34:
../../Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundle.h:78:16: note: declared here
   78 | WK_EXPORT void WKBundlePostSynchronousMessage(WKBundleRef bundle, WKStringRef messageName, WKTypeRef messageBody, WKTypeRef* returnRetainedData) WK_C_API_DEPRECATED;
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../../Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:27:
../../Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.h:246:35: warning: ‘void WKBundlePostSynchronousMessage(WKBundleRef, WKStringRef, WKTypeRef, const void**)’ is deprecated: No longer supported [-Wdeprecated-declarations]
  246 |     WKBundlePostSynchronousMessage(InjectedBundle::singleton().bundle(), toWK(name).get(), value.get(), nullptr);
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from DerivedSources/ForwardingHeaders/WebKit/WKBundle.h:1,
                 from ../../Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:34:
../../Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundle.h:78:16: note: declared here
   78 | WK_EXPORT void WKBundlePostSynchronousMessage(WKBundleRef bundle, WKStringRef messageName, WKTypeRef messageBody, WKTypeRef* returnRetainedData) WK_C_API_DEPRECATED;
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../../Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:27:
../../Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.h: In instantiation of ‘void WTR::postSynchronousMessage(const char*, const WebKit::WKRetainPtr<T>&) [with T = const OpaqueWKBoolean*]’:
../../Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:919:65:   required from here
../../Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.h:246:35: warning: ‘void WKBundlePostSynchronousMessage(WKBundleRef, WKStringRef, WKTypeRef, const void**)’ is deprecated: No longer supported [-Wdeprecated-declarations]
  246 |     WKBundlePostSynchronousMessage(InjectedBundle::singleton().bundle(), toWK(name).get(), value.get(), nullptr);
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from DerivedSources/ForwardingHeaders/WebKit/WKBundle.h:1,
                 from ../../Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:34:
../../Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundle.h:78:16: note: declared here
   78 | WK_EXPORT void WKBundlePostSynchronousMessage(WKBundleRef bundle, WKStringRef messageName, WKTypeRef messageBody, WKTypeRef* returnRetainedData) WK_C_API_DEPRECATED;
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../../Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:27:
../../Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.h:246:35: warning: ‘void WKBundlePostSynchronousMessage(WKBundleRef, WKStringRef, WKTypeRef, const void**)’ is deprecated: No longer supported [-Wdeprecated-declarations]
  246 |     WKBundlePostSynchronousMessage(InjectedBundle::singleton().bundle(), toWK(name).get(), value.get(), nullptr);
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from DerivedSources/ForwardingHeaders/WebKit/WKBundle.h:1,
                 from ../../Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:34:
../../Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundle.h:78:16: note: declared here
   78 | WK_EXPORT void WKBundlePostSynchronousMessage(WKBundleRef bundle, WKStringRef messageName, WKTypeRef messageBody, WKTypeRef* returnRetainedData) WK_C_API_DEPRECATED;
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../../Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:27:
../../Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.h: In instantiation of ‘void WTR::postSynchronousMessage(const char*, const WebKit::WKRetainPtr<T>&) [with T = const OpaqueWKUInt64*]’:
../../Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:924:64:   required from here
../../Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.h:246:35: warning: ‘void WKBundlePostSynchronousMessage(WKBundleRef, WKStringRef, WKTypeRef, const void**)’ is deprecated: No longer supported [-Wdeprecated-declarations]
  246 |     WKBundlePostSynchronousMessage(InjectedBundle::singleton().bundle(), toWK(name).get(), value.get(), nullptr);
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from DerivedSources/ForwardingHeaders/WebKit/WKBundle.h:1,
                 from ../../Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:34:
../../Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundle.h:78:16: note: declared here
   78 | WK_EXPORT void WKBundlePostSynchronousMessage(WKBundleRef bundle, WKStringRef messageName, WKTypeRef messageBody, WKTypeRef* returnRetainedData) WK_C_API_DEPRECATED;
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../../Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:27:
../../Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.h:246:35: warning: ‘void WKBundlePostSynchronousMessage(WKBundleRef, WKStringRef, WKTypeRef, const void**)’ is deprecated: No longer supported [-Wdeprecated-declarations]
  246 |     WKBundlePostSynchronousMessage(InjectedBundle::singleton().bundle(), toWK(name).get(), value.get(), nullptr);
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from DerivedSources/ForwardingHeaders/WebKit/WKBundle.h:1,
                 from ../../Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:34:
../../Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundle.h:78:16: note: declared here
   78 | WK_EXPORT void WKBundlePostSynchronousMessage(WKBundleRef bundle, WKStringRef messageName, WKTypeRef messageBody, WKTypeRef* returnRetainedData) WK_C_API_DEPRECATED;
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../../Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:27:
../../Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.h: In instantiation of ‘void WTR::postSynchronousMessage(const char*, const WebKit::WKRetainPtr<T>&) [with T = const OpaqueWKDouble*]’:
../../Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:935:64:   required from here
../../Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.h:246:35: warning: ‘void WKBundlePostSynchronousMessage(WKBundleRef, WKStringRef, WKTypeRef, const void**)’ is deprecated: No longer supported [-Wdeprecated-declarations]
  246 |     WKBundlePostSynchronousMessage(InjectedBundle::singleton().bundle(), toWK(name).get(), value.get(), nullptr);
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from DerivedSources/ForwardingHeaders/WebKit/WKBundle.h:1,
                 from ../../Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:34:
../../Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundle.h:78:16: note: declared here
   78 | WK_EXPORT void WKBundlePostSynchronousMessage(WKBundleRef bundle, WKStringRef messageName, WKTypeRef messageBody, WKTypeRef* returnRetainedData) WK_C_API_DEPRECATED;
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../../Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:27:
../../Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.h:246:35: warning: ‘void WKBundlePostSynchronousMessage(WKBundleRef, WKStringRef, WKTypeRef, const void**)’ is deprecated: No longer supported [-Wdeprecated-declarations]
  246 |     WKBundlePostSynchronousMessage(InjectedBundle::singleton().bundle(), toWK(name).get(), value.get(), nullptr);
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from DerivedSources/ForwardingHeaders/WebKit/WKBundle.h:1,
                 from ../../Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:34:
../../Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundle.h:78:16: note: declared here
   78 | WK_EXPORT void WKBundlePostSynchronousMessage(WKBundleRef bundle, WKStringRef messageName, WKTypeRef messageBody, WKTypeRef* returnRetainedData) WK_C_API_DEPRECATED;
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[2264/2435] Building CXX object Tools/WebKitTestRunner/CM...tRunnerInjectedBundle.dir/InjectedBundle/TestRunner.cpp.o
In file included from ../../Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp:30:
../../Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.h: In instantiation of ‘void WTR::postSynchronousMessage(const char*, const WebKit::WKRetainPtr<T>&) [with T = const OpaqueWKString*]’:
../../Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp:465:65:   required from here
../../Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.h:246:35: warning: ‘void WKBundlePostSynchronousMessage(WKBundleRef, WKStringRef, WKTypeRef, const void**)’ is deprecated: No longer supported [-Wdeprecated-declarations]
  246 |     WKBundlePostSynchronousMessage(InjectedBundle::singleton().bundle(), toWK(name).get(), value.get(), nullptr);
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from DerivedSources/ForwardingHeaders/WebKit/WKBundle.h:1,
                 from ../../Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp:38:
../../Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundle.h:78:16: note: declared here
   78 | WK_EXPORT void WKBundlePostSynchronousMessage(WKBundleRef bundle, WKStringRef messageName, WKTypeRef messageBody, WKTypeRef* returnRetainedData) WK_C_API_DEPRECATED;
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../../Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp:30:
../../Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.h:246:35: warning: ‘void WKBundlePostSynchronousMessage(WKBundleRef, WKStringRef, WKTypeRef, const void**)’ is deprecated: No longer supported [-Wdeprecated-declarations]
  246 |     WKBundlePostSynchronousMessage(InjectedBundle::singleton().bundle(), toWK(name).get(), value.get(), nullptr);
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from DerivedSources/ForwardingHeaders/WebKit/WKBundle.h:1,
                 from ../../Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp:38:
../../Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundle.h:78:16: note: declared here
   78 | WK_EXPORT void WKBundlePostSynchronousMessage(WKBundleRef bundle, WKStringRef messageName, WKTypeRef messageBody, WKTypeRef* returnRetainedData) WK_C_API_DEPRECATED;
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../../Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp:30:
../../Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.h: In instantiation of ‘void WTR::postSynchronousMessage(const char*, const WebKit::WKRetainPtr<T>&) [with T = const OpaqueWKDictionary*]’:
../../Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp:1457:7:   required from here
../../Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.h:246:35: warning: ‘void WKBundlePostSynchronousMessage(WKBundleRef, WKStringRef, WKTypeRef, const void**)’ is deprecated: No longer supported [-Wdeprecated-declarations]
  246 |     WKBundlePostSynchronousMessage(InjectedBundle::singleton().bundle(), toWK(name).get(), value.get(), nullptr);
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from DerivedSources/ForwardingHeaders/WebKit/WKBundle.h:1,
                 from ../../Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp:38:
../../Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundle.h:78:16: note: declared here
   78 | WK_EXPORT void WKBundlePostSynchronousMessage(WKBundleRef bundle, WKStringRef messageName, WKTypeRef messageBody, WKTypeRef* returnRetainedData) WK_C_API_DEPRECATED;
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../../Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp:30:
../../Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.h:246:35: warning: ‘void WKBundlePostSynchronousMessage(WKBundleRef, WKStringRef, WKTypeRef, const void**)’ is deprecated: No longer supported [-Wdeprecated-declarations]
  246 |     WKBundlePostSynchronousMessage(InjectedBundle::singleton().bundle(), toWK(name).get(), value.get(), nullptr);
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from DerivedSources/ForwardingHeaders/WebKit/WKBundle.h:1,
                 from ../../Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp:38:
../../Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundle.h:78:16: note: declared here
   78 | WK_EXPORT void WKBundlePostSynchronousMessage(WKBundleRef bundle, WKStringRef messageName, WKTypeRef messageBody, WKTypeRef* returnRetainedData) WK_C_API_DEPRECATED;
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Comment 1 Michael Catanzaro 2020-10-11 16:11:17 PDT
Created attachment 411075 [details]
Patch
Comment 2 Darin Adler 2020-10-11 19:14:24 PDT
I wonder if we can find a way to avoid the need for it; when I refactored WebKitTestRunner I saw an eclectic mix of synchronous and non-synchronous messages.

Also surprised the same failure is happening so many times.
Comment 3 EWS 2020-10-11 19:15:28 PDT
Committed r268337: <https://trac.webkit.org/changeset/268337>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 411075 [details].
Comment 4 Radar WebKit Bug Importer 2020-10-11 19:16:18 PDT
<rdar://problem/70190046>