Files
ladybird/Libraries/LibJS/Heap/Cell.h
Andreas Kling 74a80b7bfc LibJS: Mark JS::Cell::initialize() as MUST_UPCALL
Intermediate classes in the initialize() chain set up prototypes and
define properties. Forgetting to call Base::initialize() in any
override would silently skip that setup.
2026-02-06 13:50:54 +01:00

32 lines
607 B
C++

/*
* Copyright (c) 2020-2024, Andreas Kling <andreas@ladybird.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <LibGC/Cell.h>
#include <LibGC/CellAllocator.h>
#include <LibJS/Export.h>
#include <LibJS/Forward.h>
namespace JS {
class JS_API Cell : public GC::Cell {
GC_CELL(Cell, GC::Cell);
public:
MUST_UPCALL virtual void initialize(Realm&);
virtual bool is_generator_result() const { return false; }
virtual bool is_environment() const { return false; }
ALWAYS_INLINE VM& vm() const;
template<typename T>
bool fast_is() const = delete;
};
}