Skip to content

Commit 798f77b

Browse files
committedAug 1, 2018
[1.10>master] [MERGE #5561 @dilijev] Revert overzealous failfast logic which tried to improve detection of i18n initialization issues
Merge pull request #5561 from dilijev:revert-charclass-failfast See OS#10368428 See original PR #5375
2 parents 0b32965 + 6ada16b commit 798f77b

File tree

2 files changed

+8
-16
lines changed

2 files changed

+8
-16
lines changed
 

‎lib/Parser/CharClassifier.cpp

+7-1
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,12 @@ 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)
414+
// The following assertions are intentionally excluded from ChakraCore by guarding on NTBUILD.
415+
// This is to work around limitations of the i18n library downlevel (Win7, Win 8.0)
416+
// where CharClassifier functionality is not available.
417+
// TODO: Ideally, we would use the following guard instead to assert when an i18n library is available:
418+
// #if INTL_ICU || INTL_WINGLOB
419+
#ifdef NTBUILD
415420
AssertMsg(isFullUnicodeSupportAvailable, "Windows.Globalization needs to present with IUnicodeCharacterStatics support for Chakra.dll to work");
416421
if (!isFullUnicodeSupportAvailable)
417422
{
@@ -450,6 +455,7 @@ Js::CharClassifier::CharClassifier(void)
450455
getBigCharFlagsFunc = &CharClassifier::GetBigCharFlagsES5;
451456
}
452457
#endif
458+
453459
}
454460

455461
const OLECHAR* Js::CharClassifier::SkipWhiteSpaceNonSurrogate(LPCOLESTR psz, const CharClassifier *instance)

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

+1-15
Original file line numberDiff line numberDiff line change
@@ -416,23 +416,9 @@ namespace PlatformAgnostic
416416
{
417417
return true;
418418
}
419-
#if INTL_ICU || INTL_WINGLOB // don't assert in _no_icu builds (where there is no i18n library, by design)
420-
else
421-
{
422-
// did not find winGlobCharApi
423-
Js::Throw::FatalInternalGlobalizationError();
424-
}
425-
}
426-
else
427-
{
428-
// failed to initialize Windows Globalization
429-
Js::Throw::FatalInternalGlobalizationError();
430-
#endif
431419
}
432420

433-
#if (INTL_ICU || INTL_WINGLOB) && !defined(DBG)
434-
return false; // in debug builds, this is unreachable code
435-
#endif
421+
return false;
436422
}, false);
437423
}
438424
#endif // HAS_ICU

0 commit comments

Comments
 (0)
Please sign in to comment.