From 8e3b86578416030677924ea16bb79335a6c60232 Mon Sep 17 00:00:00 2001 From: William Sanville Date: Mon, 30 Sep 2024 12:09:04 -0700 Subject: [PATCH] Skip over configured methods that don't exist Summary: Make it easier to configure the pass and roll out changes to the app source code independently. Reviewed By: thezhangwei Differential Revision: D63579884 fbshipit-source-id: 7ab7d1dbd1767afcd52f90973fbc64c805916b72 --- opt/wrapped-primitives/WrappedPrimitivesPass.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/opt/wrapped-primitives/WrappedPrimitivesPass.cpp b/opt/wrapped-primitives/WrappedPrimitivesPass.cpp index 081ad32f83..5519374b85 100644 --- a/opt/wrapped-primitives/WrappedPrimitivesPass.cpp +++ b/opt/wrapped-primitives/WrappedPrimitivesPass.cpp @@ -94,8 +94,9 @@ void WrappedPrimitivesPass::bind_config() { auto api = members.at(0); TRACE(WP, 2, "Checking for API '%s'", api.c_str()); auto wrapped_api = DexMethod::get_method(api); - always_assert_log(wrapped_api != nullptr, "Method %s does not exist", - api.c_str()); + if (wrapped_api == nullptr) { + continue; + } std::string unwrapped_api_desc; JsonWrapper jobj = JsonWrapper(obj); jobj.get(api.c_str(), "", unwrapped_api_desc);