Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix test_api.cpp's test_ObjectProtoToString failures #52

Open
zpao opened this issue Apr 13, 2011 · 3 comments
Open

Fix test_api.cpp's test_ObjectProtoToString failures #52

zpao opened this issue Apr 13, 2011 · 3 comments

Comments

@zpao
Copy link
Owner

zpao commented Apr 13, 2011

Calling an unimplemented API: void v8::FunctionTemplate::SetClassName(v8::Handle<v8::String>)
Calling an unimplemented API: v8::Local<v8::Function> v8::FunctionTemplate::GetFunction()

And then it segfaults.

@robarnold
Copy link

This is failing because we don't implement SetClassName. I have a hackish solution in mind.

@robarnold
Copy link

Hmm, nevermind. This is rather tricky to support.

@sdwilsh
Copy link

sdwilsh commented Apr 25, 2011

This no longer crashes, but does fail:

TEST-INFO | (c:/Code/v8monkey/js/src/v8api/test/test_api.cpp) | Running test_ObjectProtoToString.
TEST-UNEXPECTED-FAIL | c:/Code/v8monkey/js/src/v8api/test/test_api.cpp | Expected true, got false at line 3242
TEST-UNEXPECTED-FAIL | c:/Code/v8monkey/js/src/v8api/test/test_api.cpp | Expected true, got false at line 3246
TEST-UNEXPECTED-FAIL | c:/Code/v8monkey/js/src/v8api/test/test_api.cpp | Expected true, got false at line 3250
TEST-UNEXPECTED-FAIL | c:/Code/v8monkey/js/src/v8api/test/test_api.cpp | Expected true, got false at line 3255

The failure at line 3242 looks to be the case that the replaced toString function is not being called (probably because we don't set the prototype of our function properly?)

The failure at line 3246 is because we don't have the right name. We could work around the lack of a JS API here by doing a memcpy with a new object with the right name. Scary, but doable. The failure on line 3250 is likely related.

I do not understand what the failure at line 3255 is.

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

No branches or pull requests

3 participants