mirror of
https://github.com/matrix-construct/construct
synced 2025-02-19 18:20:19 +01:00
ircd::js: Add JSProp flags as arguments for constructing trap.
This commit is contained in:
parent
0ed531fff1
commit
d5fd794511
2 changed files with 5 additions and 2 deletions
|
@ -85,7 +85,7 @@ class trap
|
|||
|
||||
template<class... args> object operator()(const object &parent, args&&...);
|
||||
|
||||
trap(const std::string &path, const uint32_t &flags = 0);
|
||||
trap(const std::string &path, const uint &flags = 0, const uint &prop_flags = 0);
|
||||
trap(trap &&) = delete;
|
||||
trap(const trap &) = delete;
|
||||
virtual ~trap() noexcept;
|
||||
|
|
|
@ -356,7 +356,8 @@ ircd::js::trap_function::on_call(object::handle,
|
|||
//
|
||||
|
||||
ircd::js::trap::trap(const std::string &path,
|
||||
const uint32_t &flags)
|
||||
const uint &flags,
|
||||
const uint &prop_flags)
|
||||
:parent{[&path]
|
||||
{
|
||||
const auto ret(rsplit(path, ".").first);
|
||||
|
@ -395,6 +396,8 @@ ircd::js::trap::trap(const std::string &path,
|
|||
{ this } // reserved[0] TODO: ?????????
|
||||
})}
|
||||
{
|
||||
ps[0].flags |= prop_flags;
|
||||
|
||||
add_this();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue