Bug 1394490 - Allow NSVO as global lexical |this|
Allow an NSVO to be a valid |this| target and don't skip over in
js::GetThisValue
MozReview-Commit-ID: 3goLslCcc2Q
--- a/js/src/jsobj.cpp
+++ b/js/src/jsobj.cpp
@@ -3266,19 +3266,16 @@ js::GetThisValue(JSObject* obj)
}
if (obj->is<ModuleEnvironmentObject>())
return UndefinedValue();
if (obj->is<WithEnvironmentObject>())
return ObjectValue(*obj->as<WithEnvironmentObject>().withThis());
- if (obj->is<NonSyntacticVariablesObject>())
- return GetThisValue(obj->enclosingEnvironment());
-
return ObjectValue(*obj);
}
class GetObjectSlotNameFunctor : public JS::CallbackTracer::ContextFunctor
{
JSObject* obj;
public: