mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-02-10 09:12:46 +08:00
Use new hybrid inheritance for NativeArray and descendants
Differential Revision: D2516708 fb-gh-sync-id: 75bc2d7095ffe2c397d5ffb34b621b322b858c3e
This commit is contained in:
committed by
facebook-github-bot-6
parent
8251f1c905
commit
fb90ba6ded
@@ -10,6 +10,7 @@
|
||||
package com.facebook.react.bridge;
|
||||
|
||||
import com.facebook.infer.annotation.Assertions;
|
||||
import com.facebook.jni.HybridData;
|
||||
import com.facebook.proguard.annotations.DoNotStrip;
|
||||
import com.facebook.soloader.SoLoader;
|
||||
|
||||
@@ -25,6 +26,10 @@ public class WritableNativeArray extends ReadableNativeArray implements Writable
|
||||
SoLoader.loadLibrary(ReactBridge.REACT_NATIVE_LIB);
|
||||
}
|
||||
|
||||
public WritableNativeArray() {
|
||||
super(initHybrid());
|
||||
}
|
||||
|
||||
@Override
|
||||
public native void pushNull();
|
||||
@Override
|
||||
@@ -52,6 +57,7 @@ public class WritableNativeArray extends ReadableNativeArray implements Writable
|
||||
pushNativeMap((WritableNativeMap) map);
|
||||
}
|
||||
|
||||
private native static HybridData initHybrid();
|
||||
private native void pushNativeArray(WritableNativeArray array);
|
||||
private native void pushNativeMap(WritableNativeMap map);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user