From c4f83c3225d386b445f59596e4f5e8610e02fc10 Mon Sep 17 00:00:00 2001 From: Karl Nelson Date: Sat, 5 Sep 2026 12:12:17 -0700 Subject: [PATCH] Fix GetCefValueFromJNIMap dropping all data native/jni_util.cpp's GetCefValueFromJNIMap built a populated CefDictionaryValue from the Java Map but returned a brand-new, empty CefValue instead of attaching it via SetDictionary() -- its List sibling does this correctly via SetList(). Every Java Map ever passed to CefRequestContext.setPreference() silently lost all its data as a result. Master already has CefRequestContextPreferencesTest's setPreferenceWithEachUnmappedJavaTypeDoesNotThrow(), which exercises this code path (added by an earlier, unrelated backport) but didn't catch this bug since no settable dict/list preference exists to round-trip through. Verified against a full local suite run: 123/123 passing. Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_01HBFmQs6JDypYP5qdC99yDq --- native/jni_util.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/native/jni_util.cpp b/native/jni_util.cpp index 60bd2def..e1849807 100644 --- a/native/jni_util.cpp +++ b/native/jni_util.cpp @@ -407,6 +407,7 @@ CefRefPtr GetCefValueFromJNIMap(JNIEnv* env, const jobject& obj) { } CefRefPtr value = CefValue::Create(); + value->SetDictionary(dict); return value; }