I will need some more convincing.
Why is this change necessary? The way I see it, you need a way to attach a
boolean metadata to script objects, and retrieve that piece of metadata
both via
API and in Javascript. The content of that metadata is not interesting to
V8, as
it only passes that through.
There are better ways to do this. Script objects are wrapped in JSValue
objects,
which are JSObjects. As such, you can just manipulate them as normal
Javascript
objects. You could
1) Attach a property to the script object to contain that metadata. If that
property has to be hidden, you can simply use a Symbol as property name. (It
seems to me that this is not a requirement, given that you implemented the
accessor).
2) Use a WeakMap to map script object to the metadata. This is virtually
equivalent to (1).
Either way, there is no need to make this intrusive change to V8.
Btw. this should actually be done for is_shared_cross_origin as well.
https://codereview.chromium.org/879553002/diff/60001/src/accessors.cc
File src/accessors.cc (right):
https://codereview.chromium.org/879553002/diff/60001/src/accessors.cc#newcode794
src/accessors.cc:794: void Accessors::ScriptIsDebuggerScriptGetter(
Why is this necessary? I don't see it for the is_shared_cross_origin
flag.
https://codereview.chromium.org/879553002/
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.