mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-22 01:35:35 +00:00
Bug 1420961 part 2 - Replace if-statement with an assert in js::GetIterator. r=evilpie
This commit is contained in:
parent
5e9cba3e6b
commit
94ab7abbe5
@ -876,8 +876,7 @@ js::GetIterator(JSContext* cx, HandleObject obj, unsigned flags)
|
||||
numGuards = 0;
|
||||
}
|
||||
|
||||
if (MOZ_UNLIKELY(obj->is<PropertyIteratorObject>()))
|
||||
return obj;
|
||||
MOZ_ASSERT(!obj->is<PropertyIteratorObject>());
|
||||
|
||||
// We should only call the enumerate trap for "for-in".
|
||||
// Or when we call GetIterator from the Proxy [[Enumerate]] hook.
|
||||
|
Loading…
Reference in New Issue
Block a user