mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-03 23:30:46 +00:00
Call NativeArray.getLength() instead of deprecated NativeArray.jsGet_length()
This commit is contained in:
parent
6e859f553a
commit
efd9f298ab
@ -629,7 +629,7 @@ WrapFactory#wrap(Context cx, Scriptable scope, Object obj, Class)}
|
||||
// Make a new java array, and coerce the JS array components
|
||||
// to the target (component) type.
|
||||
NativeArray array = (NativeArray) value;
|
||||
long length = array.jsGet_length();
|
||||
long length = array.getLength();
|
||||
Class arrayType = type.getComponentType();
|
||||
Object Result = Array.newInstance(arrayType, (int)length);
|
||||
for (int i = 0 ; i < length ; ++i) {
|
||||
|
@ -277,7 +277,7 @@ public class Main {
|
||||
}
|
||||
}
|
||||
NativeArray h = global.history;
|
||||
h.put((int)h.jsGet_length(), h, source);
|
||||
h.put((int)h.getLength(), h, source);
|
||||
}
|
||||
global.getErr().println();
|
||||
} else processFile(cx, global, filename);
|
||||
|
Loading…
x
Reference in New Issue
Block a user