(ExecutionContext context, JSObject o, String name)
| 60 | } |
| 61 | |
| 62 | protected Object primitiveGet(ExecutionContext context, JSObject o, String name) { |
| 63 | // 8.7.1 primitive [[Get]] |
| 64 | Object d = o.getProperty(context, name, false); |
| 65 | if (d == Types.UNDEFINED) { |
| 66 | return Types.UNDEFINED; |
| 67 | } |
| 68 | |
| 69 | PropertyDescriptor desc = (PropertyDescriptor) d; |
| 70 | if (desc.isDataDescriptor()) { |
| 71 | Object value = desc.getValue(); |
| 72 | if ( value == null ) { |
| 73 | value = Types.UNDEFINED; |
| 74 | } |
| 75 | return value; |
| 76 | } |
| 77 | |
| 78 | Object getter = desc.getGetter(); |
| 79 | |
| 80 | if (getter == Types.UNDEFINED) { |
| 81 | return Types.UNDEFINED; |
| 82 | } |
| 83 | |
| 84 | return context.call((JSFunction) getter, o); |
| 85 | } |
| 86 | |
| 87 | public void putValue(ExecutionContext context, Object value) { |
| 88 | // 8.7.2 |
no test coverage detected