JS: fix for creation of typed arrays from view method (#532)

This commit is contained in:
Ivan Hetman 2020-10-26 12:02:54 +02:00 committed by GitHub
parent 71140135fa
commit dfef5ffd24
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 18 additions and 18 deletions

View File

@ -77,8 +77,8 @@ public abstract class DataView extends ArrayBufferView {
@JSBody(params = "buffer", script = "return new DataView(buffer);")
public static native DataView create(ArrayBuffer buffer);
@JSBody(params = "buffer", script = "return new DataView(buffer);")
public static native DataView create(ArrayBufferView buffer);
@JSBody(params = "bufferView", script = "return new DataView(bufferView.buffer);")
public static native DataView create(ArrayBufferView bufferView);
@JSBody(params = { "buffer", "offset", "length" }, script = "return new DataView(buffer, offset, length);")
public static native DataView create(ArrayBuffer buffer, int offset, int length);

View File

@ -31,8 +31,8 @@ public abstract class Float32Array extends ArrayBufferView {
@JSBody(params = "buffer", script = "return new Float32Array(buffer);")
public static native Float32Array create(ArrayBuffer buffer);
@JSBody(params = "buffer", script = "return new Float32Array(buffer);")
public static native Float32Array create(ArrayBufferView buffer);
@JSBody(params = "bufferView", script = "return new Float32Array(bufferView.buffer);")
public static native Float32Array create(ArrayBufferView bufferView);
@JSBody(params = { "buffer", "offset", "length" }, script = "return new Float32Array(buffer, offset, length);")
public static native Float32Array create(ArrayBuffer buffer, int offset, int length);

View File

@ -31,8 +31,8 @@ public abstract class Float64Array extends ArrayBufferView {
@JSBody(params = "buffer", script = "return new Float64Array(buffer);")
public static native Float64Array create(ArrayBuffer buffer);
@JSBody(params = "buffer", script = "return new Float64Array(buffer);")
public static native Float64Array create(ArrayBufferView buffer);
@JSBody(params = "bufferView", script = "return new Float64Array(bufferView.buffer);")
public static native Float64Array create(ArrayBufferView bufferView);
@JSBody(params = { "buffer", "offset", "length" }, script = "return new Float64Array(buffer, offset, length);")
public static native Float64Array create(ArrayBuffer buffer, int offset, int length);

View File

@ -31,8 +31,8 @@ public abstract class Int16Array extends ArrayBufferView {
@JSBody(params = "buffer", script = "return new Int16Array(buffer);")
public static native Int16Array create(ArrayBuffer buffer);
@JSBody(params = "buffer", script = "return new Int16Array(buffer);")
public static native Int16Array create(ArrayBufferView buffer);
@JSBody(params = "bufferView", script = "return new Int16Array(bufferView.buffer);")
public static native Int16Array create(ArrayBufferView bufferView);
@JSBody(params = { "buffer", "offset", "length" }, script = "return new Int16Array(buffer, offset, length);")
public static native Int16Array create(ArrayBuffer buffer, int offset, int length);

View File

@ -36,8 +36,8 @@ public abstract class Int32Array extends ArrayBufferView {
@JSBody(params = "buffer", script = "return new Int32Array(buffer);")
public static native Int32Array create(ArrayBuffer buffer);
@JSBody(params = "buffer", script = "return new Int32Array(buffer);")
public static native Int32Array create(ArrayBufferView buffer);
@JSBody(params = "bufferView", script = "return new Int32Array(bufferView.buffer);")
public static native Int32Array create(ArrayBufferView bufferView);
@JSBody(params = { "buffer", "offset", "length" }, script = "return new Int32Array(buffer, offset, length);")
public static native Int32Array create(ArrayBuffer buffer, int offset, int length);

View File

@ -31,8 +31,8 @@ public abstract class Int8Array extends ArrayBufferView {
@JSBody(params = "buffer", script = "return new Int8Array(buffer);")
public static native Int8Array create(ArrayBuffer buffer);
@JSBody(params = "buffer", script = "return new Int8Array(buffer);")
public static native Int8Array create(ArrayBufferView buffer);
@JSBody(params = "bufferView", script = "return new Int8Array(bufferView.buffer);")
public static native Int8Array create(ArrayBufferView bufferView);
@JSBody(params = { "buffer", "offset", "length" }, script = "return new Int8Array(buffer, offset, length);")
public static native Int8Array create(ArrayBuffer buffer, int offset, int length);

View File

@ -31,8 +31,8 @@ public abstract class Uint16Array extends ArrayBufferView {
@JSBody(params = "buffer", script = "return new Uint16Array(buffer);")
public static native Uint16Array create(ArrayBuffer buffer);
@JSBody(params = "buffer", script = "return new Uint16Array(buffer);")
public static native Uint16Array create(ArrayBufferView buffer);
@JSBody(params = "bufferView", script = "return new Uint16Array(bufferView.buffer);")
public static native Uint16Array create(ArrayBufferView bufferView);
@JSBody(params = { "buffer", "offset", "length" }, script = "return new Uint16Array(buffer, offset, length);")
public static native Uint16Array create(ArrayBuffer buffer, int offset, int length);

View File

@ -31,8 +31,8 @@ public abstract class Uint8Array extends ArrayBufferView {
@JSBody(params = "buffer", script = "return new Uint8Array(buffer);")
public static native Uint8Array create(ArrayBuffer buffer);
@JSBody(params = "buffer", script = "return new Uint8Array(buffer);")
public static native Uint8Array create(ArrayBufferView buffer);
@JSBody(params = "bufferView", script = "return new Uint8Array(bufferView.buffer);")
public static native Uint8Array create(ArrayBufferView bufferView);
@JSBody(params = { "buffer", "offset", "length" }, script = "return new Uint8Array(buffer, offset, length);")
public static native Uint8Array create(ArrayBuffer buffer, int offset, int length);

View File

@ -31,8 +31,8 @@ public abstract class Uint8ClampedArray extends ArrayBufferView {
@JSBody(params = "buffer", script = "return new Uint8ClampedArray(buffer);")
public static native Uint8ClampedArray create(ArrayBuffer buffer);
@JSBody(params = "buffer", script = "return new Uint8ClampedArray(buffer);")
public static native Uint8ClampedArray create(ArrayBufferView buffer);
@JSBody(params = "bufferView", script = "return new Uint8ClampedArray(bufferView.buffer);")
public static native Uint8ClampedArray create(ArrayBufferView bufferView);
@JSBody(params = { "buffer", "offset", "length" }, script = "return new "
+ "Uint8ClampedArray(buffer, offset, length);")