Convert arg string to utf8 on Windows
This commit is contained in:
parent
e3160126d6
commit
b549b20d2c
1 changed files with 7 additions and 1 deletions
|
@ -5,6 +5,7 @@
|
||||||
#include "atom/browser/node_debugger.h"
|
#include "atom/browser/node_debugger.h"
|
||||||
|
|
||||||
#include "base/command_line.h"
|
#include "base/command_line.h"
|
||||||
|
#include "base/strings/utf_string_conversions.h"
|
||||||
#include "libplatform/libplatform.h"
|
#include "libplatform/libplatform.h"
|
||||||
|
|
||||||
namespace atom {
|
namespace atom {
|
||||||
|
@ -21,8 +22,13 @@ void NodeDebugger::Start() {
|
||||||
return;
|
return;
|
||||||
|
|
||||||
node::DebugOptions options;
|
node::DebugOptions options;
|
||||||
for (auto& arg : base::CommandLine::ForCurrentProcess()->argv())
|
for (auto& arg : base::CommandLine::ForCurrentProcess()->argv()) {
|
||||||
|
#if defined(OS_WIN)
|
||||||
|
options.ParseOption(base::UTF16ToUTF8(arg));
|
||||||
|
#else
|
||||||
options.ParseOption(arg);
|
options.ParseOption(arg);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
if (options.inspector_enabled()) {
|
if (options.inspector_enabled()) {
|
||||||
// Use custom platform since the gin platform does not work correctly
|
// Use custom platform since the gin platform does not work correctly
|
||||||
|
|
Loading…
Reference in a new issue