Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions packages/react-native/ReactAndroid/api/ReactAndroid.api
Original file line number Diff line number Diff line change
Expand Up @@ -2626,13 +2626,6 @@ public class com/facebook/react/fabric/FabricUIManagerProviderImpl : com/faceboo
public fun createUIManager (Lcom/facebook/react/bridge/ReactApplicationContext;)Lcom/facebook/react/bridge/UIManager;
}

public abstract class com/facebook/react/fabric/GuardedFrameCallback : android/view/Choreographer$FrameCallback {
protected fun <init> (Lcom/facebook/react/bridge/JSExceptionHandler;)V
protected fun <init> (Lcom/facebook/react/bridge/ReactContext;)V
public fun doFrame (J)V
protected abstract fun doFrameGuarded (J)V
}

public class com/facebook/react/fabric/StateWrapperImpl : com/facebook/jni/HybridClassBase, com/facebook/react/uimanager/StateWrapper {
public fun destroyState ()V
public fun getStateData ()Lcom/facebook/react/bridge/ReadableNativeMap;
Expand Down Expand Up @@ -4075,6 +4068,7 @@ public final class com/facebook/react/uimanager/FloatUtil {
}

public abstract class com/facebook/react/uimanager/GuardedFrameCallback : android/view/Choreographer$FrameCallback {
protected fun <init> (Lcom/facebook/react/bridge/JSExceptionHandler;)V
protected fun <init> (Lcom/facebook/react/bridge/ReactContext;)V
public fun doFrame (J)V
protected abstract fun doFrameGuarded (J)V
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
import com.facebook.react.internal.interop.InteropEventEmitter;
import com.facebook.react.modules.core.ReactChoreographer;
import com.facebook.react.modules.i18nmanager.I18nUtil;
import com.facebook.react.uimanager.GuardedFrameCallback;
import com.facebook.react.uimanager.IllegalViewOperationException;
import com.facebook.react.uimanager.PixelUtil;
import com.facebook.react.uimanager.ReactRoot;
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,23 @@
package com.facebook.react.uimanager

import android.view.Choreographer
import com.facebook.react.bridge.JSExceptionHandler
import com.facebook.react.bridge.ReactContext

/**
* Abstract base for a Choreographer FrameCallback that should have any RuntimeExceptions it throws
* handled by the [JSExceptionHandler] registered if the app is in dev mode.
*/
public abstract class GuardedFrameCallback
protected constructor(private val reactContext: ReactContext) : Choreographer.FrameCallback {
protected constructor(private val exceptionHandler: JSExceptionHandler) :
Choreographer.FrameCallback {
protected constructor(reactContext: ReactContext) : this(reactContext.exceptionHandler)

override public fun doFrame(frameTimeNanos: Long) {
try {
doFrameGuarded(frameTimeNanos)
} catch (e: RuntimeException) {
reactContext.handleException(e)
exceptionHandler.handleException(e)
}
}

Expand Down