• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2020 The Chromium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 package org.chromium.base.profiler;
6 
7 import org.jni_zero.CalledByNative;
8 import org.jni_zero.JNINamespace;
9 import org.jni_zero.NativeMethods;
10 
11 /** Helper to run code through JNI layer to test JNI unwinding. */
12 @JNINamespace("base")
13 public final class TestSupport {
14     @CalledByNative
callWithJavaFunction(long context)15     public static void callWithJavaFunction(long context) {
16         TestSupportJni.get().invokeCallbackFunction(context);
17     }
18 
19     @NativeMethods
20     interface Natives {
invokeCallbackFunction(long context)21         void invokeCallbackFunction(long context);
22     }
23 }
24