- Added mozilla/BasePrincipal.h include alongside existing mozilla/OriginAttributes.h
- Required for BasePrincipal::Cast() usage in font fingerprinting protection code
- Resolves missing symbol errors when accessing principal casting functionality
- Updated line numbers in config.patch for browser/installer/package-manifest.in (260→250, 228→235)
- Updated line numbers in fingerprint-injection.patch across multiple files
- Changed nsScreen::GetAvailRect() to use GetTopWindowInnerRectForRFP() instead of GetWindowInnerRect()
- Updated line numbers in rust-gentoo-musl.patch (404→412)
- Adjusted context lines to match Firefox 146 codebase structure
- Added --binary flag to preserve line endings (CRLF vs LF)
- Removed -F3 (fuzz factor) flag
- Helps with cross-platform patching where line endings may differ
- Changed --fuzz=3 to -F3 for consistent short option format
- Added -l flag to ignore whitespace differences when applying patches
- Maintains --forward flag to skip already applied patches
- Added rtc namespace alias pointing to webrtc namespace
- Required for compatibility with code using rtc:: prefix for WebRTC types
- Placed after includes and before class declarations
- Added api/scoped_refptr.h include for scoped_refptr template
- Added rtc_base/ref_counted_object.h include for ref counting support
- Required by WebRTC API changes in Firefox 146
- Created third_party/libwebrtc/api/location.h stub header
- Added minimal Location class implementation with Current() static method
- Required by api/task_queue/task_queue_base.h for task posting debugging
- Header was missing in Firefox 146's WebRTC implementation
- Removed conditional logic for per-realm timezone overrides in getDateTimeInfo()
- Added comment explaining that per-realm timezones are disabled in favor of global timezone overrides via JS::SetTimeZoneOverride()
- Simplified getDateTimeInfo() to always return nullptr since DateTimeInfo was refactored to use std::string instead of RefPtr<TimeZoneString>
- Changed timeZoneOverride_ from RefPtr<JS::TimeZoneString> to std::string
- Updated all timeZoneOverride_ checks from pointer comparisons to empty() calls
- Replaced timeZoneOverride_->chars() with timeZoneOverride_.c_str() for string access
- Removed updateTimeZoneOverride() method and replaced with internalSetTimeZoneOverride()
- Removed DateTimeInfo constructor that took RefPtr<JS::TimeZone
- Removed duplicate timeZoneOverride_ member variable declaration from DateTimeInfo class
- Firefox 146 already has this member variable defined, causing redefinition errors
- Kept the original timeZoneOverride_ declaration that was already present in the base code
- Updated line numbers and context in intl/components/moz.build
- Changed TimeZone::TryCreate parameter from char16_t to char in TimeZone.cpp
- Added explicit reinterpret_cast for zoneID assignment to match new char-based API
- Removed MOZ_APP_VENDOR and MOZ_APP_PROFILE from configure.sh branding file
- Added note that these must be set via imply_option() in browser/moz.configure
- Updated disable-data-reporting-at-compile-time.patch to set MOZ_APP_VENDOR="Camoufox" and MOZ_APP_PROFILE="camoufox"
- Changed juggler components.conf to use "type" instead of "constructor" for Firefox 146+ compatibility
- Added automatic
- Created patch-upgrading-guide.md with step-by-step instructions for updating patches across Firefox versions
- Covers understanding patch system, preparation, general workflow, and common reject types
- Includes historical context patch merging section (no longer applicable after Firefox 146)
- Documents testing, validation, best practices, and complete example session
- Provides troubleshooting section for common issues and API changes
- Details
- Context said 'SetAcceptLanguages()' but hunk starts at line 2093
- Line 2093 is actually 'if (NS_SUCCEEDED(rv))' not the function
- Removed context to prevent patch from using wrong function for matching
- Changed from single line context (}) to 5 lines of context
- Include NS_SUCCEEDED, Assign, return rv, and closing brace
- This prevents fuzzy matching to wrong location
- Change from line 2113 to 2111 (closing brace before function)
- Change new line from 2127 to 2125
- Fix context from SetAcceptLanguages to closing brace
- OnLine(): Remove duplicate ShouldResistFingerprinting code (already in FF146)
- OnLine(): Update line numbers from 625 to 627 and fix hunk line count
- GetDoNotTrack(): Remove duplicate hunk for old implementation
- GetDoNotTrack(): Update line number from 702 to 704
- Fix fingerprint-injection.patch: remove duplicate BrowsingContext line and fix hunk header
- Fix font-hijacker.patch: add space to blank line 125
- Fix no-search-engines.patch: add missing context for getProvider call in UrlbarProviderInterventions
- Disable webgl-spoofing-TEMP.patch to avoid conflicts
- Fixed FontFaceImpl.h include context (added ServoStyleConsts.h context)
- Fixed moz.build line numbers (378 instead of 379) and removed obsolete ] line
- FontFaceImpl.h and moz.build now patch cleanly
- 6 rejects remaining (down from 8)
- Firefox 146 alphabetizes includes differently
- Moved from line 59 (after Document.h) to line 39 (after MathAlgorithms.h)
- CanvasRenderingContext2D.cpp now patches cleanly
- 11 rejects remaining (down from 13)
- Changed hunk line numbers from 2565/2583 to 2433/2451
- Previous hunks in patch shift file by ~130 lines
- Added context (outer case statements + extension check) for unique matching
- All 7 hunks now apply successfully
- Tested with temporary patch to find actual line numbers after partial application
Updated all 4 ClientWebGLContext hunk line numbers to match Firefox 146:
- RENDERER: 2575 → 2573
- VENDOR: 2586 → 2584
- COLOR_WRITEMASK: 2677 → 2676
- getShaderPrecision: 3093 → 3091
Still 21 failing hunks remain due to context mismatches in Firefox 146's
nested switch structure and other code refactoring.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
EOF
Fixed the Webdriver() function hunk in 1-leak-fixes.patch:
- Updated hunk context to match Firefox 146 structure
- Changed line number from 2318 to 2316 to match actual context
Progress:
- Reduced failing hunks from 22 → 21
- Reduced reject files from 13 → 12
- Navigator.cpp now completely resolved (all hunks apply)
Remaining: 21 hunks across 12 files, primarily due to Firefox 146
code structure changes (nested switches in WebGL, font system refactoring)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>