fix: fall back to default logs path in getPath('logs') (#19653)
This commit is contained in:
parent
0851697cb7
commit
1dc02e6dbc
7 changed files with 89 additions and 19 deletions
|
@ -9,6 +9,7 @@
|
|||
#include <vector>
|
||||
|
||||
#include "base/macros.h"
|
||||
#include "base/optional.h"
|
||||
#include "native_mate/converter.h"
|
||||
|
||||
namespace mate {
|
||||
|
@ -34,6 +35,17 @@ class Arguments {
|
|||
return ConvertFromV8(isolate_, info_->Data(), out);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
bool GetNext(base::Optional<T>* out) {
|
||||
if (next_ >= info_->Length())
|
||||
return true;
|
||||
v8::Local<v8::Value> val = (*info_)[next_];
|
||||
bool success = ConvertFromV8(isolate_, val, out);
|
||||
if (success)
|
||||
next_++;
|
||||
return success;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
bool GetNext(T* out) {
|
||||
if (next_ >= info_->Length()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue