Merge "Revert "Test that we can unwind framework code.""
diff --git a/test/137-cfi/cfi.cc b/test/137-cfi/cfi.cc
index f451bcb..b2d7e55 100644
--- a/test/137-cfi/cfi.cc
+++ b/test/137-cfi/cfi.cc
@@ -94,7 +94,6 @@
   std::vector<std::string> seq = {
       "Java_Main_unwindInProcess",                   // This function.
       "boolean Main.unwindInProcess(int, boolean)",  // The corresponding Java native method frame.
-      "int java.util.Arrays.binarySearch(java.lang.Object[], int, int, java.lang.Object, java.util.Comparator)",  // Framework method.
       "void Main.main(java.lang.String[])"           // The Java entry method.
   };
 
@@ -186,7 +185,6 @@
                                                      // Note: For some reason, the name isn't
                                                      // resolved, so don't look for it right now.
         "boolean Main.sleep(int, boolean, double)",  // The corresponding Java native method frame.
-        "int java.util.Arrays.binarySearch(java.lang.Object[], int, int, java.lang.Object, java.util.Comparator)",  // Framework method.
         "void Main.main(java.lang.String[])"         // The Java entry method.
     };
 
diff --git a/test/137-cfi/src/Main.java b/test/137-cfi/src/Main.java
index 658ba53..e184e66 100644
--- a/test/137-cfi/src/Main.java
+++ b/test/137-cfi/src/Main.java
@@ -20,10 +20,8 @@
 import java.io.OutputStream;
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
-import java.util.Arrays;
-import java.util.Comparator;
 
-public class Main implements Comparator<Main> {
+public class Main {
   // Whether to test local unwinding. Libunwind uses linker info to find executables. As we do
   // not dlopen at the moment, this doesn't work, so keep it off for now.
   public final static boolean TEST_LOCAL_UNWINDING = false;
@@ -34,8 +32,6 @@
 
   private boolean secondary;
 
-  private boolean passed;
-
   public Main(boolean secondary) {
       this.secondary = secondary;
   }
@@ -64,13 +60,13 @@
   }
 
   private void runSecondary() {
-      foo();
+      foo(true);
       throw new RuntimeException("Didn't expect to get back...");
   }
 
   private void runPrimary() {
       // First do the in-process unwinding.
-      if (TEST_LOCAL_UNWINDING && !foo()) {
+      if (TEST_LOCAL_UNWINDING && !foo(false)) {
           System.out.println("Unwinding self failed.");
       }
 
@@ -138,19 +134,8 @@
       }
   }
 
-  public boolean foo() {
-      // Call bar via Arrays.binarySearch.
-      // This tests that we can unwind from framework code.
-      Main[] array = { this, this, this };
-      Arrays.binarySearch(array, 0, 3, this /* value */, this /* comparator */);
-      return passed;
-  }
-
-  public int compare(Main lhs, Main rhs) {
-      passed = bar(secondary);
-      // Returning "equal" ensures that we terminate search
-      // after first item and thus call bar() only once.
-      return 0;
+  public boolean foo(boolean b) {
+      return bar(b);
   }
 
   public boolean bar(boolean b) {