Changeset 161915 in webkit


Ignore:
Timestamp:
Jan 13, 2014 4:02:55 PM (10 years ago)
Author:
jinwoo7.song@samsung.com
Message:

[EFL][WK2] Replace usage of DEFINE_STATIC_LOCAL with NeverDestroyed
https://bugs.webkit.org/show_bug.cgi?id=126882

Reviewed by Gyuyoung Kim.

  • Shared/efl/ProcessExecutablePathEfl.cpp:

(WebKit::executablePathOfWebProcess):
(WebKit::executablePathOfPluginProcess):
(WebKit::executablePathOfNetworkProcess):

  • UIProcess/API/efl/EwkView.cpp:

(wkPageToEvasObjectMap):

  • UIProcess/API/efl/ewk_context.cpp:

(contextMap):

  • UIProcess/API/efl/ewk_page_group.cpp:

(pageGroupMap):

  • UIProcess/efl/TextCheckerClientEfl.cpp:

(TextCheckerClientEfl::instance):

  • UIProcess/efl/TextCheckerClientEfl.h:
Location:
trunk/Source/WebKit2
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r161890 r161915  
     12014-01-13  Jinwoo Song  <jinwoo7.song@samsung.com>
     2
     3        [EFL][WK2] Replace usage of DEFINE_STATIC_LOCAL with NeverDestroyed
     4        https://bugs.webkit.org/show_bug.cgi?id=126882
     5
     6        Reviewed by Gyuyoung Kim.
     7
     8        * Shared/efl/ProcessExecutablePathEfl.cpp:
     9        (WebKit::executablePathOfWebProcess):
     10        (WebKit::executablePathOfPluginProcess):
     11        (WebKit::executablePathOfNetworkProcess):
     12        * UIProcess/API/efl/EwkView.cpp:
     13        (wkPageToEvasObjectMap):
     14        * UIProcess/API/efl/ewk_context.cpp:
     15        (contextMap):
     16        * UIProcess/API/efl/ewk_page_group.cpp:
     17        (pageGroupMap):
     18        * UIProcess/efl/TextCheckerClientEfl.cpp:
     19        (TextCheckerClientEfl::instance):
     20        * UIProcess/efl/TextCheckerClientEfl.h:
     21
    1222014-01-13  Carlos Garcia Campos  <cgarcia@igalia.com>
    223
  • trunk/Source/WebKit2/Shared/efl/ProcessExecutablePathEfl.cpp

    r161857 r161915  
    3030#include <libgen.h>
    3131#include <unistd.h>
     32#include <wtf/NeverDestroyed.h>
    3233#include <wtf/StdLibExtras.h>
    3334#include <wtf/text/CString.h>
     
    6970String executablePathOfWebProcess()
    7071{
    71     DEFINE_STATIC_LOCAL(const String, webKitWebProcessName, (findProcessPath(WEBPROCESSNAME)));
     72    static NeverDestroyed<const String> webKitWebProcessName(findProcessPath(WEBPROCESSNAME));
    7273
    7374    return webKitWebProcessName;
     
    7677String executablePathOfPluginProcess()
    7778{
    78     DEFINE_STATIC_LOCAL(const String, webKitPluginProcessName, (findProcessPath(PLUGINPROCESSNAME)));
     79    static NeverDestroyed<const String> webKitPluginProcessName(findProcessPath(PLUGINPROCESSNAME));
    7980
    8081    return webKitPluginProcessName;
     
    8485String executablePathOfNetworkProcess()
    8586{
    86     DEFINE_STATIC_LOCAL(const String, webKitNetworkProcessName, (findProcessPath(NETWORKPROCESSNAME)));
     87    static NeverDestroyed<const String> webKitNetworkProcessName(findProcessPath(NETWORKPROCESSNAME));
    8788
    8889    return webKitNetworkProcessName;
  • trunk/Source/WebKit2/UIProcess/API/efl/EwkView.cpp

    r161758 r161915  
    7777#include <WebKit2/WKImageCairo.h>
    7878#include <wtf/MathExtras.h>
     79#include <wtf/NeverDestroyed.h>
    7980#include <wtf/StdLibExtras.h>
    8081
     
    245246static inline WKPageToEvasObjectMap& wkPageToEvasObjectMap()
    246247{
    247     DEFINE_STATIC_LOCAL(WKPageToEvasObjectMap, map, ());
     248    static NeverDestroyed<WKPageToEvasObjectMap> map;
    248249    return map;
    249250}
  • trunk/Source/WebKit2/UIProcess/API/efl/ewk_context.cpp

    r161758 r161915  
    4444#include <WebCore/IconDatabase.h>
    4545#include <wtf/HashMap.h>
     46#include <wtf/NeverDestroyed.h>
    4647#include <wtf/text/WTFString.h>
    4748
     
    5758static inline ContextMap& contextMap()
    5859{
    59     DEFINE_STATIC_LOCAL(ContextMap, map, ());
     60    static NeverDestroyed<ContextMap> map;
    6061    return map;
    6162}
  • trunk/Source/WebKit2/UIProcess/API/efl/ewk_page_group.cpp

    r161254 r161915  
    3333#include "WKString.h"
    3434#include "ewk_page_group_private.h"
     35#include <wtf/NeverDestroyed.h>
    3536
    3637using namespace WebKit;
     
    4041static inline PageGroupMap& pageGroupMap()
    4142{
    42     DEFINE_STATIC_LOCAL(PageGroupMap, map, ());
     43    static NeverDestroyed<PageGroupMap> map;
    4344    return map;
    4445}
  • trunk/Source/WebKit2/UIProcess/efl/TextCheckerClientEfl.cpp

    r160128 r161915  
    4040#include "ewk_text_checker_private.h"
    4141#include <Eina.h>
     42#include <wtf/NeverDestroyed.h>
    4243
    4344using namespace WebCore;
     
    8384TextCheckerClientEfl& TextCheckerClientEfl::instance()
    8485{
    85     DEFINE_STATIC_LOCAL(TextCheckerClientEfl, textCheckerClient, ());
     86    static NeverDestroyed<TextCheckerClientEfl> textCheckerClient;
    8687    return textCheckerClient;
    8788}
  • trunk/Source/WebKit2/UIProcess/efl/TextCheckerClientEfl.h

    r148670 r161915  
    3939public:
    4040    static TextCheckerClientEfl& instance();
     41    friend class NeverDestroyed<TextCheckerClientEfl>;
    4142
    4243    // Can be set by ewk APIs, by default they are 0.
Note: See TracChangeset for help on using the changeset viewer.