chore: add error throwing utility (#19803)
* chore: add error throwing utility * feedback from review * DRY out repeated isolate calls
This commit is contained in:
parent
8f1c51eaea
commit
43e6d7fe88
7 changed files with 118 additions and 4 deletions
|
@ -12,6 +12,7 @@
|
|||
#include "base/values.h"
|
||||
#include "native_mate/handle.h"
|
||||
#include "shell/browser/api/event_emitter.h"
|
||||
#include "shell/common/error_util.h"
|
||||
#include "shell/common/promise_util.h"
|
||||
|
||||
#if defined(OS_WIN)
|
||||
|
@ -95,7 +96,8 @@ class SystemPreferences : public mate::EventEmitter<SystemPreferences>
|
|||
void RemoveUserDefault(const std::string& name);
|
||||
bool IsSwipeTrackingFromScrollEventsEnabled();
|
||||
|
||||
std::string GetSystemColor(const std::string& color, mate::Arguments* args);
|
||||
std::string GetSystemColor(util::ErrorThrower thrower,
|
||||
const std::string& color);
|
||||
|
||||
bool CanPromptTouchID();
|
||||
v8::Local<v8::Promise> PromptTouchID(v8::Isolate* isolate,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue