Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert overzealous failfast logic which tried to improve detection of i18n initialization issues #5561

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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