Remove reprocessing in desugared library lambdas

Bug: b/236937595
Change-Id: I52b10af021f8264f7045d6d9d515b08fc9907a32
diff --git a/src/main/java/com/android/tools/r8/ir/desugar/LambdaClass.java b/src/main/java/com/android/tools/r8/ir/desugar/LambdaClass.java
index e348356..fb51c23 100644
--- a/src/main/java/com/android/tools/r8/ir/desugar/LambdaClass.java
+++ b/src/main/java/com/android/tools/r8/ir/desugar/LambdaClass.java
@@ -685,18 +685,11 @@
                     return newMethod;
                   });
       if (replacement != null) {
-        // Since we've copied the code object from an existing method, the code should already be
-        // processed, and thus we don't need to schedule it for processing in D8.
+        // Since we've copied the code object from an existing method from the same class, the
+        // code is already processed, and thus we don't need to schedule it for processing in D8.
         assert !appView.options().isGeneratingClassFiles() || replacement.getCode().isCfCode();
         assert !appView.options().isGeneratingDex() || replacement.getCode().isDexCode();
-        ProgramMethod newMethod = new ProgramMethod(implMethodHolder, replacement);
-        // TODO(b/236937595): Investigate why processing is needed here only in desugared library
-        // compilation.
-        if (appView.options().isDesugaredLibraryCompilation()) {
-          assert appView.options().isGeneratingClassFiles();
-          needsProcessingConsumer.accept(newMethod);
-        }
-        return newMethod;
+        return new ProgramMethod(implMethodHolder, replacement);
       }
       // The method might already have been moved by another invoke-dynamic targeting it.
       // If so, it must be defined on the holder.
@@ -775,18 +768,11 @@
                     return newMethod;
                   });
       if (replacement != null) {
-        // Since we've copied the code object from an existing method, the code should already be
-        // processed, and thus we don't need to schedule it for processing in D8.
+        // Since we've copied the code object from an existing method from the same class, the
+        // code is already processed, and thus we don't need to schedule it for processing in D8.
         assert !appView.options().isGeneratingClassFiles() || replacement.getCode().isCfCode();
         assert !appView.options().isGeneratingDex() || replacement.getCode().isDexCode();
-        ProgramMethod newMethod = new ProgramMethod(implMethodHolder, replacement);
-        // TODO(b/236937595): Investigate why processing is needed here only in desugared library
-        // compilation.
-        if (appView.options().isDesugaredLibraryCompilation()) {
-          assert appView.options().isGeneratingClassFiles();
-          needsProcessingConsumer.accept(newMethod);
-        }
-        return newMethod;
+        return new ProgramMethod(implMethodHolder, replacement);
       }
       // The method might already have been moved by another invoke-dynamic targeting it.
       // If so, it must be defined on the holder.