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

Intl should only early OOM for full builds #5708

Merged
merged 1 commit into from
Sep 18, 2018
Merged
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
2 changes: 2 additions & 0 deletions lib/Runtime/Library/IntlEngineInterfaceExtensionObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -606,6 +606,7 @@ PROJECTED_ENUMS(PROJECTED_ENUM)
#else
library->AddMember(intlNativeInterfaces, Js::PropertyIds::winglob, library->GetFalse());

#if defined(NTBUILD)
// when using ICU, we can call ulocdata_getCLDRVersion to ensure that ICU is functioning properly before allowing Intl to continue.
// ulocdata_getCLDRVersion will cause the data file to be loaded, and if we don't have enough memory to do so, we can throw OutOfMemory here.
// This is to protect against spurious U_MISSING_RESOURCE_ERRORs and U_FILE_ACCESS_ERRORs coming from early-lifecycle
Expand All @@ -628,6 +629,7 @@ PROJECTED_ENUMS(PROJECTED_ENUM)
}

AssertOrFailFastMsg(U_SUCCESS(status), "ulocdata_getCLDRVersion returned non-OOM failure");
#endif // defined(NTBUILD)
#endif // else !INTL_WINGLOB

intlNativeInterfaces->SetHasNoEnumerableProperties(true);
Expand Down