Problems with GetKeysInFixedArrayFor function

4 views
Skip to first unread message

G B

unread,
Jun 6, 2011, 8:14:38 AM6/6/11
to v8-u...@googlegroups.com
I've been working on a project built upon V8 and I tried to write
C++ versions of Seal() and isSealed() functions you can use with the API.
I've managed to develop a solution and it works fine except when the
object that I want to be sealed has an interceptor returning back
anything but the empty value (Handle<Value>()). I wrote a simplified
version of the code that emphasizes the core of my problem. I attached it
to this mail (v8_test.patch) along with a source for testing it (v8_test.cpp).
The static method Object::Test() works as follows: It takes an object,
gets its properties and sets them into a newly created object. It seems
to me that the GetKeysInFixedArrayFor() function behaves strangely in
this snippet. If you call the Object::Test() method the printf statements
(after the for-loop that sets the properties) work as expected - printing
the number of local properties - but when there is an interceptor that
returns any non-empty value they print out zeroes. I checked the properties
with the HasOwnProperty() method in another piece of code and they were there.
My questions are: 
 - Is this the way the GetKeysInFixedArrayFor() function is supposed to work?
 - If that is so how am I to evade that limitation?

Regards:
Gabor Ballabas
v8_test.patch
v8_test.cpp
Reply all
Reply to author
Forward
0 new messages