Case studies
#powershell#debugging#windows#electron#docker#pterodactyl#python#csharp#wpf#bash#security#cpp#git#performance#ci#nodejs#pyside6#react-native
4 posts · #cpp
Clear filters·6 min read

Light Browser · Story
One parser branch took 215 sites offline in my browser
Cosmetic filter rules I did not support fell through to the hosts-file branch and became blocked domains. chatgpt.com, bing.com and instagram.com stopped loading. Here is the line that did it.
In short
- Filter lines I did not understand were not skipped. They fell into the last branch of the parser and were read as hostnames.
- The fix is an explicit skip for four cosmetic syntaxes, plus a stricter rule for what counts as a trailing comment.
- The same commit made $third-party rules fire only on cross-site requests.
#cpp#adblock#debugging#parsing
·6 min read

Light Browser · Story
Why my browser signed everyone out: the host exited first
Chromium writes its cookie store while it shuts down, and my Win32 shell quit before it finished. The fix was a shutdown barrier that waits for the engine process to exit.
In short
- Chromium saves the cookie database, site storage and an encryption key during engine shutdown. My shell closed its window and quit first.
- The fix is TeardownEngine: close every WebView, drop the environment, then wait on the engine's process handle.
- The same barrier now covers Windows sign-out, the updater restart, deep sleep and engine crashes.
#cpp#webview2#windows#debugging#shutdown
·6 min read

Light Browser · Story
My browser's import feature looked exactly like an info-stealer
Reading other browsers' saved logins is what credential stealers do, so antivirus flagged it. I moved the code into a separate on-demand exe and made the installer per-user.
In short
- Profile-reading and DPAPI code moved out of LightBrowser.exe into a separate lbimport.exe, downloaded only when someone clicks import.
- The tracked main build went from 2,345,984 to 1,323,008 bytes.
- A second commit made the installer per-user, so no UAC "unknown publisher" prompt appears on install or update.
#cpp#windows#security#antivirus#installer
·5 min read

Light Browser · Story
The memory saver that made Figma run out of memory
I added Chromium's low-end mode to cut my browser's RAM, and about seven hours later removed it. It halves V8 heap limits, so heavy apps died with out-of-memory exits.
In short
- --enable-low-end-device-mode cut idle RAM, but it halves V8 heap limits, which heavy apps like Figma and Google Docs cannot live with.
- The fix removed the flag, raised the renderer cap from 4 to 16, and throttled my own RAM cascade so it stops squeezing the last open page.
- The crash page now says why a tab died, including "out of memory" and the exit code.
#cpp#webview2#chromium#memory#debugging