[haiku-commits] haiku: hrev54955 - src/kits/locale

  • From: Adrien Destugues <pulkomandy@xxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Fri, 12 Feb 2021 07:35:07 +0000 (UTC)

hrev54955 adds 1 changeset to branch 'master'
old head: 1403313c7fab3f265ed48b14f18a82f08aaeca78
new head: 6e1e87a3c3f96fc9e1f5637a6309e5691f5cae12
overview: 
https://git.haiku-os.org/haiku/log/?qt=range&q=6e1e87a3c3f9+%5E1403313c7fab

----------------------------------------------------------------------------

6e1e87a3c3f9: Locale Kit: do not unload catalog add-ons
  
  Follow-up to #16670.
  
  I have previously changed the locale kit to load all add-ons once at
  start, but did not notice that it would unload them later on. This can
  also create race conditions if the locale kit is used from inside
  load_add_on (as is the case in translation kit add-ons for example).
  
  Should fix the remaining problems in #16670
  
  Change-Id: I0e22f8e146abe4fc85d8357ebe178db948fec1cd
  Reviewed-on: https://review.haiku-os.org/c/haiku/+/3734
  Reviewed-by: Adrien Destugues <pulkomandy@xxxxxxxxx>

                             [ Adrien Destugues <pulkomandy@xxxxxxxxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev54955
Commit:      6e1e87a3c3f96fc9e1f5637a6309e5691f5cae12
URL:         https://git.haiku-os.org/haiku/commit/?id=6e1e87a3c3f9
Author:      Adrien Destugues <pulkomandy@xxxxxxxxxxxxx>
Date:        Sat Feb  6 11:48:32 2021 UTC
Committer:   Adrien Destugues <pulkomandy@xxxxxxxxx>
Commit-Date: Fri Feb 12 07:35:05 2021 UTC

Ticket:      https://dev.haiku-os.org/ticket/16670

----------------------------------------------------------------------------

1 file changed, 4 deletions(-)
src/kits/locale/MutableLocaleRoster.cpp | 4 ----

----------------------------------------------------------------------------

diff --git a/src/kits/locale/MutableLocaleRoster.cpp 
b/src/kits/locale/MutableLocaleRoster.cpp
index f5d42f0e44..30a753db9d 100644
--- a/src/kits/locale/MutableLocaleRoster.cpp
+++ b/src/kits/locale/MutableLocaleRoster.cpp
@@ -156,7 +156,6 @@ MutableLocaleRoster::CreateCatalog(const char* type, const 
char* signature,
                BCatalogData* catalog = info->fCreateFunc(signature, language);
                if (catalog != NULL) {
                        info->fLoadedCatalogs.AddItem(catalog);
-                       info->UnloadIfPossible();
                        return catalog;
                }
        }
@@ -234,7 +233,6 @@ MutableLocaleRoster::LoadCatalog(const entry_ref& 
catalogOwner,
                        if (catalog != NULL)
                                return catalog;
                }
-               info->UnloadIfPossible();
        }
 
        return NULL;
@@ -347,7 +345,6 @@ MutableLocaleRoster::LoadCatalog(const char* signature,
 /*
  * unloads the given catalog (or rather: catalog-chain).
  * Every single catalog of the chain will be deleted automatically.
- * Add-ons that have no more current catalogs are unloaded, too.
  */
 status_t
 MutableLocaleRoster::UnloadCatalog(BCatalogData* catalog)
@@ -371,7 +368,6 @@ MutableLocaleRoster::UnloadCatalog(BCatalogData* catalog)
                        if (info->fLoadedCatalogs.HasItem(catalog)) {
                                info->fLoadedCatalogs.RemoveItem(catalog);
                                delete catalog;
-                               info->UnloadIfPossible();
                                res = B_OK;
                                break;
                        }


Other related posts:

  • » [haiku-commits] haiku: hrev54955 - src/kits/locale - Adrien Destugues