| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 08e55e3 commit a5d2b66
11 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -105,7 +105,7 @@ void InternalCallbackScope::Close() { | |||
| 105 | 105 | ||
| 106 | 106 | if (!env_->can_call_into_js()) return; | |
| 107 | 107 | ||
| 108 | - OnScopeLeave weakref_cleanup([&]() { env_->RunWeakRefCleanup(); }); | ||
| 108 | + auto weakref_cleanup = OnScopeLeave([&]() { env_->RunWeakRefCleanup(); }); | ||
| 109 | 109 | ||
| 110 | 110 | if (!tick_info->has_tick_scheduled()) { | |
| 111 | 111 | MicrotasksScope::PerformCheckpoint(env_->isolate()); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -153,7 +153,7 @@ void* wrapped_dlopen(const char* filename, int flags) { | |||
| 153 | 153 | Mutex::ScopedLock lock(dlhandles_mutex); | |
| 154 | 154 | ||
| 155 | 155 | uv_fs_t req; | |
| 156 | - OnScopeLeave cleanup([&]() { uv_fs_req_cleanup(&req); }); | ||
| 156 | + auto cleanup = OnScopeLeave([&]() { uv_fs_req_cleanup(&req); }); | ||
| 157 | 157 | int rc = uv_fs_stat(nullptr, &req, filename, nullptr); | |
| 158 | 158 | ||
| 159 | 159 | if (rc != 0) { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -132,7 +132,7 @@ Local<Array> RealEnvStore::Enumerate(Isolate* isolate) const { | |||
| 132 | 132 | uv_env_item_t* items; | |
| 133 | 133 | int count; | |
| 134 | 134 | ||
| 135 | - OnScopeLeave cleanup([&]() { uv_os_free_environ(items, count); }); | ||
| 135 | + auto cleanup = OnScopeLeave([&]() { uv_os_free_environ(items, count); }); | ||
| 136 | 136 | CHECK_EQ(uv_os_environ(&items, &count), 0); | |
| 137 | 137 | ||
| 138 | 138 | MaybeStackBuffer<Local<Value>, 256> env_v(count); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -620,7 +620,7 @@ class Parser : public AsyncWrap, public StreamListener { | |||
| 620 | 620 | // Once we’re done here, either indicate that the HTTP parser buffer | |
| 621 | 621 | // is free for re-use, or free() the data if it didn’t come from there | |
| 622 | 622 | // in the first place. | |
| 623 | - OnScopeLeave on_scope_leave([&]() { | ||
| 623 | + auto on_scope_leave = OnScopeLeave([&]() { | ||
| 624 | 624 | if (buf.base == env()->http_parser_buffer()) | |
| 625 | 625 | env()->set_http_parser_buffer_in_use(false); | |
| 626 | 626 | else | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -217,7 +217,7 @@ class ConverterObject : public BaseObject, Converter { | |||
| 217 | 217 | result.AllocateSufficientStorage(limit); | |
| 218 | 218 | ||
| 219 | 219 | UBool flush = (flags & CONVERTER_FLAGS_FLUSH) == CONVERTER_FLAGS_FLUSH; | |
| 220 | - OnScopeLeave cleanup([&]() { | ||
| 220 | + auto cleanup = OnScopeLeave([&]() { | ||
| 221 | 221 | if (flush) { | |
| 222 | 222 | // Reset the converter state. | |
| 223 | 223 | converter->bomSeen_ = false; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -835,7 +835,7 @@ void GetOptions(const FunctionCallbackInfo<Value>& args) { | |||
| 835 | 835 | per_process::cli_options->per_isolate = env->isolate_data()->options(); | |
| 836 | 836 | auto original_per_env = per_process::cli_options->per_isolate->per_env; | |
| 837 | 837 | per_process::cli_options->per_isolate->per_env = env->options(); | |
| 838 | - OnScopeLeave on_scope_leave([&]() { | ||
| 838 | + auto on_scope_leave = OnScopeLeave([&]() { | ||
| 839 | 839 | per_process::cli_options->per_isolate->per_env = original_per_env; | |
| 840 | 840 | per_process::cli_options->per_isolate = original_per_isolate; | |
| 841 | 841 | }); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -302,7 +302,7 @@ static void GetUserInfo(const FunctionCallbackInfo<Value>& args) { | |||
| 302 | 302 | return args.GetReturnValue().SetUndefined(); | |
| 303 | 303 | } | |
| 304 | 304 | ||
| 305 | - OnScopeLeave free_passwd([&]() { uv_os_free_passwd(&pwd); }); | ||
| 305 | + auto free_passwd = OnScopeLeave([&]() { uv_os_free_passwd(&pwd); }); | ||
| 306 | 306 | ||
| 307 | 307 | Local<Value> error; | |
| 308 | 308 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -355,7 +355,7 @@ static void DebugProcess(const FunctionCallbackInfo<Value>& args) { | |||
| 355 | 355 | LPTHREAD_START_ROUTINE* handler = nullptr; | |
| 356 | 356 | DWORD pid = 0; | |
| 357 | 357 | ||
| 358 | - OnScopeLeave cleanup([&]() { | ||
| 358 | + auto cleanup = OnScopeLeave([&]() { | ||
| 359 | 359 | if (process != nullptr) CloseHandle(process); | |
| 360 | 360 | if (thread != nullptr) CloseHandle(thread); | |
| 361 | 361 | if (handler != nullptr) UnmapViewOfFile(handler); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -182,7 +182,7 @@ void Worker::Run() { | |||
| 182 | 182 | SealHandleScope outer_seal(isolate_); | |
| 183 | 183 | ||
| 184 | 184 | DeleteFnPtr<Environment, FreeEnvironment> env_; | |
| 185 | - OnScopeLeave cleanup_env([&]() { | ||
| 185 | + auto cleanup_env = OnScopeLeave([&]() { | ||
| 186 | 186 | if (!env_) return; | |
| 187 | 187 | env_->set_can_call_into_js(false); | |
| 188 | 188 | Isolate::DisallowJavascriptExecutionScope disallow_js(isolate_, | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -386,7 +386,7 @@ class CompressionStream : public AsyncWrap, public ThreadPoolWork { | |||
| 386 | 386 | // v8 land! | |
| 387 | 387 | void AfterThreadPoolWork(int status) override { | |
| 388 | 388 | AllocScope alloc_scope(this); | |
| 389 | - OnScopeLeave on_scope_leave([&]() { Unref(); }); | ||
| 389 | + auto on_scope_leave = OnScopeLeave([&]() { Unref(); }); | ||
| 390 | 390 | ||
| 391 | 391 | write_in_progress_ = false; | |
| 392 | 392 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments