Loading tools/aapt2/cmd/Link.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -377,8 +377,8 @@ bool ResourceFileFlattener::LinkAndVersionXmlFile(ResourceTable* table, FileOper versioned_file_desc.config.sdkVersion = (uint16_t)sdk_level; FileOperation new_file_op; new_file_op.xml_to_flatten = util::make_unique<xml::XmlResource>(versioned_file_desc, doc->root->Clone()); new_file_op.xml_to_flatten = util::make_unique<xml::XmlResource>( versioned_file_desc, StringPool{}, doc->root->Clone()); new_file_op.config = versioned_file_desc.config; new_file_op.entry = file_op->entry; new_file_op.dst_path = Loading tools/aapt2/xml/XmlDom.cpp +3 −2 Original line number Diff line number Diff line Loading @@ -224,7 +224,8 @@ std::unique_ptr<XmlResource> Inflate(std::istream* in, IDiagnostics* diag, const XML_ParserFree(parser); if (stack.root) { return util::make_unique<XmlResource>(ResourceFile{{}, {}, source}, std::move(stack.root)); return util::make_unique<XmlResource>(ResourceFile{{}, {}, source}, StringPool{}, std::move(stack.root)); } return {}; } Loading Loading @@ -357,7 +358,7 @@ std::unique_ptr<XmlResource> Inflate(const void* data, size_t data_len, IDiagnos } } } return util::make_unique<XmlResource>(ResourceFile{}, std::move(root), std::move(string_pool)); return util::make_unique<XmlResource>(ResourceFile{}, std::move(string_pool), std::move(root)); } std::unique_ptr<Node> Namespace::Clone() { Loading tools/aapt2/xml/XmlDom.h +6 −1 Original line number Diff line number Diff line Loading @@ -128,8 +128,13 @@ class Text : public BaseNode<Text> { class XmlResource { public: ResourceFile file; std::unique_ptr<xml::Node> root; // StringPool must come before the xml::Node. Destructors are called in reverse order, and // the xml::Node may have StringPool references that need to be destroyed before the StringPool // is destroyed. StringPool string_pool; std::unique_ptr<xml::Node> root; }; /** Loading Loading
tools/aapt2/cmd/Link.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -377,8 +377,8 @@ bool ResourceFileFlattener::LinkAndVersionXmlFile(ResourceTable* table, FileOper versioned_file_desc.config.sdkVersion = (uint16_t)sdk_level; FileOperation new_file_op; new_file_op.xml_to_flatten = util::make_unique<xml::XmlResource>(versioned_file_desc, doc->root->Clone()); new_file_op.xml_to_flatten = util::make_unique<xml::XmlResource>( versioned_file_desc, StringPool{}, doc->root->Clone()); new_file_op.config = versioned_file_desc.config; new_file_op.entry = file_op->entry; new_file_op.dst_path = Loading
tools/aapt2/xml/XmlDom.cpp +3 −2 Original line number Diff line number Diff line Loading @@ -224,7 +224,8 @@ std::unique_ptr<XmlResource> Inflate(std::istream* in, IDiagnostics* diag, const XML_ParserFree(parser); if (stack.root) { return util::make_unique<XmlResource>(ResourceFile{{}, {}, source}, std::move(stack.root)); return util::make_unique<XmlResource>(ResourceFile{{}, {}, source}, StringPool{}, std::move(stack.root)); } return {}; } Loading Loading @@ -357,7 +358,7 @@ std::unique_ptr<XmlResource> Inflate(const void* data, size_t data_len, IDiagnos } } } return util::make_unique<XmlResource>(ResourceFile{}, std::move(root), std::move(string_pool)); return util::make_unique<XmlResource>(ResourceFile{}, std::move(string_pool), std::move(root)); } std::unique_ptr<Node> Namespace::Clone() { Loading
tools/aapt2/xml/XmlDom.h +6 −1 Original line number Diff line number Diff line Loading @@ -128,8 +128,13 @@ class Text : public BaseNode<Text> { class XmlResource { public: ResourceFile file; std::unique_ptr<xml::Node> root; // StringPool must come before the xml::Node. Destructors are called in reverse order, and // the xml::Node may have StringPool references that need to be destroyed before the StringPool // is destroyed. StringPool string_pool; std::unique_ptr<xml::Node> root; }; /** Loading