refactor: remove uses of v8::Isolate::GetCurrent (#24179)
This commit is contained in:
parent
563a8c83ea
commit
61a05caa78
24 changed files with 69 additions and 46 deletions
|
@ -5,6 +5,7 @@
|
|||
#include "shell/browser/api/ui_event.h"
|
||||
|
||||
#include "gin/data_object_builder.h"
|
||||
#include "shell/browser/javascript_environment.h"
|
||||
#include "ui/events/event_constants.h"
|
||||
#include "v8/include/v8.h"
|
||||
|
||||
|
@ -17,7 +18,7 @@ constexpr int mouse_button_flags =
|
|||
ui::EF_FORWARD_MOUSE_BUTTON);
|
||||
|
||||
v8::Local<v8::Object> CreateEventFromFlags(int flags) {
|
||||
v8::Isolate* isolate = v8::Isolate::GetCurrent();
|
||||
v8::Isolate* isolate = JavascriptEnvironment::GetIsolate();
|
||||
const int is_mouse_click = static_cast<bool>(flags & mouse_button_flags);
|
||||
return gin::DataObjectBuilder(isolate)
|
||||
.Set("shiftKey", static_cast<bool>(flags & ui::EF_SHIFT_DOWN))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue