Bug 1326453 - Part 3: Don't throw a TypeError when SetPrototypeOf for module namespace objects is called with null

This commit is contained in:
janekptacijarabaci 2018-04-14 08:51:05 +02:00 • committed by Roy Tam
commit 50765b944e
2 changed files with 5 additions and 1 deletions

View file

@ -345,6 +345,8 @@ bool
ModuleNamespaceObject::ProxyHandler::setPrototype(JSContext* cx, HandleObject proxy,
HandleObject proto, ObjectOpResult& result) const
{
if (!proto)
return result.succeed();
return result.failCantSetProto();
}