Bug 1341256 - Fix module namespace object get handler

This commit is contained in:
janekptacijarabaci 2018-04-14 08:57:05 +02:00 • committed by Roy Tam
commit eaf8fcd215
2 changed files with 7 additions and 2 deletions

View file

@ -464,8 +464,10 @@ ModuleNamespaceObject::ProxyHandler::get(JSContext* cx, HandleObject proxy, Hand
ModuleEnvironmentObject* env;
Shape* shape;
if (!ns->bindings().lookup(id, &env, &shape))
return false;
if (!ns->bindings().lookup(id, &env, &shape)) {
vp.setUndefined();
return true;
}
RootedValue value(cx, env->getSlot(shape->slot()));
if (value.isMagic(JS_UNINITIALIZED_LEXICAL)) {