GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — src: remove unnecessary Isolate::GetCurrent() calls · nodejs/node@3de9dd9

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • src
    • node_internals.h
    • stream_base-inl.h
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎src/node_internals.h‎

Copy file name to clipboardExpand all lines: src/node_internals.h
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,9 +243,9 @@ class InternalCallbackScope {
243243

244244
class DebugSealHandleScope {
245245
public:
246-
explicit inline DebugSealHandleScope(v8::Isolate* isolate)
246+
explicit inline DebugSealHandleScope(v8::Isolate* isolate = nullptr)
247247
#ifdef DEBUG
248-
: actual_scope_(isolate)
248+
: actual_scope_(isolate != nullptr ? isolate : v8::Isolate::GetCurrent())
249249
#endif
250250
{}
251251

Collapse file

‎src/stream_base-inl.h‎

Copy file name to clipboardExpand all lines: src/stream_base-inl.h
+5-5Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,29 +92,29 @@ void StreamResource::RemoveStreamListener(StreamListener* listener) {
9292
}
9393

9494
uv_buf_t StreamResource::EmitAlloc(size_t suggested_size) {
95-
DebugSealHandleScope handle_scope(v8::Isolate::GetCurrent());
95+
DebugSealHandleScope seal_handle_scope;
9696
return listener_->OnStreamAlloc(suggested_size);
9797
}
9898

9999
void StreamResource::EmitRead(ssize_t nread, const uv_buf_t& buf) {
100-
DebugSealHandleScope handle_scope(v8::Isolate::GetCurrent());
100+
DebugSealHandleScope seal_handle_scope;
101101
if (nread > 0)
102102
bytes_read_ += static_cast<uint64_t>(nread);
103103
listener_->OnStreamRead(nread, buf);
104104
}
105105

106106
void StreamResource::EmitAfterWrite(WriteWrap* w, int status) {
107-
DebugSealHandleScope handle_scope(v8::Isolate::GetCurrent());
107+
DebugSealHandleScope seal_handle_scope;
108108
listener_->OnStreamAfterWrite(w, status);
109109
}
110110

111111
void StreamResource::EmitAfterShutdown(ShutdownWrap* w, int status) {
112-
DebugSealHandleScope handle_scope(v8::Isolate::GetCurrent());
112+
DebugSealHandleScope seal_handle_scope;
113113
listener_->OnStreamAfterShutdown(w, status);
114114
}
115115

116116
void StreamResource::EmitWantsWrite(size_t suggested_size) {
117-
DebugSealHandleScope handle_scope(v8::Isolate::GetCurrent());
117+
DebugSealHandleScope seal_handle_scope;
118118
listener_->OnStreamWantsWrite(suggested_size);
119119
}
120120

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.