Changeset 130062 in webkit


Ignore:
Timestamp:
Oct 1, 2012, 12:07:57 PM (13 years ago)
Author:
jochen@chromium.org
Message:

[chromium] ASSERT that the embedder has set a default locale
https://bugs.webkit.org/show_bug.cgi?id=98001

Reviewed by Adam Barth.

The callsites assume that the default language is always defined, e.g.
Document::getCachedLocalizer. Add an ASSERT() statement so an embedder
doesn't have to guess what they did wrong.

  • platform/chromium/LanguageChromium.cpp:

(WebCore::platformLanguage):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r130061 r130062  
     12012-10-01  Jochen Eisinger  <jochen@chromium.org>
     2
     3        [chromium] ASSERT that the embedder has set a default locale
     4        https://bugs.webkit.org/show_bug.cgi?id=98001
     5
     6        Reviewed by Adam Barth.
     7
     8        The callsites assume that the default language is always defined, e.g.
     9        Document::getCachedLocalizer. Add an ASSERT() statement so an embedder
     10        doesn't have to guess what they did wrong.
     11
     12        * platform/chromium/LanguageChromium.cpp:
     13        (WebCore::platformLanguage):
     14
    1152012-10-01  Christophe Dumez  <christophe.dumez@intel.com>
    216
  • trunk/Source/WebCore/platform/chromium/LanguageChromium.cpp

    r127757 r130062  
    4141{
    4242    DEFINE_STATIC_LOCAL(String, computedDefaultLanguage, ());
    43     if (computedDefaultLanguage.isEmpty())
     43    if (computedDefaultLanguage.isEmpty()) {
    4444        computedDefaultLanguage.append(WebKit::Platform::current()->defaultLocale());
     45        ASSERT(!computedDefaultLanguage.isEmpty());
     46    }
    4547    return computedDefaultLanguage;
    4648}
Note: See TracChangeset for help on using the changeset viewer.