2017-05-28 00:38:50 +02:00
|
|
|
'use strict';
|
2017-08-14 05:01:11 +02:00
|
|
|
var $export = require('./_export');
|
|
|
|
var toObject = require('./_to-object');
|
|
|
|
var toPrimitive = require('./_to-primitive');
|
|
|
|
var getPrototypeOf = require('./_object-gpo');
|
|
|
|
var getOwnPropertyDescriptor = require('./_object-gopd').f;
|
2017-05-28 00:38:50 +02:00
|
|
|
|
|
|
|
// B.2.2.4 Object.prototype.__lookupGetter__(P)
|
|
|
|
require('./_descriptors') && $export($export.P + require('./_object-forced-pam'), 'Object', {
|
2017-08-14 05:01:11 +02:00
|
|
|
__lookupGetter__: function __lookupGetter__(P) {
|
|
|
|
var O = toObject(this);
|
|
|
|
var K = toPrimitive(P, true);
|
|
|
|
var D;
|
2017-05-28 00:38:50 +02:00
|
|
|
do {
|
2017-08-14 05:01:11 +02:00
|
|
|
if (D = getOwnPropertyDescriptor(O, K)) return D.get;
|
|
|
|
} while (O = getPrototypeOf(O));
|
2017-05-28 00:38:50 +02:00
|
|
|
}
|
2017-08-14 05:01:11 +02:00
|
|
|
});
|