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

Maximum Call Stack exceeded error on the Chrome browser #21

Open
neweffort opened this issue Jun 18, 2017 · 1 comment
Open

Maximum Call Stack exceeded error on the Chrome browser #21

neweffort opened this issue Jun 18, 2017 · 1 comment

Comments

@neweffort
Copy link

Hi I tried to run JSPrime on my javascript code, I am facing an Maximum Call Stack exceeded error on the Chrome browser in the function checkFunctionAsReturns in engine.js. It is 1000 line long, sometimes the browser is crashing, is there any workaround for this ?Is there any upperbound on the file size ? is JSPrime not scalable ?

@TejaswiniU
Copy link

In engine.js at asignFunctionReturnValue() repetitive variable declaration made the loop run infinite times and caused heap out of memory . To overcome this loop optimisation is done by for (var j = 0; j < real_func_names.length ; j++)
to
var real_fun_name_length = real_func_names.length;
for (var j = 0; j < real_fun_name_length ; j++)
Hope this can help you

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