Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

don't dispose parent module in NodeLog destructor #4639

Merged
merged 1 commit into from
Apr 7, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
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
1 change: 0 additions & 1 deletion platform/node/src/node_log.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ NodeLogObserver::NodeLogObserver(v8::Local<v8::Object> target)

NodeLogObserver::~NodeLogObserver() {
queue->stop();
module.Reset();
}

bool NodeLogObserver::onRecord(mbgl::EventSeverity severity, mbgl::Event event, int64_t code, const std::string &text) {
Expand Down
2 changes: 1 addition & 1 deletion platform/node/src/node_mapbox_gl_native.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ void RegisterModule(v8::Local<v8::Object> target, v8::Local<v8::Object> module)
Nan::Get(EventEmitter, Nan::New("prototype").ToLocalChecked()).ToLocalChecked());
Nan::CallAsFunction(EventEmitter, target, 0, nullptr);

mbgl::Log::setObserver(std::make_unique<node_mbgl::NodeLogObserver>(target->ToObject()));
mbgl::Log::setObserver(std::make_unique<node_mbgl::NodeLogObserver>(target));
}

NODE_MODULE(mapbox_gl_native, RegisterModule)
1 change: 1 addition & 0 deletions platform/node/test/js/require.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
var mbgl = require('../../../../lib/mapbox-gl-native');