File tree Expand file tree Collapse file tree 3 files changed +34
-43
lines changed
packages/react-native/ReactAndroid
src/main/java/com/facebook/react/uimanager Expand file tree Collapse file tree 3 files changed +34
-43
lines changed Original file line number Diff line number Diff line change @@ -4049,7 +4049,7 @@ public final class com/facebook/react/uimanager/FloatUtil {
4049
4049
4050
4050
public abstract class com/facebook/react/uimanager/GuardedFrameCallback : android/view/Choreographer$FrameCallback {
4051
4051
protected fun <init> (Lcom/facebook/react/bridge/ReactContext;)V
4052
- public final fun doFrame (J)V
4052
+ public fun doFrame (J)V
4053
4053
protected abstract fun doFrameGuarded (J)V
4054
4054
}
4055
4055
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ /*
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+ package com.facebook.react.uimanager
9
+
10
+ import android.view.Choreographer
11
+ import com.facebook.react.bridge.ReactContext
12
+
13
+ /* *
14
+ * Abstract base for a Choreographer FrameCallback that should have any RuntimeExceptions it throws
15
+ * handled by the [JSExceptionHandler] registered if the app is in dev mode.
16
+ */
17
+ public abstract class GuardedFrameCallback
18
+ protected constructor (private val reactContext: ReactContext ) : Choreographer .FrameCallback {
19
+
20
+ override public fun doFrame (frameTimeNanos : Long ) {
21
+ try {
22
+ doFrameGuarded(frameTimeNanos)
23
+ } catch (e: RuntimeException ) {
24
+ reactContext.handleException(e)
25
+ }
26
+ }
27
+
28
+ /* *
29
+ * Like the standard doFrame but RuntimeExceptions will be caught and passed to
30
+ * [ReactContext#handleException(RuntimeException)].
31
+ */
32
+ protected abstract fun doFrameGuarded (frameTimeNanos : Long )
33
+ }
You can’t perform that action at this time.
0 commit comments