Skip to content

Commit

Permalink
Revert D46769581: Keep all the HybridData's members
Browse files Browse the repository at this point in the history
Differential Revision:
D46769581

Original commit changeset: 9ee17e490e65

Original Phabricator Diff: D46769581

fbshipit-source-id: dc05c4cfcb6e6fecf4726b6025e2a1eee4189c02
  • Loading branch information
simpleton authored and facebook-github-bot committed Jun 20, 2023
1 parent d08a84e commit a4be46c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 38 deletions.
10 changes: 5 additions & 5 deletions java/com/facebook/jni/HybridData.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

package com.facebook.jni;

import com.facebook.jni.annotations.DoNotStripAny;
import com.facebook.jni.annotations.DoNotStrip;
import com.facebook.soloader.nativeloader.NativeLoader;

/**
Expand All @@ -27,14 +27,14 @@
* <p>{@link #resetNative} deletes the corresponding native object synchronously on whatever thread
* the method is called on. Otherwise, deletion will occur on the {@link DestructorThread} thread.
*/
@DoNotStripAny
@DoNotStrip
public class HybridData {

static {
NativeLoader.loadLibrary("fbjni");
}

private final Destructor mDestructor = new Destructor(this);
@DoNotStrip private Destructor mDestructor = new Destructor(this);

/**
* To explicitly delete the instance, call resetNative(). If the C++ instance is referenced after
Expand Down Expand Up @@ -64,11 +64,11 @@ public boolean isValid() {
return mDestructor.mNativePointer != 0;
}

@DoNotStripAny
@DoNotStrip
public static class Destructor extends DestructorThread.Destructor {

// Private C++ instance
private volatile long mNativePointer;
@DoNotStrip private volatile long mNativePointer;

Destructor(Object referent) {
super(referent);
Expand Down
33 changes: 0 additions & 33 deletions java/com/facebook/jni/annotations/DoNotStripAny.java

This file was deleted.

0 comments on commit a4be46c

Please sign in to comment.