Skip to content

Commit 9ed4801

Browse files
committed
remove no longer required feature
1 parent a463e7a commit 9ed4801

File tree

3 files changed

+0
-31
lines changed

3 files changed

+0
-31
lines changed

src/org/mozilla/javascript/Context.java

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -335,15 +335,6 @@ public class Context implements Closeable {
335335
*/
336336
public static final int FEATURE_HTMLUNIT_FUNCTION_DECLARED_FORWARD_IN_BLOCK = 103;
337337

338-
/**
339-
* Special to HtmlUnit's Rhino fork.
340-
*
341-
* <p>Indicates that for(x in []) should enumerate the numbers first.
342-
*
343-
* <p>By default {@link #hasFeature(int)} returns false.
344-
*/
345-
public static final int FEATURE_HTMLUNIT_ENUM_NUMBERS_FIRST = 104;
346-
347338
/**
348339
* Special to HtmlUnit's Rhino fork.
349340
*

src/org/mozilla/javascript/ContextFactory.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -296,9 +296,6 @@ protected boolean hasFeature(Context cx, int featureIndex) {
296296

297297
case Context.FEATURE_HTMLUNIT_FUNCTION_DECLARED_FORWARD_IN_BLOCK:
298298
return false;
299-
300-
case Context.FEATURE_HTMLUNIT_ENUM_NUMBERS_FIRST:
301-
return false;
302299
}
303300
// It is a bug to call the method with unknown featureIndex
304301
throw new IllegalArgumentException(String.valueOf(featureIndex));

src/org/mozilla/javascript/ScriptRuntime.java

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2479,25 +2479,6 @@ private static void enumChangeObject(IdEnumeration x) {
24792479
x.used.intern(previous[i]);
24802480
}
24812481
}
2482-
if (ids != null
2483-
&& Context.getCurrentContext()
2484-
.hasFeature(Context.FEATURE_HTMLUNIT_ENUM_NUMBERS_FIRST)) {
2485-
Set<Integer> integers = new TreeSet<Integer>();
2486-
List<Object> others = new ArrayList<Object>();
2487-
for (Object o : ids) {
2488-
if (o instanceof Integer) {
2489-
integers.add((Integer) o);
2490-
} else {
2491-
others.add(o);
2492-
}
2493-
}
2494-
if (!integers.isEmpty()) {
2495-
Object[] newIds = new Object[ids.length];
2496-
System.arraycopy(integers.toArray(), 0, newIds, 0, integers.size());
2497-
System.arraycopy(others.toArray(), 0, newIds, integers.size(), others.size());
2498-
ids = newIds;
2499-
}
2500-
}
25012482
x.ids = ids;
25022483
x.index = 0;
25032484
}

0 commit comments

Comments
 (0)