// Copyright 2018 the V8 project authors. All rights reserved.// Use of this source code is governed by a BSD-style license that can be// found in the LICENSE file.Object.defineProperty(Array.prototype,Symbol.iterator,{value:function*(){}});constarrayIteratorProto=Object.getPrototypeOf([][Symbol.iterator]());arrayIteratorProto.next=function(){};assertThrows(()=>newMap([[{},1],[{},2]]),TypeError);assertThrows(()=>newWeakMap([[{},1],[{},2]]),TypeError);assertThrows(()=>newSet([{}]),TypeError);assertThrows(()=>newWeakSet([{}]),TypeError);