Repository navigation
Fix GetCefValueFromJNIMap dropping all data - #40
Merged
Merged
Conversation
3 tasks done
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #40 +/- ##
============================================
- Coverage 38.01% 37.98% -0.03%
+ Complexity 735 732 -3
============================================
Files 243 243
Lines 14863 14864 +1
Branches 2449 2449
============================================
- Hits 5650 5646 -4
- Misses 8011 8012 +1
- Partials 1202 1206 +4 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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 <[email protected]> Claude-Session: https://claude.ai/code/session_01HBFmQs6JDypYP5qdC99yDq
Thrameos
force-pushed
the
backport/jni-map-value-dropped
branch
from
September 5, 2026 21:23
93c99ee to
c4f83c3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
native/jni_util.cpp'sGetCefValueFromJNIMapbuilt a populatedCefDictionaryValuefrom the JavaMapbut returned a brand-new, emptyCefValueinstead of attaching it viaSetDictionary()-- itsListsibling (GetCefValueFromJNIList) does this correctly viaSetList().Mapever passed toCefRequestContext.setPreference()silently lost all its data as a result.Test plan
masteralready hasCefRequestContextPreferencesTest.setPreferenceWithEachUnmappedJavaTypeDoesNotThrow()(landed via an earlier, unrelated backport), which exercisesGetCefValueFromJNIMapviasetPreference()-- it didn't catch this bug on its own since no settable dict/list preference exists to round-trip through and assert on directly, but the fixed code is what it now runs.libjcef.socleanly (ninja jcef), zero compile errors.One-line, fully self-contained fix -- no new test file needed since master already has the exercising test. Same shape as PR #1, #36, #37, #38, #39.
🤖 Generated with Claude Code
https://claude.ai/code/session_01HBFmQs6JDypYP5qdC99yDq