Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 7a17cbf

Browse filesBrowse files
joyeecheungBethGriggs
authored andcommitted
src: register external references of TTYWrap for snapshot
PR-URL: #39961 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michael Dawson <midawson@redhat.com>
1 parent 00cca48 commit 7a17cbf
Copy full SHA for 7a17cbf

File tree

Expand file treeCollapse file tree

3 files changed

+13
-0
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

3 files changed

+13
-0
lines changed
Open diff view settings
Collapse file

‎src/node_external_reference.h‎

Copy file name to clipboardExpand all lines: src/node_external_reference.h
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ class ExternalReferenceRegistry {
6868
V(report) \
6969
V(task_queue) \
7070
V(tcp_wrap) \
71+
V(tty_wrap) \
7172
V(url) \
7273
V(util) \
7374
V(serdes) \
Collapse file

‎src/tty_wrap.cc‎

Copy file name to clipboardExpand all lines: src/tty_wrap.cc
+10Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
#include "env-inl.h"
2525
#include "handle_wrap.h"
2626
#include "node_buffer.h"
27+
#include "node_external_reference.h"
2728
#include "stream_base-inl.h"
2829
#include "stream_wrap.h"
2930
#include "util-inl.h"
@@ -40,6 +41,13 @@ using v8::Object;
4041
using v8::String;
4142
using v8::Value;
4243

44+
void TTYWrap::RegisterExternalReferences(ExternalReferenceRegistry* registry) {
45+
registry->Register(New);
46+
registry->Register(GetWindowSize);
47+
registry->Register(SetRawMode);
48+
registry->Register(IsTTY);
49+
}
50+
4351
void TTYWrap::Initialize(Local<Object> target,
4452
Local<Value> unused,
4553
Local<Context> context,
@@ -147,3 +155,5 @@ TTYWrap::TTYWrap(Environment* env,
147155
} // namespace node
148156

149157
NODE_MODULE_CONTEXT_AWARE_INTERNAL(tty_wrap, node::TTYWrap::Initialize)
158+
NODE_MODULE_EXTERNAL_REFERENCE(tty_wrap,
159+
node::TTYWrap::RegisterExternalReferences)
Collapse file

‎src/tty_wrap.h‎

Copy file name to clipboardExpand all lines: src/tty_wrap.h
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,15 @@
3030
namespace node {
3131

3232
class Environment;
33+
class ExternalReferenceRegistry;
3334

3435
class TTYWrap : public LibuvStreamWrap {
3536
public:
3637
static void Initialize(v8::Local<v8::Object> target,
3738
v8::Local<v8::Value> unused,
3839
v8::Local<v8::Context> context,
3940
void* priv);
41+
static void RegisterExternalReferences(ExternalReferenceRegistry* registry);
4042

4143
SET_NO_MEMORY_INFO()
4244
SET_MEMORY_INFO_NAME(TTYWrap)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.