IWYU: fix invalid use of incomplete types
In file included from ../../third_party/blink/renderer/platform/wtf/allocator/partitions.h:35,
from ../../third_party/blink/renderer/platform/wtf/allocator/allocator.h:11,
from ../../third_party/blink/renderer/platform/bindings/scoped_persistent.h:34,
from ../../third_party/blink/renderer/platform/bindings/script_state.h:12:
../../base/memory/scoped_refptr.h: In instantiation of ‘static void scoped_refptr<T>::Release(T*) [with T = blink::StaticBitmapImage]’:
../../base/memory/scoped_refptr.h:280:14: required from ‘scoped_refptr<T>::~scoped_refptr() [with T = blink::StaticBitmapImage]’
280 | Release(ptr_);
| ~~~~~~~^~~~~~
../../third_party/blink/renderer/modules/xr/xr_webgl_swap_chain.h:45:12: required from here
45 | return nullptr;
| ^~~~~~~
../../base/memory/scoped_refptr.h:392:8: error: invalid use of incomplete type ‘class blink::StaticBitmapImage’
392 | ptr->Release();
| ~~~~~^~~~~~~
In file included from ../../third_party/blink/renderer/platform/graphics/canvas_resource_provider.h:20,
from ../../third_party/blink/renderer/core/html/canvas/canvas_rendering_context_host.h:19:
../../third_party/blink/renderer/platform/graphics/canvas_resource.h:54:7: note: forward declaration of ‘class blink::StaticBitmapImage’
54 | class StaticBitmapImage;
| ^~~~~~~~~~~~~~~~~
In file included from ../../v8/include/v8-isolate.h:22,
from ../../v8/include/v8-snapshot.h:9,
from ../../v8/include/v8-context.h:15,
from ../../v8/include/v8.h:26,
from ../../third_party/blink/renderer/platform/bindings/wrapper_type_info.h:43,
from ../../third_party/blink/renderer/platform/bindings/script_wrappable.h:37:
../../v8/include/v8-function-callback.h: In instantiation of ‘v8::Isolate* v8::PropertyCallbackInfo<F>::GetIsolate() const [with T = v8::Value]’:
../../third_party/blink/renderer/platform/bindings/script_state.h:148:43: required from here
148 | return ForCurrentRealm(info.GetIsolate());
| ~~~~~~~~~~~~~~~^~
../../v8/include/v8-function-callback.h:666:11: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
666 | return *reinterpret_cast<Isolate**>(&args_[kIsolateIndex]);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../base/memory/scoped_refptr.h: In instantiation of ‘static void scoped_refptr<T>::Release(T*) [with T = const blink::LayoutLocale]’:
../../base/memory/scoped_refptr.h:280:14: required from ‘scoped_refptr<T>::~scoped_refptr() [with T = const blink::LayoutLocale]’
280 | Release(ptr_);
| ~~~~~~~^~~~~~
../../third_party/blink/renderer/core/offscreencanvas/offscreen_canvas.h:274:47: required from here
274 | scoped_refptr<const LayoutLocale> locale_ = nullptr;
| ^~~~~~~
../../base/memory/scoped_refptr.h:392:8: error: invalid use of incomplete type ‘const class blink::LayoutLocale’
392 | ptr->Release();
| ~~~~~^~~~~~~
../../third_party/blink/renderer/core/html/canvas/canvas_rendering_context_host.h:31:7: note: forward declaration of ‘class blink::LayoutLocale’
31 | class LayoutLocale;
| ^~~~~~~~~~~~
Bug: 41455655
Change-Id: I0d436c7a336bdb8c462ba72480b9ba0390b8b2f5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6913503
Auto-Submit: Bruno Pitrus <brunopitrus@hotmail.com>
Reviewed-by: Colin Blundell <blundell@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Colin Blundell <blundell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1518551}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
To check out the source code locally, don't use git clone! Instead, follow the instructions on how to get the code.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure.
For historical reasons, there are some small top level directories. Now the guidance is that new top level directories are for product (e.g. Chrome, Android WebView, Ash). Even if these products have multiple executables, the code should be in subdirectories of the product.
If you found a bug, please file it at https://crbug.com/new.