Skip to content

Commit

Permalink
[MERGE #5561 @dilijev] Revert overzealous failfast logic which tried …
Browse files Browse the repository at this point in the history
…to improve detection of i18n initialization issues

Merge pull request #5561 from dilijev:revert-charclass-failfast

See OS#10368428

See original PR #5375
  • Loading branch information
dilijev committed Jul 31, 2018
2 parents 5a840e3 + bab866a commit 6ada16b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 16 deletions.
8 changes: 7 additions & 1 deletion lib/Parser/CharClassifier.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,12 @@ Js::CharClassifier::CharClassifier(void)
bool isES6UnicodeModeEnabled = CONFIG_FLAG(ES6Unicode);
bool isFullUnicodeSupportAvailable = PlatformAgnostic::UnicodeText::IsExternalUnicodeLibraryAvailable();

#if INTL_ICU || INTL_WINGLOB // don't assert in _no_icu builds (where there is no i18n library, by design)
// The following assertions are intentionally excluded from ChakraCore by guarding on NTBUILD.
// This is to work around limitations of the i18n library downlevel (Win7, Win 8.0)
// where CharClassifier functionality is not available.
// TODO: Ideally, we would use the following guard instead to assert when an i18n library is available:
// #if INTL_ICU || INTL_WINGLOB
#ifdef NTBUILD
AssertMsg(isFullUnicodeSupportAvailable, "Windows.Globalization needs to present with IUnicodeCharacterStatics support for Chakra.dll to work");
if (!isFullUnicodeSupportAvailable)
{
Expand Down Expand Up @@ -450,6 +455,7 @@ Js::CharClassifier::CharClassifier(void)
getBigCharFlagsFunc = &CharClassifier::GetBigCharFlagsES5;
}
#endif

}

const OLECHAR* Js::CharClassifier::SkipWhiteSpaceNonSurrogate(LPCOLESTR psz, const CharClassifier *instance)
Expand Down
16 changes: 1 addition & 15 deletions lib/Runtime/PlatformAgnostic/Platform/Windows/UnicodeText.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -416,23 +416,9 @@ namespace PlatformAgnostic
{
return true;
}
#if INTL_ICU || INTL_WINGLOB // don't assert in _no_icu builds (where there is no i18n library, by design)
else
{
// did not find winGlobCharApi
Js::Throw::FatalInternalGlobalizationError();
}
}
else
{
// failed to initialize Windows Globalization
Js::Throw::FatalInternalGlobalizationError();
#endif
}

#if (INTL_ICU || INTL_WINGLOB) && !defined(DBG)
return false; // in debug builds, this is unreachable code
#endif
return false;
}, false);
}
#endif // HAS_ICU
Expand Down

0 comments on commit 6ada16b

Please sign in to comment.