| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent cf03fe5 commit 3de9dd9
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -243,9 +243,9 @@ class InternalCallbackScope { | |||
| 243 | 243 | ||
| 244 | 244 | class DebugSealHandleScope { | |
| 245 | 245 | public: | |
| 246 | - explicit inline DebugSealHandleScope(v8::Isolate* isolate) | ||
| 246 | + explicit inline DebugSealHandleScope(v8::Isolate* isolate = nullptr) | ||
| 247 | 247 | #ifdef DEBUG | |
| 248 | - : actual_scope_(isolate) | ||
| 248 | + : actual_scope_(isolate != nullptr ? isolate : v8::Isolate::GetCurrent()) | ||
| 249 | 249 | #endif | |
| 250 | 250 | {} | |
| 251 | 251 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -92,29 +92,29 @@ void StreamResource::RemoveStreamListener(StreamListener* listener) { | |||
| 92 | 92 | } | |
| 93 | 93 | ||
| 94 | 94 | uv_buf_t StreamResource::EmitAlloc(size_t suggested_size) { | |
| 95 | - DebugSealHandleScope handle_scope(v8::Isolate::GetCurrent()); | ||
| 95 | + DebugSealHandleScope seal_handle_scope; | ||
| 96 | 96 | return listener_->OnStreamAlloc(suggested_size); | |
| 97 | 97 | } | |
| 98 | 98 | ||
| 99 | 99 | void StreamResource::EmitRead(ssize_t nread, const uv_buf_t& buf) { | |
| 100 | - DebugSealHandleScope handle_scope(v8::Isolate::GetCurrent()); | ||
| 100 | + DebugSealHandleScope seal_handle_scope; | ||
| 101 | 101 | if (nread > 0) | |
| 102 | 102 | bytes_read_ += static_cast<uint64_t>(nread); | |
| 103 | 103 | listener_->OnStreamRead(nread, buf); | |
| 104 | 104 | } | |
| 105 | 105 | ||
| 106 | 106 | void StreamResource::EmitAfterWrite(WriteWrap* w, int status) { | |
| 107 | - DebugSealHandleScope handle_scope(v8::Isolate::GetCurrent()); | ||
| 107 | + DebugSealHandleScope seal_handle_scope; | ||
| 108 | 108 | listener_->OnStreamAfterWrite(w, status); | |
| 109 | 109 | } | |
| 110 | 110 | ||
| 111 | 111 | void StreamResource::EmitAfterShutdown(ShutdownWrap* w, int status) { | |
| 112 | - DebugSealHandleScope handle_scope(v8::Isolate::GetCurrent()); | ||
| 112 | + DebugSealHandleScope seal_handle_scope; | ||
| 113 | 113 | listener_->OnStreamAfterShutdown(w, status); | |
| 114 | 114 | } | |
| 115 | 115 | ||
| 116 | 116 | void StreamResource::EmitWantsWrite(size_t suggested_size) { | |
| 117 | - DebugSealHandleScope handle_scope(v8::Isolate::GetCurrent()); | ||
| 117 | + DebugSealHandleScope seal_handle_scope; | ||
| 118 | 118 | listener_->OnStreamWantsWrite(suggested_size); | |
| 119 | 119 | } | |
| 120 | 120 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments