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: improve error handling in `node_messaging.cc` · nodejs/node@185d1ff

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • src
    • node_messaging.cc
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎src/node_messaging.cc‎

Copy file name to clipboardExpand all lines: src/node_messaging.cc
+9-4Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1627,10 +1627,15 @@ static void MessageChannel(const FunctionCallbackInfo<Value>& args) {
16271627

16281628
MessagePort::Entangle(port1, port2);
16291629

1630-
args.This()->Set(context, env->port1_string(), port1->object())
1631-
.Check();
1632-
args.This()->Set(context, env->port2_string(), port2->object())
1633-
.Check();
1630+
if (args.This()
1631+
->Set(context, env->port1_string(), port1->object())
1632+
.IsNothing() ||
1633+
args.This()
1634+
->Set(context, env->port2_string(), port2->object())
1635+
.IsNothing()) {
1636+
port1->Close();
1637+
port2->Close();
1638+
}
16341639
}
16351640

16361641
static void BroadcastChannel(const FunctionCallbackInfo<Value>& args) {

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.