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 committed 2018-04-14 08:51:05 +02:00
1 parent a7f7a22319
commit e2719e1dbf
2 files changed
+5 -1

No files matched your search

+2
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();
}