WebIDBValue: Stop inlining ReleaseIdbValue()'s implementation
This fixes the libstdc++ build after 86293fce ("IndexedDB: Move content/renderer/indexed_db/ to Blink, take 2"): In file included from /usr/include/c++/8/memory:80, from ../../mojo/public/cpp/system/buffer.h:17, from ../../mojo/public/cpp/system/core.h:8, from ../../mojo/public/cpp/bindings/lib/bindings_internal.h:16, from ../../mojo/public/cpp/bindings/lib/array_internal.h:18, from ../../mojo/public/cpp/bindings/array_data_view.h:10, from gen/third_party/blink/public/mojom/indexeddb/indexeddb.mojom-shared.h:17, from ../../third_party/blink/public/common/indexeddb/web_idb_types.h:29, from ../../third_party/blink/renderer/modules/indexeddb/indexed_db_dispatcher.h:12, from ../../third_party/blink/renderer/modules/indexeddb/indexed_db_dispatcher.cc:5: /usr/include/c++/8/bits/unique_ptr.h: In instantiation of ‘void std::default_delete<_Tp>::operator()(_Tp*) const [with _Tp = blink::IDBValue]’: /usr/include/c++/8/bits/unique_ptr.h:274:17: required from ‘std::unique_ptr<_Tp, _Dp>::~unique_ptr() [with _Tp = blink::IDBValue; _Dp = std::default_delete<blink::IDBValue>]’ ../../third_party/blink/public/platform/modules/indexeddb/web_idb_value.h:49:30: required from here /usr/include/c++/8/bits/unique_ptr.h:79:16: error: invalid application of ‘sizeof’ to incomplete type ‘blink::IDBValue’ static_assert(sizeof(_Tp)>0, ^~~~~~~~~~~ libstdc++'s std::unique_ptr implementation has a few static_asserts in the destructor, one of which requires that the type passed to unique_ptr is fully declared at the time. indexed_db_dispatcher.cc is now in Blink, and it ends up indirectly including web_idb_value.h, and now WebIDBValue::ReleaseIdbValue()'s call to std::move() triggers that assert. Since we cannot include idb_value.h in web_idb_value.h without triggering checkdeps, move the implementation to web_idb_value.cc instead. Bug: 819294 Change-Id: I5fdcfab3fa83729863b5f825568780a0ccb0d96f Reviewed-on: https://chromium-review.googlesource.com/c/1352251Reviewed-by:Victor Costan <pwnall@chromium.org> Reviewed-by:
Kinuko Yasuda <kinuko@chromium.org> Commit-Queue: Kinuko Yasuda <kinuko@chromium.org> Cr-Commit-Position: refs/heads/master@{#612115}
Showing
Please register or sign in to comment