chore: stop using v8::Locker everywhere (#34078)
This commit is contained in:
parent
a2a8e493eb
commit
d8a7219d07
23 changed files with 0 additions and 43 deletions
|
@ -250,7 +250,6 @@ void ElectronBindings::DidReceiveMemoryDump(
|
|||
bool success,
|
||||
std::unique_ptr<memory_instrumentation::GlobalMemoryDump> global_dump) {
|
||||
v8::Isolate* isolate = promise.isolate();
|
||||
gin_helper::Locker locker(isolate);
|
||||
v8::HandleScope handle_scope(isolate);
|
||||
gin_helper::MicrotasksScope microtasks_scope(isolate, true);
|
||||
v8::Context::Scope context_scope(
|
||||
|
|
|
@ -61,7 +61,6 @@ class EventEmitter : public gin_helper::Wrappable<T> {
|
|||
// this.emit(name, new Event(), args...);
|
||||
template <typename... Args>
|
||||
bool Emit(base::StringPiece name, Args&&... args) {
|
||||
v8::Locker locker(isolate());
|
||||
v8::HandleScope handle_scope(isolate());
|
||||
v8::Local<v8::Object> wrapper = GetWrapper();
|
||||
if (wrapper.IsEmpty())
|
||||
|
|
|
@ -14,7 +14,6 @@ class Pinnable {
|
|||
protected:
|
||||
// Prevent the object from being garbage collected until Unpin() is called.
|
||||
void Pin(v8::Isolate* isolate) {
|
||||
v8::Locker locker(isolate);
|
||||
v8::HandleScope scope(isolate);
|
||||
v8::Local<v8::Value> wrapper;
|
||||
if (static_cast<T*>(this)->GetWrapper(isolate).ToLocal(&wrapper)) {
|
||||
|
|
|
@ -24,7 +24,6 @@ PromiseBase::~PromiseBase() = default;
|
|||
PromiseBase& PromiseBase::operator=(PromiseBase&&) = default;
|
||||
|
||||
v8::Maybe<bool> PromiseBase::Reject() {
|
||||
gin_helper::Locker locker(isolate());
|
||||
v8::HandleScope handle_scope(isolate());
|
||||
gin_helper::MicrotasksScope microtasks_scope(isolate());
|
||||
v8::Context::Scope context_scope(GetContext());
|
||||
|
@ -33,7 +32,6 @@ v8::Maybe<bool> PromiseBase::Reject() {
|
|||
}
|
||||
|
||||
v8::Maybe<bool> PromiseBase::Reject(v8::Local<v8::Value> except) {
|
||||
gin_helper::Locker locker(isolate());
|
||||
v8::HandleScope handle_scope(isolate());
|
||||
gin_helper::MicrotasksScope microtasks_scope(isolate());
|
||||
v8::Context::Scope context_scope(GetContext());
|
||||
|
@ -42,7 +40,6 @@ v8::Maybe<bool> PromiseBase::Reject(v8::Local<v8::Value> except) {
|
|||
}
|
||||
|
||||
v8::Maybe<bool> PromiseBase::RejectWithErrorMessage(base::StringPiece message) {
|
||||
gin_helper::Locker locker(isolate());
|
||||
v8::HandleScope handle_scope(isolate());
|
||||
gin_helper::MicrotasksScope microtasks_scope(isolate());
|
||||
v8::Context::Scope context_scope(GetContext());
|
||||
|
@ -85,7 +82,6 @@ v8::Local<v8::Promise> Promise<void>::ResolvedPromise(v8::Isolate* isolate) {
|
|||
}
|
||||
|
||||
v8::Maybe<bool> Promise<void>::Resolve() {
|
||||
gin_helper::Locker locker(isolate());
|
||||
v8::HandleScope handle_scope(isolate());
|
||||
gin_helper::MicrotasksScope microtasks_scope(isolate());
|
||||
v8::Context::Scope context_scope(GetContext());
|
||||
|
|
|
@ -628,8 +628,6 @@ void NodeBindings::UvRunOnce() {
|
|||
if (!env)
|
||||
return;
|
||||
|
||||
// Use Locker in browser process.
|
||||
gin_helper::Locker locker(env->isolate());
|
||||
v8::HandleScope handle_scope(env->isolate());
|
||||
|
||||
// Enter node context while dealing with uv events.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue