Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fixup! worker: improve integration with native addons
  • Loading branch information
addaleax committed Oct 7, 2018
commit f93bca3707c3fa925ba1ae180798ed9d7b85b65a
8 changes: 3 additions & 5 deletions src/node.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1166,8 +1166,8 @@ class DLib : public std::enable_shared_from_this<DLib> {
inline void* GetSymbolAddress(const char* name);
inline void AddEnvironment(Environment* env);

std::string filename_;
int flags_;
const std::string filename_;
const int flags_ = 0;
std::string errmsg_;
void* handle_ = nullptr;
std::unordered_set<Environment*> users_;
Expand Down Expand Up @@ -1334,9 +1334,7 @@ static void DLOpen(const FunctionCallbackInfo<Value>& args) {
break;
}

dlib = std::make_shared<DLib>();
dlib->filename_ = *filename;
dlib->flags_ = flags;
dlib = std::make_shared<DLib>(*filename, flags);
bool is_opened = dlib->Open();

if (is_opened && handle_to_dlib.count(dlib->handle_) > 0) {
Expand Down