mirror of
https://github.com/nodejs/node.git
synced 2024-12-01 16:10:02 +01:00
src: fix NewContext for --without-intl
PR-URL: https://github.com/nodejs/node/pull/16251 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
parent
7a71cd7d0c
commit
2146c88bc7
@ -4787,9 +4787,9 @@ Local<Context> NewContext(Isolate* isolate,
|
||||
auto intl_key = FIXED_ONE_BYTE_STRING(isolate, "Intl");
|
||||
auto break_iter_key = FIXED_ONE_BYTE_STRING(isolate, "v8BreakIterator");
|
||||
Local<Value> intl_v;
|
||||
Local<Object> intl;
|
||||
if (context->Global()->Get(context, intl_key).ToLocal(&intl_v) &&
|
||||
intl_v->ToObject(context).ToLocal(&intl)) {
|
||||
intl_v->IsObject()) {
|
||||
Local<Object> intl = intl_v.As<Object>();
|
||||
intl->Delete(context, break_iter_key).FromJust();
|
||||
}
|
||||
return context;
|
||||
|
Loading…
Reference in New Issue
Block a user