/src/serenity/Userland/Libraries/LibJS/Heap/Handle.h
Line | Count | Source |
1 | | /* |
2 | | * Copyright (c) 2020, Andreas Kling <kling@serenityos.org> |
3 | | * |
4 | | * SPDX-License-Identifier: BSD-2-Clause |
5 | | */ |
6 | | |
7 | | #pragma once |
8 | | |
9 | | #include <AK/Badge.h> |
10 | | #include <AK/IntrusiveList.h> |
11 | | #include <AK/Noncopyable.h> |
12 | | #include <AK/RefCounted.h> |
13 | | #include <AK/RefPtr.h> |
14 | | #include <AK/SourceLocation.h> |
15 | | #include <LibJS/Forward.h> |
16 | | #include <LibJS/Runtime/Value.h> |
17 | | |
18 | | namespace JS { |
19 | | |
20 | | class HandleImpl : public RefCounted<HandleImpl> { |
21 | | AK_MAKE_NONCOPYABLE(HandleImpl); |
22 | | AK_MAKE_NONMOVABLE(HandleImpl); |
23 | | |
24 | | public: |
25 | | ~HandleImpl(); |
26 | | |
27 | 1.73k | Cell* cell() { return m_cell; } |
28 | 0 | Cell const* cell() const { return m_cell; } |
29 | | |
30 | 0 | SourceLocation const& source_location() const { return m_location; } |
31 | | |
32 | | private: |
33 | | template<class T> |
34 | | friend class Handle; |
35 | | |
36 | | explicit HandleImpl(Cell*, SourceLocation location); |
37 | | GCPtr<Cell> m_cell; |
38 | | SourceLocation m_location; |
39 | | |
40 | | IntrusiveListNode<HandleImpl> m_list_node; |
41 | | |
42 | | public: |
43 | | using List = IntrusiveList<&HandleImpl::m_list_node>; |
44 | | }; |
45 | | |
46 | | template<class T> |
47 | | class Handle { |
48 | | public: |
49 | 630k | Handle() = default; JS::Handle<JS::Symbol>::Handle() Line | Count | Source | 49 | 36.1k | Handle() = default; |
JS::Handle<JS::Bytecode::Executable>::Handle() Line | Count | Source | 49 | 593k | Handle() = default; |
Unexecuted instantiation: JS::Handle<JS::Cell>::Handle() Unexecuted instantiation: JS::Handle<JS::ProxyObject>::Handle() Unexecuted instantiation: JS::Handle<JS::Temporal::PlainDate>::Handle() Unexecuted instantiation: JS::Handle<Web::HTML::EventLoop>::Handle() Unexecuted instantiation: JS::Handle<JS::Realm>::Handle() Unexecuted instantiation: JS::Handle<Web::CSS::CSSStyleSheet>::Handle() Unexecuted instantiation: JS::Handle<Web::HTML::NavigableContainer>::Handle() Unexecuted instantiation: JS::Handle<Web::CSS::FontFace>::Handle() Unexecuted instantiation: JS::Handle<Web::DOM::Element>::Handle() Unexecuted instantiation: JS::Handle<Web::DOM::Node>::Handle() Unexecuted instantiation: JS::Handle<Web::HTML::Window>::Handle() Unexecuted instantiation: JS::Handle<Web::HTML::AudioTrack>::Handle() Unexecuted instantiation: JS::Handle<Web::HTML::VideoTrack>::Handle() Unexecuted instantiation: JS::Handle<JS::FunctionObject>::Handle() Unexecuted instantiation: JS::Handle<Web::HTML::MessagePort>::Handle() Unexecuted instantiation: JS::Handle<Web::DOM::Document>::Handle() Unexecuted instantiation: JS::Handle<Web::Page>::Handle() Unexecuted instantiation: JS::Handle<Web::WebIDL::CallbackType>::Handle() Unexecuted instantiation: JS::Handle<Web::WebIDL::BufferSource>::Handle() Unexecuted instantiation: JS::Handle<JS::Promise>::Handle() |
50 | | |
51 | | static Handle create(T* cell, SourceLocation location = SourceLocation::current()) |
52 | 0 | { |
53 | 0 | return Handle(adopt_ref(*new HandleImpl(const_cast<RemoveConst<T>*>(cell), location))); |
54 | 0 | } Unexecuted instantiation: JS::Handle<JS::Cell>::create(JS::Cell*, AK::SourceLocation) Unexecuted instantiation: JS::Handle<JS::Bytecode::Executable>::create(JS::Bytecode::Executable*, AK::SourceLocation) Unexecuted instantiation: JS::Handle<JS::ModuleNamespaceObject>::create(JS::ModuleNamespaceObject*, AK::SourceLocation) Unexecuted instantiation: JS::Handle<JS::ProxyObject>::create(JS::ProxyObject*, AK::SourceLocation) Unexecuted instantiation: JS::Handle<JS::Temporal::PlainDate>::create(JS::Temporal::PlainDate*, AK::SourceLocation) Unexecuted instantiation: JS::Handle<JS::Module>::create(JS::Module*, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::CSS::CSSStyleSheet>::create(Web::CSS::CSSStyleSheet*, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::HTML::HTMLScriptElement>::create(Web::HTML::HTMLScriptElement*, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::HTML::NavigableContainer>::create(Web::HTML::NavigableContainer*, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::IntersectionObserver::IntersectionObserver>::create(Web::IntersectionObserver::IntersectionObserver*, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::CSS::FontFace>::create(Web::CSS::FontFace*, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::DOM::Document>::create(Web::DOM::Document*, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::DOM::Element>::create(Web::DOM::Element*, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::DOM::Node>::create(Web::DOM::Node*, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::DOM::Node const>::create(Web::DOM::Node const*, AK::SourceLocation) Unexecuted instantiation: JS::Handle<JS::Object>::create(JS::Object*, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::WebIDL::CallbackType>::create(Web::WebIDL::CallbackType*, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::HTML::Window>::create(Web::HTML::Window*, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::FileAPI::Blob>::create(Web::FileAPI::Blob*, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::FileAPI::File>::create(Web::FileAPI::File*, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::HTML::CanvasRenderingContext2D>::create(Web::HTML::CanvasRenderingContext2D*, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::WebGL::WebGLRenderingContext>::create(Web::WebGL::WebGLRenderingContext*, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::DOM::Text>::create(Web::DOM::Text*, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::HTML::RadioNodeList>::create(Web::HTML::RadioNodeList*, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::Fetch::Infrastructure::Request>::create(Web::Fetch::Infrastructure::Request*, AK::SourceLocation) Unexecuted instantiation: JS::Handle<JS::Realm>::create(JS::Realm*, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::Fetch::Infrastructure::FetchParams const>::create(Web::Fetch::Infrastructure::FetchParams const*, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::HTML::TextTrack>::create(Web::HTML::TextTrack*, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::HTML::AudioTrack>::create(Web::HTML::AudioTrack*, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::HTML::VideoTrack>::create(Web::HTML::VideoTrack*, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::HTML::HTMLOptionElement>::create(Web::HTML::HTMLOptionElement*, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::HTML::HTMLElement>::create(Web::HTML::HTMLElement*, AK::SourceLocation) Unexecuted instantiation: JS::Handle<JS::FunctionObject>::create(JS::FunctionObject*, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::HTML::MessagePort>::create(Web::HTML::MessagePort*, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::HTML::WindowProxy>::create(Web::HTML::WindowProxy*, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::DOM::Event>::create(Web::DOM::Event*, AK::SourceLocation) Unexecuted instantiation: JS::Handle<JS::Promise>::create(JS::Promise*, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::HTML::ImageData>::create(Web::HTML::ImageData*, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::Fetch::Request>::create(Web::Fetch::Request*, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::Streams::ReadableStream>::create(Web::Streams::ReadableStream*, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::XHR::FormData>::create(Web::XHR::FormData*, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::DOMURL::URLSearchParams>::create(Web::DOMURL::URLSearchParams*, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::WebIDL::BufferSource>::create(Web::WebIDL::BufferSource*, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::WebIDL::ArrayBufferView>::create(Web::WebIDL::ArrayBufferView*, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::CSS::MediaList>::create(Web::CSS::MediaList*, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::HTML::CanvasGradient>::create(Web::HTML::CanvasGradient*, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::HTML::CanvasPattern>::create(Web::HTML::CanvasPattern*, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::HTML::HTMLImageElement>::create(Web::HTML::HTMLImageElement*, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::SVG::SVGImageElement>::create(Web::SVG::SVGImageElement*, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::HTML::HTMLVideoElement>::create(Web::HTML::HTMLVideoElement*, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::HTML::HTMLCanvasElement>::create(Web::HTML::HTMLCanvasElement*, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::HTML::ImageBitmap>::create(Web::HTML::ImageBitmap*, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::HTML::HTMLOptGroupElement>::create(Web::HTML::HTMLOptGroupElement*, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::HTML::Path2D>::create(Web::HTML::Path2D*, AK::SourceLocation) |
55 | | |
56 | | Handle(T* cell, SourceLocation location = SourceLocation::current()) |
57 | 0 | { |
58 | 0 | if (cell) |
59 | 0 | m_impl = adopt_ref(*new HandleImpl(cell, location)); |
60 | 0 | } Unexecuted instantiation: JS::Handle<JS::Symbol>::Handle(JS::Symbol*, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::CSS::CSSStyleSheet>::Handle(Web::CSS::CSSStyleSheet*, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::HTML::Navigable>::Handle(Web::HTML::Navigable*, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::WebIDL::CallbackType>::Handle(Web::WebIDL::CallbackType*, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::DOM::EventTarget>::Handle(Web::DOM::EventTarget*, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::DOM::Node>::Handle(Web::DOM::Node*, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::DOM::Document>::Handle(Web::DOM::Document*, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::DOM::AbortSignal>::Handle(Web::DOM::AbortSignal*, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::DOM::Element>::Handle(Web::DOM::Element*, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::HTML::TextTrack>::Handle(Web::HTML::TextTrack*, AK::SourceLocation) |
61 | | |
62 | | Handle(T& cell, SourceLocation location = SourceLocation::current()) |
63 | 1.20k | : m_impl(adopt_ref(*new HandleImpl(&cell, location))) |
64 | 1.20k | { |
65 | 1.20k | } JS::Handle<JS::Symbol>::Handle(JS::Symbol&, AK::SourceLocation) Line | Count | Source | 63 | 1.20k | : m_impl(adopt_ref(*new HandleImpl(&cell, location))) | 64 | 1.20k | { | 65 | 1.20k | } |
Unexecuted instantiation: JS::Handle<JS::ECMAScriptFunctionObject>::Handle(JS::ECMAScriptFunctionObject&, AK::SourceLocation) Unexecuted instantiation: JS::Handle<JS::Promise>::Handle(JS::Promise&, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::HTML::EventLoop>::Handle(Web::HTML::EventLoop&, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::DOM::Element>::Handle(Web::DOM::Element&, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::HTML::Navigable>::Handle(Web::HTML::Navigable&, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::DOM::Range>::Handle(Web::DOM::Range&, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::Geometry::DOMRect>::Handle(Web::Geometry::DOMRect&, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::HTML::CustomElementDefinition>::Handle(Web::HTML::CustomElementDefinition&, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::DOM::DOMEventListener>::Handle(Web::DOM::DOMEventListener&, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::DOM::AbortSignal>::Handle(Web::DOM::AbortSignal&, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::DOM::MutationRecord>::Handle(Web::DOM::MutationRecord&, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::DOM::Node>::Handle(Web::DOM::Node&, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::FileAPI::Blob>::Handle(Web::FileAPI::Blob&, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::HTML::EnvironmentSettingsObject>::Handle(Web::HTML::EnvironmentSettingsObject&, AK::SourceLocation) Unexecuted instantiation: JS::Handle<JS::Object>::Handle(JS::Object&, AK::SourceLocation) Unexecuted instantiation: JS::Handle<JS::HeapFunction<void ()> >::Handle(JS::HeapFunction<void ()>&, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::DOM::Document>::Handle(Web::DOM::Document&, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::Page>::Handle(Web::Page&, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::HTML::HTMLVideoElement>::Handle(Web::HTML::HTMLVideoElement&, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::HTML::MessagePort>::Handle(Web::HTML::MessagePort&, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::HTML::SharedResourceRequest>::Handle(Web::HTML::SharedResourceRequest&, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::HTML::ChangingNavigableContinuationState>::Handle(Web::HTML::ChangingNavigableContinuationState&, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::HTML::Storage>::Handle(Web::HTML::Storage&, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::HTML::ImageBitmap>::Handle(Web::HTML::ImageBitmap&, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::WebIDL::CallbackType>::Handle(Web::WebIDL::CallbackType&, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::PerformanceTimeline::PerformanceObserver>::Handle(Web::PerformanceTimeline::PerformanceObserver&, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::PerformanceTimeline::PerformanceEntry>::Handle(Web::PerformanceTimeline::PerformanceEntry&, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::IntersectionObserver::IntersectionObserverEntry>::Handle(Web::IntersectionObserver::IntersectionObserverEntry&, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::Layout::Node>::Handle(Web::Layout::Node&, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::Layout::Box>::Handle(Web::Layout::Box&, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::Painting::Paintable>::Handle(Web::Painting::Paintable&, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::CSS::FontFace>::Handle(Web::CSS::FontFace&, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::DOM::ShadowRoot>::Handle(Web::DOM::ShadowRoot&, AK::SourceLocation) Unexecuted instantiation: JS::Handle<JS::ArrayBuffer>::Handle(JS::ArrayBuffer&, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::DOM::HTMLCollection>::Handle(Web::DOM::HTMLCollection&, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::Streams::ReadableStreamDefaultReader>::Handle(Web::Streams::ReadableStreamDefaultReader&, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::Streams::ReadableStreamBYOBReader>::Handle(Web::Streams::ReadableStreamBYOBReader&, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::UIEvents::PointerEvent>::Handle(Web::UIEvents::PointerEvent&, AK::SourceLocation) |
66 | | |
67 | | Handle(GCPtr<T> cell, SourceLocation location = SourceLocation::current()) |
68 | 0 | : Handle(cell.ptr(), location) |
69 | 0 | { |
70 | 0 | } Unexecuted instantiation: JS::Handle<Web::WebIDL::CallbackType>::Handle(JS::GCPtr<Web::WebIDL::CallbackType>, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::DOM::Document>::Handle(JS::GCPtr<Web::DOM::Document>, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::DOM::AbortSignal>::Handle(JS::GCPtr<Web::DOM::AbortSignal>, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::DOM::Element>::Handle(JS::GCPtr<Web::DOM::Element>, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::HTML::TextTrack>::Handle(JS::GCPtr<Web::HTML::TextTrack>, AK::SourceLocation) |
71 | | |
72 | | Handle(NonnullGCPtr<T> cell, SourceLocation location = SourceLocation::current()) |
73 | 1.20k | : Handle(*cell, location) |
74 | 1.20k | { |
75 | 1.20k | } JS::Handle<JS::Symbol>::Handle(JS::NonnullGCPtr<JS::Symbol>, AK::SourceLocation) Line | Count | Source | 73 | 1.20k | : Handle(*cell, location) | 74 | 1.20k | { | 75 | 1.20k | } |
Unexecuted instantiation: JS::Handle<JS::ECMAScriptFunctionObject>::Handle(JS::NonnullGCPtr<JS::ECMAScriptFunctionObject>, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::HTML::EventLoop>::Handle(JS::NonnullGCPtr<Web::HTML::EventLoop>, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::DOM::Element>::Handle(JS::NonnullGCPtr<Web::DOM::Element>, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::DOM::Range>::Handle(JS::NonnullGCPtr<Web::DOM::Range>, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::Geometry::DOMRect>::Handle(JS::NonnullGCPtr<Web::Geometry::DOMRect>, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::FileAPI::Blob>::Handle(JS::NonnullGCPtr<Web::FileAPI::Blob>, AK::SourceLocation) Unexecuted instantiation: JS::Handle<JS::Object>::Handle(JS::NonnullGCPtr<JS::Object>, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::HTML::CustomElementDefinition>::Handle(JS::NonnullGCPtr<Web::HTML::CustomElementDefinition>, AK::SourceLocation) Unexecuted instantiation: JS::Handle<JS::HeapFunction<void ()> >::Handle(JS::NonnullGCPtr<JS::HeapFunction<void ()> >, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::DOM::Document>::Handle(JS::NonnullGCPtr<Web::DOM::Document>, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::HTML::ChangingNavigableContinuationState>::Handle(JS::NonnullGCPtr<Web::HTML::ChangingNavigableContinuationState>, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::HTML::Storage>::Handle(JS::NonnullGCPtr<Web::HTML::Storage>, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::WebIDL::CallbackType>::Handle(JS::NonnullGCPtr<Web::WebIDL::CallbackType>, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::PerformanceTimeline::PerformanceObserver>::Handle(JS::NonnullGCPtr<Web::PerformanceTimeline::PerformanceObserver>, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::PerformanceTimeline::PerformanceEntry>::Handle(JS::NonnullGCPtr<Web::PerformanceTimeline::PerformanceEntry>, AK::SourceLocation) Unexecuted instantiation: JS::Handle<JS::ArrayBuffer>::Handle(JS::NonnullGCPtr<JS::ArrayBuffer>, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::DOM::HTMLCollection>::Handle(JS::NonnullGCPtr<Web::DOM::HTMLCollection>, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::Streams::ReadableStreamDefaultReader>::Handle(JS::NonnullGCPtr<Web::Streams::ReadableStreamDefaultReader>, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::Streams::ReadableStreamBYOBReader>::Handle(JS::NonnullGCPtr<Web::Streams::ReadableStreamBYOBReader>, AK::SourceLocation) |
76 | | |
77 | | T* cell() const |
78 | 1.73k | { |
79 | 1.73k | if (!m_impl) |
80 | 0 | return nullptr; |
81 | 1.73k | return static_cast<T*>(m_impl->cell()); |
82 | 1.73k | } Unexecuted instantiation: JS::Handle<JS::Cell>::cell() const JS::Handle<JS::Symbol>::cell() const Line | Count | Source | 78 | 1.73k | { | 79 | 1.73k | if (!m_impl) | 80 | 0 | return nullptr; | 81 | 1.73k | return static_cast<T*>(m_impl->cell()); | 82 | 1.73k | } |
Unexecuted instantiation: JS::Handle<JS::Bytecode::Executable>::cell() const Unexecuted instantiation: JS::Handle<JS::ECMAScriptFunctionObject>::cell() const Unexecuted instantiation: JS::Handle<JS::ModuleNamespaceObject>::cell() const Unexecuted instantiation: JS::Handle<JS::ProxyObject>::cell() const Unexecuted instantiation: JS::Handle<JS::Temporal::PlainDate>::cell() const Unexecuted instantiation: JS::Handle<JS::Module>::cell() const Unexecuted instantiation: JS::Handle<Web::HTML::CustomElementDefinition>::cell() const Unexecuted instantiation: JS::Handle<Web::WebIDL::CallbackType>::cell() const Unexecuted instantiation: JS::Handle<Web::DOM::Element>::cell() const Unexecuted instantiation: JS::Handle<Web::DOM::MutationRecord>::cell() const Unexecuted instantiation: JS::Handle<Web::CSS::MediaList>::cell() const Unexecuted instantiation: JS::Handle<Web::Page>::cell() const Unexecuted instantiation: JS::Handle<Web::CSS::CSSStyleSheet>::cell() const Unexecuted instantiation: JS::Handle<Web::Painting::Paintable>::cell() const Unexecuted instantiation: JS::Handle<JS::Object>::cell() const Unexecuted instantiation: JS::Handle<Web::DOM::Document>::cell() const Unexecuted instantiation: JS::Handle<Web::HTML::NavigableContainer>::cell() const Unexecuted instantiation: JS::Handle<Web::HTML::Navigable>::cell() const Unexecuted instantiation: JS::Handle<Web::HTML::EventLoop>::cell() const Unexecuted instantiation: JS::Handle<Web::IntersectionObserver::IntersectionObserver>::cell() const Unexecuted instantiation: JS::Handle<Web::IntersectionObserver::IntersectionObserverEntry>::cell() const Unexecuted instantiation: JS::Handle<Web::CSS::FontFace>::cell() const Unexecuted instantiation: JS::Handle<Web::WebIDL::BufferSource>::cell() const Unexecuted instantiation: JS::Handle<Web::DOM::Node>::cell() const Unexecuted instantiation: JS::Handle<Web::DOM::AbortSignal>::cell() const Unexecuted instantiation: JS::Handle<Web::DOM::DOMEventListener>::cell() const Unexecuted instantiation: JS::Handle<Web::DOM::Node const>::cell() const Unexecuted instantiation: JS::Handle<Web::FileAPI::Blob>::cell() const Unexecuted instantiation: JS::Handle<Web::HTML::EnvironmentSettingsObject>::cell() const Unexecuted instantiation: JS::Handle<Web::XHR::FormData>::cell() const Unexecuted instantiation: JS::Handle<Web::DOMURL::URLSearchParams>::cell() const Unexecuted instantiation: JS::Handle<Web::Streams::ReadableStream>::cell() const Unexecuted instantiation: JS::Handle<Web::WebIDL::ArrayBufferView>::cell() const Unexecuted instantiation: JS::Handle<Web::Geometry::DOMRect>::cell() const Unexecuted instantiation: JS::Handle<Web::HTML::Window>::cell() const Unexecuted instantiation: JS::Handle<Web::FileAPI::File>::cell() const Unexecuted instantiation: JS::Handle<Web::HTML::HTMLOptionElement>::cell() const Unexecuted instantiation: JS::Handle<Web::HTML::HTMLImageElement>::cell() const Unexecuted instantiation: JS::Handle<Web::SVG::SVGImageElement>::cell() const Unexecuted instantiation: JS::Handle<Web::HTML::HTMLCanvasElement>::cell() const Unexecuted instantiation: JS::Handle<Web::HTML::ImageBitmap>::cell() const Unexecuted instantiation: JS::Handle<Web::HTML::HTMLVideoElement>::cell() const Unexecuted instantiation: JS::Handle<Web::HTML::CanvasGradient>::cell() const Unexecuted instantiation: JS::Handle<Web::HTML::CanvasPattern>::cell() const Unexecuted instantiation: JS::Handle<Web::HTML::RadioNodeList>::cell() const Unexecuted instantiation: JS::Handle<JS::HeapFunction<void ()> >::cell() const Unexecuted instantiation: JS::Handle<Web::Fetch::Infrastructure::Request>::cell() const Unexecuted instantiation: JS::Handle<JS::Realm>::cell() const Unexecuted instantiation: JS::Handle<Web::Fetch::Infrastructure::FetchParams const>::cell() const Unexecuted instantiation: JS::Handle<Web::HTML::HTMLOptGroupElement>::cell() const Unexecuted instantiation: JS::Handle<Web::HTML::HTMLElement>::cell() const Unexecuted instantiation: JS::Handle<Web::DOM::Text>::cell() const Unexecuted instantiation: JS::Handle<JS::FunctionObject>::cell() const Unexecuted instantiation: JS::Handle<Web::HTML::MessagePort>::cell() const Unexecuted instantiation: JS::Handle<Web::DOM::ShadowRoot>::cell() const Unexecuted instantiation: JS::Handle<JS::Promise>::cell() const Unexecuted instantiation: JS::Handle<Web::HTML::SharedResourceRequest>::cell() const Unexecuted instantiation: JS::Handle<Web::HTML::ChangingNavigableContinuationState>::cell() const Unexecuted instantiation: JS::Handle<Web::HTML::Storage>::cell() const Unexecuted instantiation: JS::Handle<Web::PerformanceTimeline::PerformanceObserver>::cell() const Unexecuted instantiation: JS::Handle<Web::PerformanceTimeline::PerformanceEntry>::cell() const Unexecuted instantiation: JS::Handle<Web::Fetch::Request>::cell() const Unexecuted instantiation: JS::Handle<Web::Layout::Node>::cell() const Unexecuted instantiation: JS::Handle<Web::Layout::Box>::cell() const Unexecuted instantiation: JS::Handle<Web::DOM::Range>::cell() const Unexecuted instantiation: JS::Handle<Web::UIEvents::PointerEvent>::cell() const Unexecuted instantiation: JS::Handle<Web::DOM::Event>::cell() const Unexecuted instantiation: JS::Handle<Web::DOM::EventTarget>::cell() const Unexecuted instantiation: JS::Handle<JS::ArrayBuffer>::cell() const Unexecuted instantiation: JS::Handle<Web::HTML::Path2D>::cell() const Unexecuted instantiation: JS::Handle<Web::DOM::HTMLCollection>::cell() const Unexecuted instantiation: JS::Handle<Web::HTML::CanvasRenderingContext2D>::cell() const Unexecuted instantiation: JS::Handle<Web::WebGL::WebGLRenderingContext>::cell() const Unexecuted instantiation: JS::Handle<Web::HTML::TextTrack>::cell() const Unexecuted instantiation: JS::Handle<Web::HTML::WindowProxy>::cell() const Unexecuted instantiation: JS::Handle<Web::HTML::VideoTrack>::cell() const Unexecuted instantiation: JS::Handle<Web::HTML::AudioTrack>::cell() const Unexecuted instantiation: JS::Handle<Web::Streams::ReadableStreamDefaultReader>::cell() const Unexecuted instantiation: JS::Handle<Web::Streams::ReadableStreamBYOBReader>::cell() const |
83 | | |
84 | | T* ptr() const |
85 | 0 | { |
86 | 0 | return cell(); |
87 | 0 | } Unexecuted instantiation: JS::Handle<Web::DOM::Element>::ptr() const Unexecuted instantiation: JS::Handle<Web::DOM::MutationRecord>::ptr() const Unexecuted instantiation: JS::Handle<Web::Page>::ptr() const Unexecuted instantiation: JS::Handle<JS::Object>::ptr() const Unexecuted instantiation: JS::Handle<Web::HTML::Navigable>::ptr() const Unexecuted instantiation: JS::Handle<Web::IntersectionObserver::IntersectionObserverEntry>::ptr() const Unexecuted instantiation: JS::Handle<Web::IntersectionObserver::IntersectionObserver>::ptr() const Unexecuted instantiation: JS::Handle<Web::CSS::FontFace>::ptr() const Unexecuted instantiation: JS::Handle<Web::DOM::Node>::ptr() const Unexecuted instantiation: JS::Handle<Web::HTML::RadioNodeList>::ptr() const Unexecuted instantiation: JS::Handle<Web::HTML::HTMLOptionElement>::ptr() const Unexecuted instantiation: JS::Handle<Web::HTML::HTMLElement>::ptr() const Unexecuted instantiation: JS::Handle<Web::DOM::Document>::ptr() const Unexecuted instantiation: JS::Handle<Web::HTML::ImageBitmap>::ptr() const Unexecuted instantiation: JS::Handle<Web::Painting::Paintable>::ptr() const |
88 | | |
89 | | bool is_null() const |
90 | 0 | { |
91 | 0 | return m_impl.is_null(); |
92 | 0 | } Unexecuted instantiation: JS::Handle<JS::Cell>::is_null() const Unexecuted instantiation: JS::Handle<JS::ECMAScriptFunctionObject>::is_null() const |
93 | | |
94 | | T* operator->() const |
95 | 0 | { |
96 | 0 | return cell(); |
97 | 0 | } Unexecuted instantiation: JS::Handle<Web::DOM::Element>::operator->() const Unexecuted instantiation: JS::Handle<Web::Painting::Paintable>::operator->() const Unexecuted instantiation: JS::Handle<Web::DOM::Document>::operator->() const Unexecuted instantiation: JS::Handle<Web::HTML::NavigableContainer>::operator->() const Unexecuted instantiation: JS::Handle<Web::HTML::Navigable>::operator->() const Unexecuted instantiation: JS::Handle<Web::IntersectionObserver::IntersectionObserver>::operator->() const Unexecuted instantiation: JS::Handle<Web::CSS::FontFace>::operator->() const Unexecuted instantiation: JS::Handle<Web::WebIDL::BufferSource>::operator->() const Unexecuted instantiation: JS::Handle<Web::DOM::Node>::operator->() const Unexecuted instantiation: JS::Handle<Web::DOM::AbortSignal>::operator->() const Unexecuted instantiation: JS::Handle<Web::DOM::DOMEventListener>::operator->() const Unexecuted instantiation: JS::Handle<Web::FileAPI::Blob>::operator->() const Unexecuted instantiation: JS::Handle<Web::HTML::EnvironmentSettingsObject>::operator->() const Unexecuted instantiation: JS::Handle<Web::XHR::FormData>::operator->() const Unexecuted instantiation: JS::Handle<Web::DOMURL::URLSearchParams>::operator->() const Unexecuted instantiation: JS::Handle<Web::Streams::ReadableStream>::operator->() const Unexecuted instantiation: JS::Handle<JS::Object>::operator->() const Unexecuted instantiation: JS::Handle<Web::WebIDL::ArrayBufferView>::operator->() const Unexecuted instantiation: JS::Handle<Web::HTML::CustomElementDefinition>::operator->() const Unexecuted instantiation: JS::Handle<Web::HTML::Window>::operator->() const Unexecuted instantiation: JS::Handle<Web::FileAPI::File>::operator->() const Unexecuted instantiation: JS::Handle<Web::HTML::HTMLOptionElement>::operator->() const Unexecuted instantiation: JS::Handle<Web::HTML::HTMLImageElement>::operator->() const Unexecuted instantiation: JS::Handle<Web::SVG::SVGImageElement>::operator->() const Unexecuted instantiation: JS::Handle<Web::HTML::HTMLCanvasElement>::operator->() const Unexecuted instantiation: JS::Handle<Web::HTML::ImageBitmap>::operator->() const Unexecuted instantiation: JS::Handle<Web::HTML::HTMLVideoElement>::operator->() const Unexecuted instantiation: JS::Handle<Web::HTML::CanvasGradient>::operator->() const Unexecuted instantiation: JS::Handle<Web::HTML::CanvasPattern>::operator->() const Unexecuted instantiation: JS::Handle<JS::HeapFunction<void ()> >::operator->() const Unexecuted instantiation: JS::Handle<Web::Fetch::Infrastructure::Request>::operator->() const Unexecuted instantiation: JS::Handle<Web::HTML::HTMLElement>::operator->() const Unexecuted instantiation: JS::Handle<Web::DOM::Text>::operator->() const Unexecuted instantiation: JS::Handle<Web::HTML::MessagePort>::operator->() const Unexecuted instantiation: JS::Handle<Web::HTML::SharedResourceRequest>::operator->() const Unexecuted instantiation: JS::Handle<Web::HTML::ChangingNavigableContinuationState>::operator->() const Unexecuted instantiation: JS::Handle<JS::Promise>::operator->() const Unexecuted instantiation: JS::Handle<Web::PerformanceTimeline::PerformanceObserver>::operator->() const Unexecuted instantiation: JS::Handle<Web::PerformanceTimeline::PerformanceEntry>::operator->() const Unexecuted instantiation: JS::Handle<Web::Fetch::Request>::operator->() const Unexecuted instantiation: JS::Handle<Web::Layout::Node>::operator->() const Unexecuted instantiation: JS::Handle<Web::Layout::Box>::operator->() const Unexecuted instantiation: JS::Handle<Web::DOM::Range>::operator->() const Unexecuted instantiation: JS::Handle<Web::HTML::Path2D>::operator->() const Unexecuted instantiation: JS::Handle<Web::WebIDL::CallbackType>::operator->() const |
98 | | |
99 | | T& operator*() const |
100 | 0 | { |
101 | 0 | return *cell(); |
102 | 0 | } Unexecuted instantiation: JS::Handle<JS::Temporal::PlainDate>::operator*() const Unexecuted instantiation: JS::Handle<JS::Module>::operator*() const Unexecuted instantiation: JS::Handle<Web::HTML::CustomElementDefinition>::operator*() const Unexecuted instantiation: JS::Handle<Web::WebIDL::CallbackType>::operator*() const Unexecuted instantiation: JS::Handle<Web::CSS::MediaList>::operator*() const Unexecuted instantiation: JS::Handle<Web::CSS::CSSStyleSheet>::operator*() const Unexecuted instantiation: JS::Handle<Web::HTML::NavigableContainer>::operator*() const Unexecuted instantiation: JS::Handle<Web::HTML::EventLoop>::operator*() const Unexecuted instantiation: JS::Handle<Web::DOM::Element>::operator*() const Unexecuted instantiation: JS::Handle<Web::CSS::FontFace>::operator*() const Unexecuted instantiation: JS::Handle<Web::DOM::Node>::operator*() const Unexecuted instantiation: JS::Handle<Web::DOM::AbortSignal>::operator*() const Unexecuted instantiation: JS::Handle<Web::DOM::DOMEventListener>::operator*() const Unexecuted instantiation: JS::Handle<Web::Geometry::DOMRect>::operator*() const Unexecuted instantiation: JS::Handle<Web::DOM::Document>::operator*() const Unexecuted instantiation: JS::Handle<JS::Object>::operator*() const Unexecuted instantiation: JS::Handle<JS::Realm>::operator*() const Unexecuted instantiation: JS::Handle<Web::Fetch::Infrastructure::FetchParams const>::operator*() const Unexecuted instantiation: JS::Handle<Web::HTML::HTMLOptionElement>::operator*() const Unexecuted instantiation: JS::Handle<Web::HTML::HTMLOptGroupElement>::operator*() const Unexecuted instantiation: JS::Handle<Web::HTML::HTMLElement>::operator*() const Unexecuted instantiation: JS::Handle<Web::DOM::Text>::operator*() const Unexecuted instantiation: JS::Handle<Web::HTML::MessagePort>::operator*() const Unexecuted instantiation: JS::Handle<Web::WebIDL::BufferSource>::operator*() const Unexecuted instantiation: JS::Handle<Web::HTML::Navigable>::operator*() const Unexecuted instantiation: JS::Handle<Web::HTML::Storage>::operator*() const Unexecuted instantiation: JS::Handle<JS::Promise>::operator*() const Unexecuted instantiation: JS::Handle<Web::PerformanceTimeline::PerformanceEntry>::operator*() const Unexecuted instantiation: JS::Handle<Web::Layout::Node>::operator*() const Unexecuted instantiation: JS::Handle<Web::Layout::Box>::operator*() const Unexecuted instantiation: JS::Handle<Web::Painting::Paintable>::operator*() const Unexecuted instantiation: JS::Handle<Web::DOM::Range>::operator*() const Unexecuted instantiation: JS::Handle<Web::WebIDL::ArrayBufferView>::operator*() const Unexecuted instantiation: JS::Handle<Web::UIEvents::PointerEvent>::operator*() const Unexecuted instantiation: JS::Handle<Web::DOM::Event>::operator*() const Unexecuted instantiation: JS::Handle<Web::DOM::EventTarget>::operator*() const Unexecuted instantiation: JS::Handle<Web::DOM::MutationRecord>::operator*() const Unexecuted instantiation: JS::Handle<JS::ArrayBuffer>::operator*() const Unexecuted instantiation: JS::Handle<Web::HTML::CanvasGradient>::operator*() const Unexecuted instantiation: JS::Handle<Web::HTML::CanvasPattern>::operator*() const Unexecuted instantiation: JS::Handle<Web::DOM::HTMLCollection>::operator*() const Unexecuted instantiation: JS::Handle<Web::HTML::CanvasRenderingContext2D>::operator*() const Unexecuted instantiation: JS::Handle<Web::WebGL::WebGLRenderingContext>::operator*() const Unexecuted instantiation: JS::Handle<Web::HTML::RadioNodeList>::operator*() const Unexecuted instantiation: JS::Handle<Web::HTML::TextTrack>::operator*() const Unexecuted instantiation: JS::Handle<Web::HTML::WindowProxy>::operator*() const Unexecuted instantiation: JS::Handle<Web::HTML::VideoTrack>::operator*() const Unexecuted instantiation: JS::Handle<Web::HTML::AudioTrack>::operator*() const Unexecuted instantiation: JS::Handle<Web::IntersectionObserver::IntersectionObserverEntry>::operator*() const Unexecuted instantiation: JS::Handle<Web::Streams::ReadableStreamDefaultReader>::operator*() const Unexecuted instantiation: JS::Handle<Web::Streams::ReadableStreamBYOBReader>::operator*() const Unexecuted instantiation: JS::Handle<Web::FileAPI::File>::operator*() const |
103 | | |
104 | | bool operator!() const |
105 | 0 | { |
106 | 0 | return !cell(); |
107 | 0 | } |
108 | | operator bool() const |
109 | 0 | { |
110 | 0 | return cell(); |
111 | 0 | } Unexecuted instantiation: JS::Handle<Web::CSS::CSSStyleSheet>::operator bool() const Unexecuted instantiation: JS::Handle<Web::HTML::NavigableContainer>::operator bool() const Unexecuted instantiation: JS::Handle<Web::WebIDL::CallbackType>::operator bool() const |
112 | | |
113 | 1.73k | operator T*() const { return cell(); }JS::Handle<JS::Symbol>::operator JS::Symbol*() const Line | Count | Source | 113 | 1.73k | operator T*() const { return cell(); } |
Unexecuted instantiation: JS::Handle<JS::Bytecode::Executable>::operator JS::Bytecode::Executable*() const Unexecuted instantiation: JS::Handle<JS::ModuleNamespaceObject>::operator JS::ModuleNamespaceObject*() const Unexecuted instantiation: JS::Handle<JS::Temporal::PlainDate>::operator JS::Temporal::PlainDate*() const Unexecuted instantiation: JS::Handle<Web::DOM::Element>::operator Web::DOM::Element*() const Unexecuted instantiation: JS::Handle<Web::CSS::FontFace>::operator Web::CSS::FontFace*() const Unexecuted instantiation: JS::Handle<Web::DOM::AbortSignal>::operator Web::DOM::AbortSignal*() const Unexecuted instantiation: JS::Handle<Web::DOM::Node const>::operator Web::DOM::Node const*() const Unexecuted instantiation: JS::Handle<Web::DOM::Node>::operator Web::DOM::Node*() const Unexecuted instantiation: JS::Handle<Web::HTML::EnvironmentSettingsObject>::operator Web::HTML::EnvironmentSettingsObject*() const Unexecuted instantiation: JS::Handle<JS::Object>::operator JS::Object*() const Unexecuted instantiation: JS::Handle<Web::DOM::ShadowRoot>::operator Web::DOM::ShadowRoot*() const Unexecuted instantiation: JS::Handle<Web::HTML::EventLoop>::operator Web::HTML::EventLoop*() const Unexecuted instantiation: JS::Handle<Web::HTML::Navigable>::operator Web::HTML::Navigable*() const Unexecuted instantiation: JS::Handle<JS::Promise>::operator JS::Promise*() const Unexecuted instantiation: JS::Handle<Web::Painting::Paintable>::operator Web::Painting::Paintable*() const Unexecuted instantiation: JS::Handle<Web::DOM::Document>::operator Web::DOM::Document*() const Unexecuted instantiation: JS::Handle<Web::HTML::MessagePort>::operator Web::HTML::MessagePort*() const Unexecuted instantiation: JS::Handle<Web::UIEvents::PointerEvent>::operator Web::UIEvents::PointerEvent*() const |
114 | | |
115 | | private: |
116 | | explicit Handle(NonnullRefPtr<HandleImpl> impl) |
117 | 0 | : m_impl(move(impl)) |
118 | 0 | { |
119 | 0 | } Unexecuted instantiation: JS::Handle<JS::ModuleNamespaceObject>::Handle(AK::NonnullRefPtr<JS::HandleImpl>) Unexecuted instantiation: JS::Handle<JS::Bytecode::Executable>::Handle(AK::NonnullRefPtr<JS::HandleImpl>) Unexecuted instantiation: JS::Handle<JS::Cell>::Handle(AK::NonnullRefPtr<JS::HandleImpl>) Unexecuted instantiation: JS::Handle<JS::ProxyObject>::Handle(AK::NonnullRefPtr<JS::HandleImpl>) Unexecuted instantiation: JS::Handle<JS::Temporal::PlainDate>::Handle(AK::NonnullRefPtr<JS::HandleImpl>) Unexecuted instantiation: JS::Handle<JS::Module>::Handle(AK::NonnullRefPtr<JS::HandleImpl>) Unexecuted instantiation: JS::Handle<Web::CSS::CSSStyleSheet>::Handle(AK::NonnullRefPtr<JS::HandleImpl>) Unexecuted instantiation: JS::Handle<Web::HTML::HTMLScriptElement>::Handle(AK::NonnullRefPtr<JS::HandleImpl>) Unexecuted instantiation: JS::Handle<Web::HTML::NavigableContainer>::Handle(AK::NonnullRefPtr<JS::HandleImpl>) Unexecuted instantiation: JS::Handle<Web::IntersectionObserver::IntersectionObserver>::Handle(AK::NonnullRefPtr<JS::HandleImpl>) Unexecuted instantiation: JS::Handle<Web::CSS::FontFace>::Handle(AK::NonnullRefPtr<JS::HandleImpl>) Unexecuted instantiation: JS::Handle<Web::DOM::Document>::Handle(AK::NonnullRefPtr<JS::HandleImpl>) Unexecuted instantiation: JS::Handle<Web::DOM::Element>::Handle(AK::NonnullRefPtr<JS::HandleImpl>) Unexecuted instantiation: JS::Handle<Web::DOM::Node>::Handle(AK::NonnullRefPtr<JS::HandleImpl>) Unexecuted instantiation: JS::Handle<Web::DOM::Node const>::Handle(AK::NonnullRefPtr<JS::HandleImpl>) Unexecuted instantiation: JS::Handle<JS::Object>::Handle(AK::NonnullRefPtr<JS::HandleImpl>) Unexecuted instantiation: JS::Handle<Web::WebIDL::CallbackType>::Handle(AK::NonnullRefPtr<JS::HandleImpl>) Unexecuted instantiation: JS::Handle<Web::HTML::Window>::Handle(AK::NonnullRefPtr<JS::HandleImpl>) Unexecuted instantiation: JS::Handle<Web::FileAPI::Blob>::Handle(AK::NonnullRefPtr<JS::HandleImpl>) Unexecuted instantiation: JS::Handle<Web::FileAPI::File>::Handle(AK::NonnullRefPtr<JS::HandleImpl>) Unexecuted instantiation: JS::Handle<Web::HTML::CanvasRenderingContext2D>::Handle(AK::NonnullRefPtr<JS::HandleImpl>) Unexecuted instantiation: JS::Handle<Web::WebGL::WebGLRenderingContext>::Handle(AK::NonnullRefPtr<JS::HandleImpl>) Unexecuted instantiation: JS::Handle<Web::DOM::Text>::Handle(AK::NonnullRefPtr<JS::HandleImpl>) Unexecuted instantiation: JS::Handle<Web::HTML::RadioNodeList>::Handle(AK::NonnullRefPtr<JS::HandleImpl>) Unexecuted instantiation: JS::Handle<Web::Fetch::Infrastructure::Request>::Handle(AK::NonnullRefPtr<JS::HandleImpl>) Unexecuted instantiation: JS::Handle<JS::Realm>::Handle(AK::NonnullRefPtr<JS::HandleImpl>) Unexecuted instantiation: JS::Handle<Web::Fetch::Infrastructure::FetchParams const>::Handle(AK::NonnullRefPtr<JS::HandleImpl>) Unexecuted instantiation: JS::Handle<Web::HTML::TextTrack>::Handle(AK::NonnullRefPtr<JS::HandleImpl>) Unexecuted instantiation: JS::Handle<Web::HTML::AudioTrack>::Handle(AK::NonnullRefPtr<JS::HandleImpl>) Unexecuted instantiation: JS::Handle<Web::HTML::VideoTrack>::Handle(AK::NonnullRefPtr<JS::HandleImpl>) Unexecuted instantiation: JS::Handle<Web::HTML::HTMLOptionElement>::Handle(AK::NonnullRefPtr<JS::HandleImpl>) Unexecuted instantiation: JS::Handle<Web::HTML::HTMLElement>::Handle(AK::NonnullRefPtr<JS::HandleImpl>) Unexecuted instantiation: JS::Handle<JS::FunctionObject>::Handle(AK::NonnullRefPtr<JS::HandleImpl>) Unexecuted instantiation: JS::Handle<Web::HTML::MessagePort>::Handle(AK::NonnullRefPtr<JS::HandleImpl>) Unexecuted instantiation: JS::Handle<Web::HTML::WindowProxy>::Handle(AK::NonnullRefPtr<JS::HandleImpl>) Unexecuted instantiation: JS::Handle<Web::DOM::Event>::Handle(AK::NonnullRefPtr<JS::HandleImpl>) Unexecuted instantiation: JS::Handle<JS::Promise>::Handle(AK::NonnullRefPtr<JS::HandleImpl>) Unexecuted instantiation: JS::Handle<Web::HTML::ImageData>::Handle(AK::NonnullRefPtr<JS::HandleImpl>) Unexecuted instantiation: JS::Handle<Web::Fetch::Request>::Handle(AK::NonnullRefPtr<JS::HandleImpl>) Unexecuted instantiation: JS::Handle<Web::Streams::ReadableStream>::Handle(AK::NonnullRefPtr<JS::HandleImpl>) Unexecuted instantiation: JS::Handle<Web::XHR::FormData>::Handle(AK::NonnullRefPtr<JS::HandleImpl>) Unexecuted instantiation: JS::Handle<Web::DOMURL::URLSearchParams>::Handle(AK::NonnullRefPtr<JS::HandleImpl>) Unexecuted instantiation: JS::Handle<Web::WebIDL::BufferSource>::Handle(AK::NonnullRefPtr<JS::HandleImpl>) Unexecuted instantiation: JS::Handle<Web::WebIDL::ArrayBufferView>::Handle(AK::NonnullRefPtr<JS::HandleImpl>) Unexecuted instantiation: JS::Handle<Web::CSS::MediaList>::Handle(AK::NonnullRefPtr<JS::HandleImpl>) Unexecuted instantiation: JS::Handle<Web::HTML::CanvasGradient>::Handle(AK::NonnullRefPtr<JS::HandleImpl>) Unexecuted instantiation: JS::Handle<Web::HTML::CanvasPattern>::Handle(AK::NonnullRefPtr<JS::HandleImpl>) Unexecuted instantiation: JS::Handle<Web::HTML::HTMLImageElement>::Handle(AK::NonnullRefPtr<JS::HandleImpl>) Unexecuted instantiation: JS::Handle<Web::SVG::SVGImageElement>::Handle(AK::NonnullRefPtr<JS::HandleImpl>) Unexecuted instantiation: JS::Handle<Web::HTML::HTMLVideoElement>::Handle(AK::NonnullRefPtr<JS::HandleImpl>) Unexecuted instantiation: JS::Handle<Web::HTML::HTMLCanvasElement>::Handle(AK::NonnullRefPtr<JS::HandleImpl>) Unexecuted instantiation: JS::Handle<Web::HTML::ImageBitmap>::Handle(AK::NonnullRefPtr<JS::HandleImpl>) Unexecuted instantiation: JS::Handle<Web::HTML::HTMLOptGroupElement>::Handle(AK::NonnullRefPtr<JS::HandleImpl>) Unexecuted instantiation: JS::Handle<Web::HTML::Path2D>::Handle(AK::NonnullRefPtr<JS::HandleImpl>) |
120 | | |
121 | | RefPtr<HandleImpl> m_impl; |
122 | | }; |
123 | | |
124 | | template<class T> |
125 | | inline Handle<T> make_handle(T* cell, SourceLocation location = SourceLocation::current()) |
126 | 0 | { |
127 | 0 | if (!cell) |
128 | 0 | return Handle<T> {}; |
129 | 0 | return Handle<T>::create(cell, location); |
130 | 0 | } Unexecuted instantiation: JS::Handle<JS::Bytecode::Executable> JS::make_handle<JS::Bytecode::Executable>(JS::Bytecode::Executable*, AK::SourceLocation) Unexecuted instantiation: JS::Handle<JS::ProxyObject> JS::make_handle<JS::ProxyObject>(JS::ProxyObject*, AK::SourceLocation) Unexecuted instantiation: JS::Handle<JS::Temporal::PlainDate> JS::make_handle<JS::Temporal::PlainDate>(JS::Temporal::PlainDate*, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::CSS::CSSStyleSheet> JS::make_handle<Web::CSS::CSSStyleSheet>(Web::CSS::CSSStyleSheet*, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::CSS::FontFace> JS::make_handle<Web::CSS::FontFace>(Web::CSS::FontFace*, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::DOM::Element> JS::make_handle<Web::DOM::Element>(Web::DOM::Element*, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::DOM::Node> JS::make_handle<Web::DOM::Node>(Web::DOM::Node*, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::HTML::MessagePort> JS::make_handle<Web::HTML::MessagePort>(Web::HTML::MessagePort*, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::DOM::Document> JS::make_handle<Web::DOM::Document>(Web::DOM::Document*, AK::SourceLocation) Unexecuted instantiation: JS::Handle<JS::Promise> JS::make_handle<JS::Promise>(JS::Promise*, AK::SourceLocation) |
131 | | |
132 | | template<class T> |
133 | | inline Handle<T> make_handle(T& cell, SourceLocation location = SourceLocation::current()) |
134 | 0 | { |
135 | 0 | return Handle<T>::create(&cell, location); |
136 | 0 | } Unexecuted instantiation: JS::Handle<JS::Module> JS::make_handle<JS::Module>(JS::Module&, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::DOM::Document> JS::make_handle<Web::DOM::Document>(Web::DOM::Document&, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::DOM::Node> JS::make_handle<Web::DOM::Node>(Web::DOM::Node&, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::DOM::Node const> JS::make_handle<Web::DOM::Node const>(Web::DOM::Node const&, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::DOM::Element> JS::make_handle<Web::DOM::Element>(Web::DOM::Element&, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::WebIDL::CallbackType> JS::make_handle<Web::WebIDL::CallbackType>(Web::WebIDL::CallbackType&, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::FileAPI::Blob> JS::make_handle<Web::FileAPI::Blob>(Web::FileAPI::Blob&, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::FileAPI::File> JS::make_handle<Web::FileAPI::File>(Web::FileAPI::File&, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::HTML::CanvasRenderingContext2D> JS::make_handle<Web::HTML::CanvasRenderingContext2D>(Web::HTML::CanvasRenderingContext2D&, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::WebGL::WebGLRenderingContext> JS::make_handle<Web::WebGL::WebGLRenderingContext>(Web::WebGL::WebGLRenderingContext&, AK::SourceLocation) Unexecuted instantiation: JS::Handle<JS::Realm> JS::make_handle<JS::Realm>(JS::Realm&, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::Fetch::Infrastructure::FetchParams const> JS::make_handle<Web::Fetch::Infrastructure::FetchParams const>(Web::Fetch::Infrastructure::FetchParams const&, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::HTML::HTMLOptionElement> JS::make_handle<Web::HTML::HTMLOptionElement>(Web::HTML::HTMLOptionElement&, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::HTML::HTMLElement> JS::make_handle<Web::HTML::HTMLElement>(Web::HTML::HTMLElement&, AK::SourceLocation) Unexecuted instantiation: JS::Handle<JS::Object> JS::make_handle<JS::Object>(JS::Object&, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::HTML::WindowProxy> JS::make_handle<Web::HTML::WindowProxy>(Web::HTML::WindowProxy&, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::DOM::Event> JS::make_handle<Web::DOM::Event>(Web::DOM::Event&, AK::SourceLocation) Unexecuted instantiation: JS::Handle<JS::Promise> JS::make_handle<JS::Promise>(JS::Promise&, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::HTML::ImageData> JS::make_handle<Web::HTML::ImageData>(Web::HTML::ImageData&, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::Fetch::Request> JS::make_handle<Web::Fetch::Request>(Web::Fetch::Request&, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::Streams::ReadableStream> JS::make_handle<Web::Streams::ReadableStream>(Web::Streams::ReadableStream&, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::XHR::FormData> JS::make_handle<Web::XHR::FormData>(Web::XHR::FormData&, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::DOMURL::URLSearchParams> JS::make_handle<Web::DOMURL::URLSearchParams>(Web::DOMURL::URLSearchParams&, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::CSS::MediaList> JS::make_handle<Web::CSS::MediaList>(Web::CSS::MediaList&, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::HTML::CanvasGradient> JS::make_handle<Web::HTML::CanvasGradient>(Web::HTML::CanvasGradient&, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::HTML::CanvasPattern> JS::make_handle<Web::HTML::CanvasPattern>(Web::HTML::CanvasPattern&, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::HTML::HTMLImageElement> JS::make_handle<Web::HTML::HTMLImageElement>(Web::HTML::HTMLImageElement&, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::SVG::SVGImageElement> JS::make_handle<Web::SVG::SVGImageElement>(Web::SVG::SVGImageElement&, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::HTML::HTMLVideoElement> JS::make_handle<Web::HTML::HTMLVideoElement>(Web::HTML::HTMLVideoElement&, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::HTML::HTMLCanvasElement> JS::make_handle<Web::HTML::HTMLCanvasElement>(Web::HTML::HTMLCanvasElement&, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::HTML::ImageBitmap> JS::make_handle<Web::HTML::ImageBitmap>(Web::HTML::ImageBitmap&, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::HTML::HTMLOptGroupElement> JS::make_handle<Web::HTML::HTMLOptGroupElement>(Web::HTML::HTMLOptGroupElement&, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::DOM::Text> JS::make_handle<Web::DOM::Text>(Web::DOM::Text&, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::HTML::MessagePort> JS::make_handle<Web::HTML::MessagePort>(Web::HTML::MessagePort&, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::HTML::Path2D> JS::make_handle<Web::HTML::Path2D>(Web::HTML::Path2D&, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::HTML::VideoTrack> JS::make_handle<Web::HTML::VideoTrack>(Web::HTML::VideoTrack&, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::HTML::AudioTrack> JS::make_handle<Web::HTML::AudioTrack>(Web::HTML::AudioTrack&, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::HTML::TextTrack> JS::make_handle<Web::HTML::TextTrack>(Web::HTML::TextTrack&, AK::SourceLocation) |
137 | | |
138 | | template<class T> |
139 | | inline Handle<T> make_handle(GCPtr<T> cell, SourceLocation location = SourceLocation::current()) |
140 | 0 | { |
141 | 0 | if (!cell) |
142 | 0 | return Handle<T> {}; |
143 | 0 | return Handle<T>::create(cell.ptr(), location); |
144 | 0 | } Unexecuted instantiation: JS::Handle<Web::HTML::NavigableContainer> JS::make_handle<Web::HTML::NavigableContainer>(JS::GCPtr<Web::HTML::NavigableContainer>, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::HTML::Window> JS::make_handle<Web::HTML::Window>(JS::GCPtr<Web::HTML::Window>, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::HTML::AudioTrack> JS::make_handle<Web::HTML::AudioTrack>(JS::GCPtr<Web::HTML::AudioTrack>, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::HTML::VideoTrack> JS::make_handle<Web::HTML::VideoTrack>(JS::GCPtr<Web::HTML::VideoTrack>, AK::SourceLocation) Unexecuted instantiation: JS::Handle<JS::FunctionObject> JS::make_handle<JS::FunctionObject>(JS::GCPtr<JS::FunctionObject>, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::HTML::MessagePort> JS::make_handle<Web::HTML::MessagePort>(JS::GCPtr<Web::HTML::MessagePort>, AK::SourceLocation) |
145 | | |
146 | | template<class T> |
147 | | inline Handle<T> make_handle(NonnullGCPtr<T> cell, SourceLocation location = SourceLocation::current()) |
148 | 0 | { |
149 | 0 | return Handle<T>::create(cell.ptr(), location); |
150 | 0 | } Unexecuted instantiation: JS::Handle<JS::ModuleNamespaceObject> JS::make_handle<JS::ModuleNamespaceObject>(JS::NonnullGCPtr<JS::ModuleNamespaceObject>, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::HTML::HTMLScriptElement> JS::make_handle<Web::HTML::HTMLScriptElement>(JS::NonnullGCPtr<Web::HTML::HTMLScriptElement>, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::IntersectionObserver::IntersectionObserver> JS::make_handle<Web::IntersectionObserver::IntersectionObserver>(JS::NonnullGCPtr<Web::IntersectionObserver::IntersectionObserver>, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::CSS::FontFace> JS::make_handle<Web::CSS::FontFace>(JS::NonnullGCPtr<Web::CSS::FontFace>, AK::SourceLocation) Unexecuted instantiation: JS::Handle<JS::Object> JS::make_handle<JS::Object>(JS::NonnullGCPtr<JS::Object>, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::FileAPI::File> JS::make_handle<Web::FileAPI::File>(JS::NonnullGCPtr<Web::FileAPI::File>, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::DOM::Element> JS::make_handle<Web::DOM::Element>(JS::NonnullGCPtr<Web::DOM::Element>, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::DOM::Text> JS::make_handle<Web::DOM::Text>(JS::NonnullGCPtr<Web::DOM::Text>, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::HTML::RadioNodeList> JS::make_handle<Web::HTML::RadioNodeList>(JS::NonnullGCPtr<Web::HTML::RadioNodeList>, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::FileAPI::Blob> JS::make_handle<Web::FileAPI::Blob>(JS::NonnullGCPtr<Web::FileAPI::Blob>, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::Fetch::Infrastructure::Request> JS::make_handle<Web::Fetch::Infrastructure::Request>(JS::NonnullGCPtr<Web::Fetch::Infrastructure::Request>, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::HTML::TextTrack> JS::make_handle<Web::HTML::TextTrack>(JS::NonnullGCPtr<Web::HTML::TextTrack>, AK::SourceLocation) Unexecuted instantiation: JS::Handle<JS::Promise> JS::make_handle<JS::Promise>(JS::NonnullGCPtr<JS::Promise>, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::WebIDL::BufferSource> JS::make_handle<Web::WebIDL::BufferSource>(JS::NonnullGCPtr<Web::WebIDL::BufferSource>, AK::SourceLocation) Unexecuted instantiation: JS::Handle<Web::WebIDL::ArrayBufferView> JS::make_handle<Web::WebIDL::ArrayBufferView>(JS::NonnullGCPtr<Web::WebIDL::ArrayBufferView>, AK::SourceLocation) |
151 | | |
152 | | template<> |
153 | | class Handle<Value> { |
154 | | public: |
155 | | Handle() = default; |
156 | | |
157 | | static Handle create(Value value, SourceLocation location) |
158 | 0 | { |
159 | 0 | if (value.is_cell()) |
160 | 0 | return Handle(value, &value.as_cell(), location); |
161 | 0 | return Handle(value); |
162 | 0 | } |
163 | | |
164 | 0 | auto cell() { return m_handle.cell(); } |
165 | 0 | auto cell() const { return m_handle.cell(); } |
166 | 0 | auto value() const { return *m_value; } |
167 | 0 | bool is_null() const { return m_handle.is_null() && !m_value.has_value(); } |
168 | | |
169 | 0 | bool operator==(Value const& value) const { return value == m_value; } |
170 | 0 | bool operator==(Handle<Value> const& other) const { return other.m_value == this->m_value; } |
171 | | |
172 | | private: |
173 | | explicit Handle(Value value) |
174 | 0 | : m_value(value) |
175 | 0 | { |
176 | 0 | } |
177 | | |
178 | | explicit Handle(Value value, Cell* cell, SourceLocation location) |
179 | 0 | : m_value(value) |
180 | 0 | , m_handle(Handle<Cell>::create(cell, location)) |
181 | 0 | { |
182 | 0 | } |
183 | | |
184 | | Optional<Value> m_value; |
185 | | Handle<Cell> m_handle; |
186 | | }; |
187 | | |
188 | | inline Handle<Value> make_handle(Value value, SourceLocation location = SourceLocation::current()) |
189 | 0 | { |
190 | 0 | return Handle<Value>::create(value, location); |
191 | 0 | } |
192 | | |
193 | | } |
194 | | |
195 | | namespace AK { |
196 | | |
197 | | template<typename T> |
198 | | struct Traits<JS::Handle<T>> : public DefaultTraits<JS::Handle<T>> { |
199 | | static unsigned hash(JS::Handle<T> const& handle) { return Traits<T>::hash(handle); } |
200 | | }; |
201 | | |
202 | | template<> |
203 | | struct Traits<JS::Handle<JS::Value>> : public DefaultTraits<JS::Handle<JS::Value>> { |
204 | 0 | static unsigned hash(JS::Handle<JS::Value> const& handle) { return Traits<JS::Value>::hash(handle.value()); } |
205 | | }; |
206 | | |
207 | | namespace Detail { |
208 | | template<typename T> |
209 | | inline constexpr bool IsHashCompatible<JS::Handle<T>, T> = true; |
210 | | |
211 | | template<typename T> |
212 | | inline constexpr bool IsHashCompatible<T, JS::Handle<T>> = true; |
213 | | |
214 | | } |
215 | | } |