diff --git a/tooling/BUILD.gn b/tooling/BUILD.gn index ed8b0d046d7f73e6ddc077b1cea7b7e4c0459bd1..f7e44379381b22706108bbaf670fe1750737a350 100644 --- a/tooling/BUILD.gn +++ b/tooling/BUILD.gn @@ -97,6 +97,13 @@ source_set("libark_ecma_debugger_set") { } } + if (enable_ark_intl) { + if (!defined(defines)) { + defines = [] + } + defines += [ "ARK_SUPPORT_INTL" ] + } + cflags_cc = [ "-fvisibility=hidden" ] } diff --git a/tooling/agent/runtime_impl.cpp b/tooling/agent/runtime_impl.cpp index 60d1a5ff14ec134422308cd4ded30ebb55422c1e..09bd468b4f49a2bd051b5bf71983d09921ac0274 100644 --- a/tooling/agent/runtime_impl.cpp +++ b/tooling/agent/runtime_impl.cpp @@ -219,12 +219,14 @@ DispatchResponse RuntimeImpl::GetProperties(const GetPropertiesParams ¶ms, GetGeneratorFunctionValue(value, outPropertyDesc); } else if (value->IsGeneratorObject()) { GetGeneratorObjectValue(value, outPropertyDesc); +#ifdef ARK_SUPPORT_INTL } else if (value->IsJSNumberFormat()) { GetNumberFormatValue(value, outPropertyDesc); } else if (value->IsJSCollator()) { GetCollatorValue(value, outPropertyDesc); } else if (value->IsJSDateTimeFormat()) { GetDateTimeFormatValue(value, outPropertyDesc); +#endif } else if (value->IsMap()) { GetMapValue(value, outPropertyDesc); } else if (value->IsRegExp()) { @@ -519,7 +521,7 @@ void RuntimeImpl::GetGeneratorObjectValue(Local value, SetKeyValue(jsValueRef, outPropertyDesc, "[[GeneratorReceiver]]"); } } - +#ifdef ARK_SUPPORT_INTL void RuntimeImpl::GetNumberFormatValue(Local value, std::vector> *outPropertyDesc) { @@ -543,7 +545,7 @@ void RuntimeImpl::GetDateTimeFormatValue(Local value, Local jsValueRef = dtFormatRef->GetFormatFunction(vm_); SetKeyValue(jsValueRef, outPropertyDesc, "format"); } - +#endif void RuntimeImpl::AddInternalProperties(Local object, ArkInternalValueType type) { if (internalObjects_.IsEmpty()) {