just found the way to wrapper native c++ class into mozilla spidermonkey
js class