mirror of https://github.com/svaarala/duktape.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
1.5 KiB
43 lines
1.5 KiB
--- !ditz.rubyforge.org,2008-03-06/issue
|
|
title: "Proxy: custom feature allowing target and proxy to be the same"
|
|
desc: |-
|
|
This would correspond somewhat to Lua metatables; metatable is recorded in
|
|
the object itself. This saves one extra object at the cost of complicating
|
|
some of the algorithms (e.g. ES6 algorithms lookup properties also from the
|
|
target - same as the proxy in this case).
|
|
|
|
A simple approach would be to:
|
|
|
|
* Set the DUK_HOBJECT_FLAG_SPECIAL_PROXYOBJ for either kind of proxy.
|
|
|
|
* Indicate a revoked proxy with _handler = null.
|
|
|
|
* Indicate a custom proxy (target == proxy) by having _handler != null
|
|
and _target = null. This is used for revocation detection now, but
|
|
using only the _handler reference for revocation should be enough.
|
|
|
|
This is also nice in that the _handler and _target properties need to
|
|
be looked up anyway.
|
|
|
|
Another approach would be to use another object flag, but there is
|
|
some pressure to keep flag count in check (there are only a few free
|
|
flags right now).
|
|
type: :task
|
|
component: duk
|
|
release: v0.12
|
|
reporter: Sami Vaarala <sami.vaarala@iki.fi>
|
|
status: :unstarted
|
|
disposition:
|
|
creation_time: 2014-04-28 10:09:02.887074 Z
|
|
references: []
|
|
|
|
id: c2c0f091a515a1996db136eb3d126ed80407f651
|
|
log_events:
|
|
- - 2014-04-28 10:09:03.062982 Z
|
|
- Sami Vaarala <sami.vaarala@iki.fi>
|
|
- created
|
|
- ""
|
|
- - 2014-06-11 16:02:26.282116 Z
|
|
- Sami Vaarala <sami.vaarala@iki.fi>
|
|
- assigned to release v0.12 from v0.11
|
|
- ""
|
|
|