On older gcc versions such as in the base-toolchains build, `FallibleTArray<E>` cannot be move-assigned from `nsTArray<E>`. Apparently, it always attempts to copy, which fails to compile if E is not copyable. See, e.g. https://treeherder.mozilla.org/#/jobs?repo=autoland&resultStatus=testfailed%2Cbusted%2Cexception&revision=ed7eaba537577cff4eca4306efafee753910d71f&selectedJob=292003927 A workaround is to replace ``` aFiles->AppendElement(std::move(mCloneInfo.mFiles)); ``` by ``` FallibleTArray<mozilla::dom::indexedDB::StructuredCloneFile> temp; temp.SwapElements(mCloneInfo.mFiles); aFiles->AppendElement(std::move(temp)); ``` in that case, but clang and newer gcc accept the former.
Bug 1620632 Comment 0 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
On older gcc versions such as in the base-toolchains build, `FallibleTArray<E>` cannot be move-constructed from `nsTArray<E>`. Apparently, it always attempts to copy, which fails to compile if E is not copyable. See, e.g. https://treeherder.mozilla.org/#/jobs?repo=autoland&resultStatus=testfailed%2Cbusted%2Cexception&revision=ed7eaba537577cff4eca4306efafee753910d71f&selectedJob=292003927 A workaround is to replace ``` aFiles->AppendElement(std::move(mCloneInfo.mFiles)); ``` by ``` FallibleTArray<mozilla::dom::indexedDB::StructuredCloneFile> temp; temp.SwapElements(mCloneInfo.mFiles); aFiles->AppendElement(std::move(temp)); ``` in that case, but clang and newer gcc accept the former.