Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Mullvad Browser
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
The Tor Project
Applications
Mullvad Browser
Commits
1cb8d16a
Commit
1cb8d16a
authored
Feb 20, 2024
by
Pier Angelo Vendrame
Browse files
Options
Downloads
Patches
Plain Diff
fixup! MB 80: Enable Mullvad Browser as a default browser
Debugging faciliites.
parent
587a2073
Branches
Branches containing commit
Tags
mullvad-browser-115.9.0esr-13.5-1-build1
Tags containing commit
1 merge request
!111
MB 274: Rebase alpha onto 115.9.0esr
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
toolkit/mozapps/defaultagent/EventLog.h
+17
-6
17 additions, 6 deletions
toolkit/mozapps/defaultagent/EventLog.h
toolkit/mozapps/defaultagent/SetDefaultBrowser.cpp
+10
-0
10 additions, 0 deletions
toolkit/mozapps/defaultagent/SetDefaultBrowser.cpp
with
27 additions
and
6 deletions
toolkit/mozapps/defaultagent/EventLog.h
+
17
−
6
View file @
1cb8d16a
...
...
@@ -7,7 +7,7 @@
#ifndef __DEFAULT_BROWSER_AGENT_EVENT_LOG_H__
#define __DEFAULT_BROWSER_AGENT_EVENT_LOG_H__
#include
"mozilla/Types.h"
#include
<cwchar>
MOZ_BEGIN_EXTERN_C
...
...
@@ -15,10 +15,21 @@ extern MOZ_EXPORT const wchar_t* gWinEventLogSourceName;
MOZ_END_EXTERN_C
#include
"mozilla/WindowsEventLog.h"
// This is not compatible with Mingw.
#ifdef LOG_ERRORS_FILE
extern
FILE
*
gLogFile
;
# define LOG_ERROR(hr) \
if (gLogFile) { \
fprintf(gLogFile, "Error in %s:%d: 0x%X\r\n", __FILE__, __LINE__, \
(unsigned int)hr); \
}
# define LOG_ERROR_MESSAGE(format, ...) \
if (gLogFile) { \
fwprintf(gLogFile, format __VA_OPT__(, ) __VA_ARGS__); \
fputs("\r\n", gLogFile); \
}
#else
# define LOG_ERROR(hr)
# define LOG_ERROR_MESSAGE(format, ...)
#endif
#endif // __DEFAULT_BROWSER_AGENT_EVENT_LOG_H__
This diff is collapsed.
Click to expand it.
toolkit/mozapps/defaultagent/SetDefaultBrowser.cpp
+
10
−
0
View file @
1cb8d16a
...
...
@@ -364,12 +364,22 @@ HRESULT SetDefaultExtensionHandlersUserChoiceImpl(
return
S_OK
;
}
#ifdef LOG_ERRORS_FILE
FILE
*
gLogFile
;
#endif
// Simplified version of wmain that uses only this file from main.cpp.
int
wmain
(
int
argc
,
wchar_t
**
argv
)
{
if
(
argc
<
3
||
!
argv
[
1
]
||
!
argv
[
2
])
{
return
E_INVALIDARG
;
}
#ifdef LOG_ERRORS_FILE
std
::
unique_ptr
<
FILE
,
decltype
(
&
fclose
)
>
logFile
(
fopen
(
LOG_ERRORS_FILE
,
"a+"
),
&
fclose
);
gLogFile
=
logFile
.
get
();
#endif
HRESULT
hr
=
CoInitializeEx
(
nullptr
,
COINIT_MULTITHREADED
);
if
(
FAILED
(
hr
))
{
LOG_ERROR
(
hr
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment