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
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
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
1 year ago
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
No related branches found
No related tags found
1 merge request
!111
MB 274: Rebase alpha onto 115.9.0esr
Changes
2
Hide 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.
#define LOG_ERROR(hr)
#define LOG_ERROR_MESSAGE(format, ...)
#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
register
or
sign in
to comment