refactor: add EmitWarning(v8::Isolate*)
helper (#43736)
refactor: add `EmitWarning(v8::Isolate*)` helper (#43722) * refactor: add EmitWarning(Isolate*, ...) warning * chore: remove EmitWarning(node::Environment*, ...) * chore: add code comments * fixup! refactor: add EmitWarning(Isolate*, ...) warning * chore: remove unused node #includes
This commit is contained in:
parent
18bd295873
commit
d11c840cf0
18 changed files with 69 additions and 84 deletions
|
@ -24,8 +24,7 @@
|
|||
#include "shell/common/gin_converters/content_converter.h"
|
||||
#include "shell/common/gin_converters/hid_device_info_converter.h"
|
||||
#include "shell/common/gin_converters/value_converter.h"
|
||||
#include "shell/common/node_includes.h"
|
||||
#include "shell/common/process_util.h"
|
||||
#include "shell/common/node_util.h"
|
||||
#include "ui/base/l10n/l10n_util.h"
|
||||
|
||||
namespace {
|
||||
|
@ -204,10 +203,9 @@ void HidChooserController::OnDeviceChosen(gin::Arguments* args) {
|
|||
}
|
||||
RunCallback(std::move(devices));
|
||||
} else {
|
||||
v8::Isolate* isolate = JavascriptEnvironment::GetIsolate();
|
||||
node::Environment* env = node::Environment::GetCurrent(isolate);
|
||||
EmitWarning(env, "The device id " + device_id + " was not found.",
|
||||
"UnknownHIDDeviceId");
|
||||
util::EmitWarning(
|
||||
base::StrCat({"The device id ", device_id, " was not found."}),
|
||||
"UnknownHIDDeviceId");
|
||||
RunCallback({});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue