Pass observed pointers by non-const ref.
Currently, we pass these as pointer to ObservedPtr<> per the old style
guide recomendation, but this has lead to at least one bug where this
pointer to pointer arrangement checked the wrong level of pointer.
The style guide now permits this, but we still like to use sparingly.
Change-Id: I11d289042264872063074e68b56736233bff500a
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/85392
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
diff --git a/fxjs/cjs_field.cpp b/fxjs/cjs_field.cpp
index 6469d69..70027fe 100644
--- a/fxjs/cjs_field.cpp
+++ b/fxjs/cjs_field.cpp
@@ -2509,7 +2509,7 @@
if (pWidget) {
ObservedPtr<CPDFSDK_Annot> pObserved(pWidget);
- m_pFormFillEnv->SetFocusAnnot(&pObserved);
+ m_pFormFillEnv->SetFocusAnnot(pObserved);
}
return CJS_Result::Success();