diff --git a/platform/default/sqlite_cache.cpp b/platform/default/sqlite_cache.cpp index 06d168ce4..a2d2c6815 100644 --- a/platform/default/sqlite_cache.cpp +++ b/platform/default/sqlite_cache.cpp @@ -62,7 +62,7 @@ std::string unifyMapboxURLs(const std::string &url) { using namespace mapbox::sqlite; SQLiteCache::SQLiteCache(const std::string& path_) - : thread(std::make_unique>("SQLite Cache", util::ThreadPriority::Low, path_)) { + : thread(std::make_unique>(util::ThreadContext{"SQLite Cache", util::ThreadType::Unknown, util::ThreadPriority::Low}, path_)) { } SQLiteCache::~SQLiteCache() = default; diff --git a/src/mbgl/map/map.cpp b/src/mbgl/map/map.cpp index 17bcd2989..c25d307c6 100644 --- a/src/mbgl/map/map.cpp +++ b/src/mbgl/map/map.cpp @@ -12,7 +12,7 @@ namespace mbgl { Map::Map(View& view, FileSource& fileSource, MapMode mode) : data(std::make_unique(view, mode)), - context(std::make_unique>("Map", util::ThreadPriority::Regular, view, fileSource, *data)) + context(std::make_unique>(util::ThreadContext{"Map", util::ThreadType::Map, util::ThreadPriority::Regular}, view, fileSource, *data)) { view.initialize(this); } diff --git a/src/mbgl/map/map_context.cpp b/src/mbgl/map/map_context.cpp index 69d3c7e21..ecb9d8463 100644 --- a/src/mbgl/map/map_context.cpp +++ b/src/mbgl/map/map_context.cpp @@ -33,7 +33,7 @@ MapContext::MapContext(uv_loop_t* loop, View& view_, FileSource& fileSource, Map updated(static_cast(Update::Nothing)), asyncUpdate(std::make_unique(loop, [this] { update(); })), texturePool(std::make_unique()) { - assert(Environment::currentlyOn(ThreadType::Map)); + assert(util::ThreadContext::currentlyOn(util::ThreadType::Map)); asyncUpdate->unref(); @@ -108,7 +108,7 @@ void MapContext::setStyleJSON(const std::string& json, const std::string& base) } void MapContext::loadStyleJSON(const std::string& json, const std::string& base) { - assert(Environment::currentlyOn(ThreadType::Map)); + assert(util::ThreadContext::currentlyOn(util::ThreadType::Map)); style.reset(); style = std::make_unique