Skip to content

Conversation

@kynx
Copy link

@kynx kynx commented Nov 3, 2015

Beware: I am not a C++ programmer! But I was curious how easy it would be to fix #172 and had a look through the v8js_v8jsobject_(has|read|write|unset)_property code. I got wondering what would happen if I just stripped out the && !v8obj->IsFunction() conditions.

And blow me, it seems to work! Maybe this is a really really bad idea, but here it is.

stesie added a commit that referenced this pull request Nov 3, 2015
Added ability to set properties on V8Function
@stesie stesie merged commit 33d2de5 into phpv8:master Nov 3, 2015
@stesie
Copy link
Member

stesie commented Nov 3, 2015

Very nice catch and definitely a lacking feature :-)
... and well implemented, I don't know a reason why not to remove the IsFunction check there.

Thank you @kynx!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants