(instance, methodName)
| 997 | } |
| 998 | |
| 999 | function findMethodOnPrototypeChain(instance, methodName) { |
| 1000 | let host = instance; |
| 1001 | let descriptor; |
| 1002 | |
| 1003 | while (host !== null) { |
| 1004 | descriptor = ObjectGetOwnPropertyDescriptor(host, methodName); |
| 1005 | |
| 1006 | if (descriptor) { |
| 1007 | break; |
| 1008 | } |
| 1009 | |
| 1010 | host = ObjectGetPrototypeOf(host); |
| 1011 | } |
| 1012 | |
| 1013 | return descriptor; |
| 1014 | } |
| 1015 | |
| 1016 | function ensureNodeScheme(specifier) { |
| 1017 | if (!StringPrototypeStartsWith(specifier, 'node:')) { |