blob: 9431e1e2a6ce71501c9549196438da46f18f9a6a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
/*
* Copyright (c) 2020, Matthew Olsson <mattco@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <LibJS/Runtime/GlobalObject.h>
#include <LibJS/Runtime/Symbol.h>
#include <LibJS/Runtime/SymbolObject.h>
namespace JS {
SymbolObject* SymbolObject::create(GlobalObject& global_object, Symbol& primitive_symbol)
{
return global_object.heap().allocate<SymbolObject>(global_object, primitive_symbol, *global_object.symbol_prototype());
}
SymbolObject::SymbolObject(Symbol& symbol, Object& prototype)
: Object(prototype)
, m_symbol(symbol)
{
}
SymbolObject::~SymbolObject()
{
}
void SymbolObject::visit_edges(Cell::Visitor& visitor)
{
Base::visit_edges(visitor);
visitor.visit(&m_symbol);
}
}
|