summaryrefslogtreecommitdiffstats
path: root/js/src/builtin
diff options
context:
space:
mode:
authorjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-04-14 08:57:05 +0200
committerjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-04-14 08:57:05 +0200
commit3bd16c90800e8ec6ef8d7f135d8435bbbc0b94e6 (patch)
tree576255c3e2539df2f289cbb48564e82c6d5a307b /js/src/builtin
parent05505d2e83d0c11beb6bc8b5c5a0daf68934c342 (diff)
downloadUXP-3bd16c90800e8ec6ef8d7f135d8435bbbc0b94e6.tar
UXP-3bd16c90800e8ec6ef8d7f135d8435bbbc0b94e6.tar.gz
UXP-3bd16c90800e8ec6ef8d7f135d8435bbbc0b94e6.tar.lz
UXP-3bd16c90800e8ec6ef8d7f135d8435bbbc0b94e6.tar.xz
UXP-3bd16c90800e8ec6ef8d7f135d8435bbbc0b94e6.zip
Bug 1341256 - Fix module namespace object get handler
Diffstat (limited to 'js/src/builtin')
-rw-r--r--js/src/builtin/ModuleObject.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/js/src/builtin/ModuleObject.cpp b/js/src/builtin/ModuleObject.cpp
index f13a2b78a..444d8962d 100644
--- a/js/src/builtin/ModuleObject.cpp
+++ b/js/src/builtin/ModuleObject.cpp
@@ -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)) {