Skip to content

Commit c27eb77

Browse files
committed
Intl should only early OOM for full builds
This currently causes a problem in node where `cctest` fails when trying to access the Intl object to check for a property. Refs: nodejs/node-chakracore#567
1 parent 259f6ca commit c27eb77

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/Runtime/Library/IntlEngineInterfaceExtensionObject.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -606,6 +606,7 @@ PROJECTED_ENUMS(PROJECTED_ENUM)
606606
#else
607607
library->AddMember(intlNativeInterfaces, Js::PropertyIds::winglob, library->GetFalse());
608608

609+
#if defined(NTBUILD)
609610
// when using ICU, we can call ulocdata_getCLDRVersion to ensure that ICU is functioning properly before allowing Intl to continue.
610611
// 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.
611612
// This is to protect against spurious U_MISSING_RESOURCE_ERRORs and U_FILE_ACCESS_ERRORs coming from early-lifecycle
@@ -628,6 +629,7 @@ PROJECTED_ENUMS(PROJECTED_ENUM)
628629
}
629630

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

633635
intlNativeInterfaces->SetHasNoEnumerableProperties(true);

0 commit comments

Comments
 (0)