Fix incorrect mojo setup for commerce internals on iOS

Rather than passing an unretained pointer, this patch updates the iOS
setup to use a weak pointer. This should prevent crashing when the
system goes to close or rebind the interface.

Bug: 348771366
Change-Id: I7ab6483e9de119076cfa8e81a5ff834f820e7b45
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5660276
Commit-Queue: Matthew Jones <[email protected]>
Reviewed-by: David Maunder <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1319822}
diff --git a/components/commerce/ios/browser/commerce_internals_ui.mm b/components/commerce/ios/browser/commerce_internals_ui.mm
index b97a5f5..63ab83d 100644
--- a/components/commerce/ios/browser/commerce_internals_ui.mm
+++ b/components/commerce/ios/browser/commerce_internals_ui.mm
@@ -37,7 +37,7 @@
   web::WebUIIOSDataSource::Add(browser_state, source);
   web_ui->GetWebState()->GetInterfaceBinderForMainFrame()->AddInterface(
       base::BindRepeating(&CommerceInternalsUI::BindInterface,
-                          base::Unretained(this)));
+                          weak_factory_.GetWeakPtr()));
 }
 
 CommerceInternalsUI::~CommerceInternalsUI() {