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

job not released and crash in setTimeout #28

Open
eco747 opened this issue Feb 20, 2018 · 1 comment
Open

job not released and crash in setTimeout #28

eco747 opened this issue Feb 20, 2018 · 1 comment

Comments

@eco747
Copy link

eco747 commented Feb 20, 2018

If you execute this code

function a( ) {}
setTimeout( a, 100 );

you will crash at the end of the program in debug mode.
This is due to the unreleased job in fx_setTimeoutCallback

2 missing object release

void fx_setTimeoutCallback(txJob* job)
{
	txMachine* the = job->the;
	fxBeginHost(the);
	{
		mxPush(job->argument);
		/* ARGC */
		mxPushInteger(1);
		/* THIS */
		mxPushUndefined();
		/* FUNCTION */
		mxPush(job->function);
		fxCall(the);
		the->stack++;
	}
	fxEndHost(the);

	// >>>>>>>>>> here:
       fxForget(the, &(job->argument));
       // >>>>>>>>>> and here:
       fxForget(the, &(job->function));
}
@phoddie
Copy link
Contributor

phoddie commented Feb 20, 2018

Howdy. Due to a lack of interest from Marvell Semiconductor, the party responsible for this repository, there is no longer support for issues here. Fortunately, XS development remains in active development by Moddable Tech. You'll find a substantial update to XS in the Moddable GitHub repository. If this issue is still present, please do report it there.

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

2 participants