Skip to content

Commit fab6267

Browse files
committed
Don't throw FatalInternalGlobalizationError on _no_icu -- only (INTL_ICU || INTL_WINGLOB)
1 parent b8e7079 commit fab6267

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

lib/Parser/CharClassifier.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,11 +411,13 @@ Js::CharClassifier::CharClassifier(void)
411411
bool isES6UnicodeModeEnabled = CONFIG_FLAG(ES6Unicode);
412412
bool isFullUnicodeSupportAvailable = PlatformAgnostic::UnicodeText::IsExternalUnicodeLibraryAvailable();
413413

414+
#if INTL_ICU || INTL_WINGLOB // don't assert in _no_icu builds (where there is no i18n library, by design)
414415
AssertMsg(isFullUnicodeSupportAvailable, "Windows.Globalization needs to present with IUnicodeCharacterStatics support for Chakra.dll to work");
415416
if (!isFullUnicodeSupportAvailable)
416417
{
417418
Js::Throw::FatalInternalGlobalizationError();
418419
}
420+
#endif
419421

420422
// If we're in ES6 mode, and we have full support for Unicode character classification
421423
// from an external library, then use the ES6/Surrogate pair supported versions of the functions

lib/Runtime/PlatformAgnostic/Platform/Windows/UnicodeText.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,7 @@ namespace PlatformAgnostic
407407
{
408408
return true;
409409
}
410+
#if INTL_ICU || INTL_WINGLOB // don't assert in _no_icu builds (where there is no i18n library, by design)
410411
else
411412
{
412413
// did not find winGlobCharApi
@@ -417,9 +418,10 @@ namespace PlatformAgnostic
417418
{
418419
// failed to initialize Windows Globalization
419420
Js::Throw::FatalInternalGlobalizationError();
421+
#endif
420422
}
421423

422-
#ifndef DBG
424+
#if (INTL_ICU || INTL_WINGLOB) && !defined(DBG)
423425
return false; // in debug builds, this is unreachable code
424426
#endif
425427
}, false);

0 commit comments

Comments
 (0)