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

Commit

Permalink
[node] don't dispose parent module in NodeLog destructor
Browse files Browse the repository at this point in the history
  • Loading branch information
mikemorris committed Apr 7, 2016
1 parent 89db01f commit c59b5fb
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 2 deletions.
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');

0 comments on commit c59b5fb

Please sign in to comment.