0
0
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:
Timothy Gu 2017-10-16 22:29:41 -07:00
parent 7a71cd7d0c
commit 2146c88bc7
No known key found for this signature in database
GPG Key ID: 7FE6B095B582B0D4

View File

@ -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;