@ -285,15 +285,3 @@ int duk_builtin_thread_current(duk_context *ctx) {
return 1;
}
/*
* toString(), valueOf()
*/
int duk_builtin_thread_prototype_to_string(duk_context *ctx) {
return DUK_RET_UNIMPLEMENTED_ERROR;
int duk_builtin_thread_prototype_value_of(duk_context *ctx) {
@ -285,7 +285,7 @@ static int init_heap_thread(duk_heap *heap) {
thr = duk_hthread_alloc(heap,
DUK_HOBJECT_FLAG_EXTENSIBLE |
DUK_HOBJECT_FLAG_THREAD |
DUK_HOBJECT_CLASS_AS_FLAGS(DUK_HOBJECT_CLASS_OBJECT));
DUK_HOBJECT_CLASS_AS_FLAGS(DUK_HOBJECT_CLASS_THREAD));
if (!thr) {
DUK_DPRINT("failed to alloc heap_thread");
return 0;
@ -305,6 +305,9 @@ static int init_heap_thread(duk_heap *heap) {
/* FIXME: this may now fail, and is not handled correctly */
duk_hthread_create_builtin_objects(thr);
/* default prototype (Note: 'thr' must be reachable) */
DUK_HOBJECT_SET_PROTOTYPE(thr, (duk_hobject *) thr, thr->builtins[DUK_BIDX_THREAD_PROTOTYPE]);
@ -1074,8 +1074,7 @@ bi_thread_prototype = {
'values': [
],
'functions': [
{ 'name': 'toString', 'native': 'duk_builtin_thread_prototype_to_string', 'length': 0 },
{ 'name': 'valueOf', 'native': 'duk_builtin_thread_prototype_value_of', 'length': 0 },
# toString() and valueOf() are inherited from Object.prototype