Conversation
- Added null checks for currentWebView() in MainWindow to prevent crashes. - Fixed memory leaks in webview.h (win32_edge_engine and webview class). - Resolved static manager leaks in MainWindow and main.cpp. - Improved URL sanitization using QUrl::fromUserInput. - Replaced magic numbers with named constants in QNativeWebView. - Enhanced internationalization (i18n) by wrapping strings in tr(). - Removed blocking sleep in clearData(). - Improved binding management in webview class to avoid leaks on overwrite.
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
This submission addresses several critical and non-critical issues in the Split Browser codebase:
Crash Prevention: Added null-pointer checks for
currentWebView()inMainWindow's slots. Previously, actions like toggling fullscreen or adding a bookmark would crash the application if no tabs were open.Memory Leak Fixes:
win32_edge_enginewhereLPWSTRstrings from WebView2 were not freed withCoTaskMemFree.get_title()andget_url()to return class-managed strings instead of leakingnew char[].webviewclass to clean up itsbindingsmap. Added a safety mechanism to correctly identify and deletesync_binding_ctx_tpointers while avoiding user-provided pointers.MainWindow::cleanup()to properly delete the staticHistoryManagerandBookmarksManagerinstances upon application exit.Code Quality & UI:
sanitizeUrlto useQUrl::fromUserInput, making it significantly more robust than the previous hardcoded TLD-based logic.clearData()that was unnecessarily freezing the UI thread.QEvent::FocusIn).tr()and adopted the recommended.arg()pattern for variable interpolation in translations.These changes collectively improve the stability, performance, and maintainability of the application.
PR created automatically by Jules for task 7958240601656317970 started by @niutech