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: simplify `MessagePort` construction code a bit · nodejs/node@f3d09b6

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
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -483,14 +483,14 @@ MessagePort* MessagePort::New(
483483
Local<Function> ctor;
484484
if (!GetMessagePortConstructor(env, context).ToLocal(&ctor))
485485
return nullptr;
486-
MessagePort* port = nullptr;
487486

488487
// Construct a new instance, then assign the listener instance and possibly
489488
// the MessagePortData to it.
490489
Local<Object> instance;
491490
if (!ctor->NewInstance(context).ToLocal(&instance))
492491
return nullptr;
493-
ASSIGN_OR_RETURN_UNWRAP(&port, instance, nullptr);
492+
MessagePort* port = Unwrap<MessagePort>(instance);
493+
CHECK_NOT_NULL(port);
494494
if (data) {
495495
port->Detach();
496496
port->data_ = std::move(data);

0 commit comments

Comments
0 (0)
You are visitor 01402775 — 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.