| 81 | } |
| 82 | |
| 83 | @Override |
| 84 | public Object get(ExecutionContext context, String name) { |
| 85 | if ( this.externalIndexedData != null ) { |
| 86 | Long num = Types.toUint32(context, name); |
| 87 | if ( name.equals( num.toString() ) ) { |
| 88 | Object value = this.externalIndexedData.get(num); |
| 89 | if ( value == null ) { |
| 90 | return Types.UNDEFINED; |
| 91 | } |
| 92 | return value; |
| 93 | } |
| 94 | } |
| 95 | // 8.12.3 |
| 96 | Object d = getProperty(context, name, false); |
| 97 | if (d == Types.UNDEFINED) { |
| 98 | return Types.UNDEFINED; |
| 99 | } |
| 100 | |
| 101 | PropertyDescriptor desc = (PropertyDescriptor) d; |
| 102 | if (desc.isDataDescriptor()) { |
| 103 | Object value = desc.getValue(); |
| 104 | if (value == null) { |
| 105 | value = Types.UNDEFINED; |
| 106 | } |
| 107 | return value; |
| 108 | } |
| 109 | |
| 110 | Object g = desc.getGetter(); |
| 111 | if (g == null || g == Types.UNDEFINED) { |
| 112 | return Types.UNDEFINED; |
| 113 | } |
| 114 | |
| 115 | JSFunction getter = (JSFunction) g; |
| 116 | return context.call(getter, this); |
| 117 | } |
| 118 | |
| 119 | @Override |
| 120 | public Object getOwnProperty(ExecutionContext context, String name) { |