|
46 | 46 | import org.htmlunit.corejs.javascript.Function; |
47 | 47 | import org.htmlunit.corejs.javascript.FunctionObject; |
48 | 48 | import org.htmlunit.corejs.javascript.JavaScriptException; |
49 | | -import org.htmlunit.corejs.javascript.MemberBox; |
50 | 49 | import org.htmlunit.corejs.javascript.NativeArray; |
51 | 50 | import org.htmlunit.corejs.javascript.NativeArrayIterator; |
52 | 51 | import org.htmlunit.corejs.javascript.NativeConsole; |
@@ -609,24 +608,24 @@ private static void configureProperties(final ClassConfiguration config, final S |
609 | 608 | if (propertyMap != null) { |
610 | 609 | for (final Entry<String, PropertyInfo> propertyEntry : propertyMap.entrySet()) { |
611 | 610 | final PropertyInfo info = propertyEntry.getValue(); |
612 | | - final MemberBox readMethod = info.getReadMethod(); |
613 | | - final MemberBox writeMethod = info.getWriteMethod(); |
614 | | - scriptable.defineProperty(propertyEntry.getKey(), readMethod, writeMethod, ScriptableObject.EMPTY); |
| 611 | + final Method readMethod = info.getReadMethod(); |
| 612 | + final Method writeMethod = info.getWriteMethod(); |
| 613 | + scriptable.defineProperty(propertyEntry.getKey(), null, readMethod, writeMethod, ScriptableObject.EMPTY); |
615 | 614 | } |
616 | 615 | } |
617 | 616 | } |
618 | 617 |
|
619 | 618 | private static void configureStaticProperties(final ClassConfiguration config, final ScriptableObject scriptable) { |
620 | 619 | final Map<String, PropertyInfo> staticPropertyMap = config.getStaticPropertyMap(); |
621 | 620 | if (staticPropertyMap != null) { |
622 | | -// for (final Entry<String, ClassConfiguration.PropertyInfo> propertyEntry : staticPropertyMap.entrySet()) { |
623 | | -// final String propertyName = propertyEntry.getKey(); |
624 | | -// final Method readMethod = propertyEntry.getValue().getReadMethod(); |
625 | | -// final Method writeMethod = propertyEntry.getValue().getWriteMethod(); |
626 | | -// final int flag = ScriptableObject.EMPTY; |
627 | | -// |
628 | | -// scriptable.defineProperty(propertyName, null, readMethod, writeMethod, flag); |
629 | | -// } |
| 621 | + for (final Entry<String, ClassConfiguration.PropertyInfo> propertyEntry : staticPropertyMap.entrySet()) { |
| 622 | + final String propertyName = propertyEntry.getKey(); |
| 623 | + final Method readMethod = propertyEntry.getValue().getReadMethod(); |
| 624 | + final Method writeMethod = propertyEntry.getValue().getWriteMethod(); |
| 625 | + final int flag = ScriptableObject.EMPTY; |
| 626 | + |
| 627 | + scriptable.defineProperty(propertyName, null, readMethod, writeMethod, flag); |
| 628 | + } |
630 | 629 | } |
631 | 630 | } |
632 | 631 |
|
|
0 commit comments