mirror of
https://github.com/status-im/react-native.git
synced 2025-03-01 01:20:31 +00:00
Automatically init native memory when allocating java wrapper
Reviewed By: lucasr Differential Revision: D3992802 fbshipit-source-id: 06d65821f1802ed8f2b2db651cef69f6851803f2
This commit is contained in:
parent
6dae68306e
commit
38bd937b40
@ -35,6 +35,10 @@ public class CSSNode implements CSSNodeAPI<CSSNode> {
|
|||||||
private long mNativePointer;
|
private long mNativePointer;
|
||||||
private Object mData;
|
private Object mData;
|
||||||
|
|
||||||
|
public CSSNode() {
|
||||||
|
init();
|
||||||
|
}
|
||||||
|
|
||||||
private void assertNativeInstance() {
|
private void assertNativeInstance() {
|
||||||
if (mNativePointer == 0) {
|
if (mNativePointer == 0) {
|
||||||
throw new IllegalStateException("Null native pointer");
|
throw new IllegalStateException("Null native pointer");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user