Avoid es-sham getPrototypeOf when constructor is not a function.

This commit is contained in:
John-David Dalton
2015-07-16 09:50:41 -07:00
parent 9ca16e3933
commit ab6210dc30

View File

@@ -8256,7 +8256,10 @@
if (!(value && objToString.call(value) == objectTag)) { if (!(value && objToString.call(value) == objectTag)) {
return false; return false;
} }
var proto = getPrototypeOf(value); var proto = typeof value.constructor == 'function'
? getPrototypeOf(value)
: objectProto;
if (proto === null) { if (proto === null) {
return true; return true;
} }