Changeset 256420 in webkit


Ignore:
Timestamp:
Feb 11, 2020 5:59:28 PM (4 years ago)
Author:
Fujii Hironori
Message:

Fix declarations marked by wrong export macros (WEBCORE_EXPORT and WTF_EXPORT)
https://bugs.webkit.org/show_bug.cgi?id=207453

Reviewed by Ross Kirsling.

Source/WebCore:

No new tests because there is no behavior change.

  • rendering/RenderTheme.h:
  • testing/MockContentFilterSettings.h:
  • testing/MockGamepadProvider.h:

Source/WebKit:

  • UIProcess/RemoteLayerTree/mac/ScrollingTreeFrameScrollingNodeRemoteMac.h:
  • UIProcess/RemoteLayerTree/mac/ScrollingTreeOverflowScrollingNodeRemoteMac.h:

Source/WebKitLegacy:

  • Storage/InProcessIDBServer.h:

Source/WebKitLegacy/win:

  • Plugins/PluginMainThreadScheduler.h:

Source/WTF:

Export macros are prone to be misused because thier definitions
are identical for POSIX ports. They can be used interchangeably on
such ports.

WTF should use WTF_EXPORT_PRIVATE instead of WTF_EXPORT.

  • wtf/HexNumber.h:
  • wtf/Language.h:
  • wtf/Logger.h:
  • wtf/ProcessPrivilege.h:
  • wtf/cocoa/CrashReporter.h:
  • wtf/cocoa/Entitlements.h:
  • wtf/text/LineEnding.h:
  • wtf/text/TextBreakIterator.h:
  • wtf/text/icu/UTextProviderLatin1.h:

Replaced WTF_EXPORT with WTF_EXPORT_PRIVATE.

Location:
trunk/Source
Files:
21 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WTF/ChangeLog

    r256353 r256420  
     12020-02-11  Fujii Hironori  <Hironori.Fujii@sony.com>
     2
     3        Fix declarations marked by wrong export macros (WEBCORE_EXPORT and WTF_EXPORT)
     4        https://bugs.webkit.org/show_bug.cgi?id=207453
     5
     6        Reviewed by Ross Kirsling.
     7
     8        Export macros are prone to be misused because thier definitions
     9        are identical for POSIX ports. They can be used interchangeably on
     10        such ports.
     11
     12        WTF should use WTF_EXPORT_PRIVATE instead of WTF_EXPORT.
     13
     14        * wtf/HexNumber.h:
     15        * wtf/Language.h:
     16        * wtf/Logger.h:
     17        * wtf/ProcessPrivilege.h:
     18        * wtf/cocoa/CrashReporter.h:
     19        * wtf/cocoa/Entitlements.h:
     20        * wtf/text/LineEnding.h:
     21        * wtf/text/TextBreakIterator.h:
     22        * wtf/text/icu/UTextProviderLatin1.h:
     23        Replaced WTF_EXPORT with WTF_EXPORT_PRIVATE.
     24
    1252020-02-11  Eric Carlson  <eric.carlson@apple.com>
    226
  • trunk/Source/WTF/wtf/HexNumber.h

    r254046 r256420  
    3838}
    3939
    40 WTF_EXPORT std::pair<LChar*, unsigned> appendHex(LChar* buffer, unsigned bufferSize, std::uintmax_t number, unsigned minimumDigits, HexConversionMode);
     40WTF_EXPORT_PRIVATE std::pair<LChar*, unsigned> appendHex(LChar* buffer, unsigned bufferSize, std::uintmax_t number, unsigned minimumDigits, HexConversionMode);
    4141
    4242template<size_t arraySize, typename NumberType>
  • trunk/Source/WTF/wtf/Language.h

    r254389 r256420  
    3636namespace WTF {
    3737
    38 WTF_EXPORT String defaultLanguage(); // Thread-safe.
    39 WTF_EXPORT Vector<String> userPreferredLanguages(); // Thread-safe, returns BCP 47 language tags.
    40 WTF_EXPORT Vector<String> userPreferredLanguagesOverride();
    41 WTF_EXPORT void overrideUserPreferredLanguages(const Vector<String>&);
    42 WTF_EXPORT size_t indexOfBestMatchingLanguageInList(const String& language, const Vector<String>& languageList, bool& exactMatch);
    43 WTF_EXPORT Vector<String> platformUserPreferredLanguages();
     38WTF_EXPORT_PRIVATE String defaultLanguage(); // Thread-safe.
     39WTF_EXPORT_PRIVATE Vector<String> userPreferredLanguages(); // Thread-safe, returns BCP 47 language tags.
     40WTF_EXPORT_PRIVATE Vector<String> userPreferredLanguagesOverride();
     41WTF_EXPORT_PRIVATE void overrideUserPreferredLanguages(const Vector<String>&);
     42WTF_EXPORT_PRIVATE size_t indexOfBestMatchingLanguageInList(const String& language, const Vector<String>& languageList, bool& exactMatch);
     43WTF_EXPORT_PRIVATE Vector<String> platformUserPreferredLanguages();
    4444// Called from platform specific code when the user's preferred language(s) change.
    4545void languageDidChange();
     
    4747// The observer function will be called when system language changes.
    4848typedef void (*LanguageChangeObserverFunction)(void* context);
    49 WTF_EXPORT void addLanguageChangeObserver(void* context, LanguageChangeObserverFunction);
    50 WTF_EXPORT void removeLanguageChangeObserver(void* context);
    51 WTF_EXPORT String displayNameForLanguageLocale(const String&);
     49WTF_EXPORT_PRIVATE void addLanguageChangeObserver(void* context, LanguageChangeObserverFunction);
     50WTF_EXPORT_PRIVATE void removeLanguageChangeObserver(void* context);
     51WTF_EXPORT_PRIVATE String displayNameForLanguageLocale(const String&);
    5252
    5353#if PLATFORM(COCOA)
  • trunk/Source/WTF/wtf/Logger.h

    r254514 r256420  
    211211        }
    212212
    213         WTF_EXPORT String toString() const;
     213        WTF_EXPORT_PRIVATE String toString() const;
    214214
    215215        const char* className { nullptr };
     
    282282};
    283283template<> struct LogArgument<const void*> {
    284     WTF_EXPORT static String toString(const void*);
     284    WTF_EXPORT_PRIVATE static String toString(const void*);
    285285};
    286286
  • trunk/Source/WTF/wtf/ProcessPrivilege.h

    r229978 r256420  
    3636};
    3737
    38 WTF_EXPORT void setProcessPrivileges(OptionSet<ProcessPrivilege>);
    39 WTF_EXPORT void addProcessPrivilege(ProcessPrivilege);
    40 WTF_EXPORT void removeProcessPrivilege(ProcessPrivilege);
    41 WTF_EXPORT bool hasProcessPrivilege(ProcessPrivilege);
    42 WTF_EXPORT OptionSet<ProcessPrivilege> allPrivileges();
     38WTF_EXPORT_PRIVATE void setProcessPrivileges(OptionSet<ProcessPrivilege>);
     39WTF_EXPORT_PRIVATE void addProcessPrivilege(ProcessPrivilege);
     40WTF_EXPORT_PRIVATE void removeProcessPrivilege(ProcessPrivilege);
     41WTF_EXPORT_PRIVATE bool hasProcessPrivilege(ProcessPrivilege);
     42WTF_EXPORT_PRIVATE OptionSet<ProcessPrivilege> allPrivileges();
    4343
    4444} // namespace WTF
  • trunk/Source/WTF/wtf/cocoa/CrashReporter.h

    r252065 r256420  
    2828namespace WTF {
    2929
    30 WTF_EXPORT void setCrashLogMessage(const char*);
     30WTF_EXPORT_PRIVATE void setCrashLogMessage(const char*);
    3131
    3232} // namespace WTF
  • trunk/Source/WTF/wtf/cocoa/Entitlements.h

    r254832 r256420  
    3232namespace WTF {
    3333
    34 WTF_EXPORT bool hasEntitlement(audit_token_t, const char* entitlement);
    35 WTF_EXPORT bool hasEntitlement(xpc_connection_t, const char* entitlement);
    36 WTF_EXPORT bool processHasEntitlement(const char* entitlement);
     34WTF_EXPORT_PRIVATE bool hasEntitlement(audit_token_t, const char* entitlement);
     35WTF_EXPORT_PRIVATE bool hasEntitlement(xpc_connection_t, const char* entitlement);
     36WTF_EXPORT_PRIVATE bool processHasEntitlement(const char* entitlement);
    3737
    3838} // namespace WTF
  • trunk/Source/WTF/wtf/text/LineEnding.h

    r225618 r256420  
    3737
    3838// Normalize all line-endings in the given string.
    39 WTF_EXPORT Vector<uint8_t> normalizeLineEndingsToLF(Vector<uint8_t>&&);
    40 WTF_EXPORT Vector<uint8_t> normalizeLineEndingsToCRLF(Vector<uint8_t>&&);
     39WTF_EXPORT_PRIVATE Vector<uint8_t> normalizeLineEndingsToLF(Vector<uint8_t>&&);
     40WTF_EXPORT_PRIVATE Vector<uint8_t> normalizeLineEndingsToCRLF(Vector<uint8_t>&&);
    4141
    4242// Normalize all line-endings to CRLF on Windows, to LF on all other platforms.
    43 WTF_EXPORT Vector<uint8_t> normalizeLineEndingsToNative(Vector<uint8_t>&&);
     43WTF_EXPORT_PRIVATE Vector<uint8_t> normalizeLineEndingsToNative(Vector<uint8_t>&&);
    4444
    4545} // namespace WTF
  • trunk/Source/WTF/wtf/text/TextBreakIterator.h

    r250309 r256420  
    8383
    8484    // Use CachedTextBreakIterator instead of constructing one of these directly.
    85     WTF_EXPORT TextBreakIterator(StringView, Mode, const AtomString& locale);
     85    WTF_EXPORT_PRIVATE TextBreakIterator(StringView, Mode, const AtomString& locale);
    8686
    8787    void setText(StringView string)
  • trunk/Source/WTF/wtf/text/icu/UTextProviderLatin1.h

    r248546 r256420  
    3939};
    4040
    41 WTF_EXPORT UText* openLatin1UTextProvider(UTextWithBuffer* utWithBuffer, const LChar* string, unsigned length, UErrorCode* status);
     41WTF_EXPORT_PRIVATE UText* openLatin1UTextProvider(UTextWithBuffer* utWithBuffer, const LChar* string, unsigned length, UErrorCode* status);
    4242UText* openLatin1ContextAwareUTextProvider(UTextWithBuffer* utWithBuffer, const LChar* string, unsigned length, const UChar* priorContext, int priorContextLength, UErrorCode* status);
    4343
  • trunk/Source/WebCore/ChangeLog

    r256418 r256420  
     12020-02-11  Fujii Hironori  <Hironori.Fujii@sony.com>
     2
     3        Fix declarations marked by wrong export macros (WEBCORE_EXPORT and WTF_EXPORT)
     4        https://bugs.webkit.org/show_bug.cgi?id=207453
     5
     6        Reviewed by Ross Kirsling.
     7
     8        No new tests because there is no behavior change.
     9
     10        * rendering/RenderTheme.h:
     11        * testing/MockContentFilterSettings.h:
     12        * testing/MockGamepadProvider.h:
     13
    1142020-02-11  Brent Fulgham  <bfulgham@apple.com>
    215
  • trunk/Source/WebCore/rendering/RenderTheme.h

    r255457 r256420  
    161161    virtual Color disabledTextColor(const Color& textColor, const Color& backgroundColor) const;
    162162
    163     WTF_EXPORT Color focusRingColor(OptionSet<StyleColor::Options>) const;
     163    WEBCORE_EXPORT Color focusRingColor(OptionSet<StyleColor::Options>) const;
    164164    virtual Color platformFocusRingColor(OptionSet<StyleColor::Options>) const { return Color(0, 0, 0); }
    165165    static void setCustomFocusRingColor(const Color&);
  • trunk/Source/WebCore/testing/MockContentFilterSettings.h

    r219623 r256420  
    4747    };
    4848
    49     WTF_EXPORT_PRIVATE static MockContentFilterSettings& singleton();
     49    WEBCORE_TESTSUPPORT_EXPORT static MockContentFilterSettings& singleton();
    5050    static void reset();
    5151    static const char* unblockURLHost() { return "mock-unblock"; }
     
    5656
    5757    bool enabled() const { return m_enabled; }
    58     WTF_EXPORT_PRIVATE void setEnabled(bool);
     58    WEBCORE_TESTSUPPORT_EXPORT void setEnabled(bool);
    5959
    6060    const String& blockedString() const { return m_blockedString; }
  • trunk/Source/WebCore/testing/MockGamepadProvider.h

    r256215 r256420  
    3838    friend class NeverDestroyed<MockGamepadProvider>;
    3939public:
    40     WEBCORE_EXPORT static MockGamepadProvider& singleton();
     40    WEBCORE_TESTSUPPORT_EXPORT static MockGamepadProvider& singleton();
    4141
    42     WEBCORE_EXPORT void startMonitoringGamepads(GamepadProviderClient&) final;
    43     WEBCORE_EXPORT void stopMonitoringGamepads(GamepadProviderClient&) final;
     42    WEBCORE_TESTSUPPORT_EXPORT void startMonitoringGamepads(GamepadProviderClient&) final;
     43    WEBCORE_TESTSUPPORT_EXPORT void stopMonitoringGamepads(GamepadProviderClient&) final;
    4444    const Vector<PlatformGamepad*>& platformGamepads() final { return m_connectedGamepadVector; }
    4545    bool isMockGamepadProvider() const final { return true; }
  • trunk/Source/WebKit/ChangeLog

    r256401 r256420  
     12020-02-11  Fujii Hironori  <Hironori.Fujii@sony.com>
     2
     3        Fix declarations marked by wrong export macros (WEBCORE_EXPORT and WTF_EXPORT)
     4        https://bugs.webkit.org/show_bug.cgi?id=207453
     5
     6        Reviewed by Ross Kirsling.
     7
     8        * UIProcess/RemoteLayerTree/mac/ScrollingTreeFrameScrollingNodeRemoteMac.h:
     9        * UIProcess/RemoteLayerTree/mac/ScrollingTreeOverflowScrollingNodeRemoteMac.h:
     10
    1112020-02-11  Wenson Hsieh  <wenson_hsieh@apple.com>
    212
  • trunk/Source/WebKit/UIProcess/RemoteLayerTree/mac/ScrollingTreeFrameScrollingNodeRemoteMac.h

    r242132 r256420  
    3636class ScrollingTreeFrameScrollingNodeRemoteMac : public WebCore::ScrollingTreeFrameScrollingNodeMac {
    3737public:
    38     WEBCORE_EXPORT static Ref<ScrollingTreeFrameScrollingNodeRemoteMac> create(WebCore::ScrollingTree&, WebCore::ScrollingNodeType, WebCore::ScrollingNodeID);
     38    static Ref<ScrollingTreeFrameScrollingNodeRemoteMac> create(WebCore::ScrollingTree&, WebCore::ScrollingNodeType, WebCore::ScrollingNodeID);
    3939    virtual ~ScrollingTreeFrameScrollingNodeRemoteMac();
    4040
  • trunk/Source/WebKit/UIProcess/RemoteLayerTree/mac/ScrollingTreeOverflowScrollingNodeRemoteMac.h

    r242359 r256420  
    3636class ScrollingTreeOverflowScrollingNodeRemoteMac : public WebCore::ScrollingTreeOverflowScrollingNodeMac {
    3737public:
    38     WEBCORE_EXPORT static Ref<ScrollingTreeOverflowScrollingNodeRemoteMac> create(WebCore::ScrollingTree&, WebCore::ScrollingNodeID);
     38    static Ref<ScrollingTreeOverflowScrollingNodeRemoteMac> create(WebCore::ScrollingTree&, WebCore::ScrollingNodeID);
    3939    virtual ~ScrollingTreeOverflowScrollingNodeRemoteMac();
    4040
  • trunk/Source/WebKitLegacy/ChangeLog

    r256419 r256420  
     12020-02-11  Fujii Hironori  <Hironori.Fujii@sony.com>
     2
     3        Fix declarations marked by wrong export macros (WEBCORE_EXPORT and WTF_EXPORT)
     4        https://bugs.webkit.org/show_bug.cgi?id=207453
     5
     6        Reviewed by Ross Kirsling.
     7
     8        * Storage/InProcessIDBServer.h:
     9
    1102020-02-11  Fujii Hironori  <Hironori.Fujii@sony.com>
    211
  • trunk/Source/WebKitLegacy/Storage/InProcessIDBServer.h

    r253740 r256420  
    5656public:
    5757
    58     WEBCORE_EXPORT static Ref<InProcessIDBServer> create(PAL::SessionID);
    59     WEBCORE_EXPORT static Ref<InProcessIDBServer> create(PAL::SessionID, const String& databaseDirectoryPath);
     58    static Ref<InProcessIDBServer> create(PAL::SessionID);
     59    static Ref<InProcessIDBServer> create(PAL::SessionID, const String& databaseDirectoryPath);
    6060
    61     WEBCORE_EXPORT virtual ~InProcessIDBServer();
     61    virtual ~InProcessIDBServer();
    6262
    6363    WebCore::IDBClient::IDBConnectionToServer& connectionToServer() const;
  • trunk/Source/WebKitLegacy/win/ChangeLog

    r256075 r256420  
     12020-02-11  Fujii Hironori  <Hironori.Fujii@sony.com>
     2
     3        Fix declarations marked by wrong export macros (WEBCORE_EXPORT and WTF_EXPORT)
     4        https://bugs.webkit.org/show_bug.cgi?id=207453
     5
     6        Reviewed by Ross Kirsling.
     7
     8        * Plugins/PluginMainThreadScheduler.h:
     9
    1102020-02-07  Chris Dumez  <cdumez@apple.com>
    211
  • trunk/Source/WebKitLegacy/win/Plugins/PluginMainThreadScheduler.h

    r219858 r256420  
    4242    typedef void MainThreadFunction(void*);
    4343
    44     WEBCORE_EXPORT static PluginMainThreadScheduler& scheduler();
     44    static PluginMainThreadScheduler& scheduler();
    4545
    46     WEBCORE_EXPORT void scheduleCall(NPP, MainThreadFunction*, void* userData);
     46    void scheduleCall(NPP, MainThreadFunction*, void* userData);
    4747
    48     WEBCORE_EXPORT void registerPlugin(NPP);
    49     WEBCORE_EXPORT void unregisterPlugin(NPP);
     48    void registerPlugin(NPP);
     49    void unregisterPlugin(NPP);
    5050
    5151private:
Note: See TracChangeset for help on using the changeset viewer.