From 2146c88bc7383ce66839e08cc22da17a51f5cacf Mon Sep 17 00:00:00 2001 From: Timothy Gu Date: Mon, 16 Oct 2017 22:29:41 -0700 Subject: [PATCH] src: fix NewContext for --without-intl PR-URL: https://github.com/nodejs/node/pull/16251 Reviewed-By: Anna Henningsen Reviewed-By: Ben Noordhuis Reviewed-By: Colin Ihrig Reviewed-By: James M Snell --- src/node.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/node.cc b/src/node.cc index 88e353656b3452..b780d526531d7a 100644 --- a/src/node.cc +++ b/src/node.cc @@ -4787,9 +4787,9 @@ Local NewContext(Isolate* isolate, auto intl_key = FIXED_ONE_BYTE_STRING(isolate, "Intl"); auto break_iter_key = FIXED_ONE_BYTE_STRING(isolate, "v8BreakIterator"); Local intl_v; - Local intl; if (context->Global()->Get(context, intl_key).ToLocal(&intl_v) && - intl_v->ToObject(context).ToLocal(&intl)) { + intl_v->IsObject()) { + Local intl = intl_v.As(); intl->Delete(context, break_iter_key).FromJust(); } return context;