diff --git a/dom/src/dom/taitank_layout_node.cc b/dom/src/dom/taitank_layout_node.cc index ff9fdb7f500..f1441f2f4ad 100644 --- a/dom/src/dom/taitank_layout_node.cc +++ b/dom/src/dom/taitank_layout_node.cc @@ -98,7 +98,7 @@ class TaitankLayoutConsts { {"inherit", DIRECTION_INHERIT}, {"ltr", DIRECTION_LTR}, {"rtl", DIRECTION_RTL}}; }; -static std::shared_ptr global_layout_consts = nullptr; +static TaitankLayoutConsts* global_layout_consts = nullptr; #define TAITANK_GET_STYLE_DECL(NAME, TYPE, DEFAULT) \ static TYPE GetStyle##NAME(const std::string& key) { \ @@ -820,7 +820,7 @@ void TaitankLayoutNode::Deallocate() { void InitLayoutConsts() { if (global_layout_consts == nullptr) { - global_layout_consts = std::make_shared(); + global_layout_consts = new TaitankLayoutConsts(); } } diff --git a/driver/js/src/napi/jsc/jsc_ctx.cc b/driver/js/src/napi/jsc/jsc_ctx.cc index 51152479073..cff6d1626df 100644 --- a/driver/js/src/napi/jsc/jsc_ctx.cc +++ b/driver/js/src/napi/jsc/jsc_ctx.cc @@ -49,13 +49,13 @@ constexpr char16_t kSetStr[] = u"set"; static std::once_flag global_class_flag; static JSClassRef global_class; -static std::shared_ptr global_constructor_data_mgr = nullptr; +static ConstructorDataManager* global_constructor_data_mgr = nullptr; JSCCtx::JSCCtx(JSContextGroupRef group, std::weak_ptr vm): vm_(vm) { std::call_once(global_class_flag, []() { JSClassDefinition global = kJSClassDefinitionEmpty; global_class = JSClassCreate(&global); - global_constructor_data_mgr = std::make_shared(); + global_constructor_data_mgr = new ConstructorDataManager(); }); context_ = JSGlobalContextCreateInGroup(group, global_class);