You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (!(words instanceof Array)) words = words.split(" ");
'Array' here targets totally different memory reference when each of the sources run inside the 'vm' individually. This happens due to JavaScript engine optimization under very low resources. JS engine moves the reference of Array to another point while the optimized function code still checks for the same reference. Indeed this is JS engine related issue ( very tricky one ) but I don't know if it's something fixable in a short term. I bet this would also fail on iframe / webworker on browsers.
Suggestion: (not sure if this is cross browser but it does the magic on node/jxcore)
if(!Array.isArray(words)) ....
The text was updated successfully, but these errors were encountered:
If UglifyJS could execute all it's source files under the same VM at once, this wouldn't be a problem. Actually this would be the best way. We may not be sure when JS engine is going to issue a garbage collection and how it will effect the actual memory references / optimizations.
We started to have this issue on JXcore - under limited memory environments (mobile, mini boards..)
Line: https://github.com/mishoo/UglifyJS2/blob/master/lib/utils.js#L223
Code:
'Array' here targets totally different memory reference when each of the sources run inside the 'vm' individually. This happens due to JavaScript engine optimization under very low resources. JS engine moves the reference of Array to another point while the optimized function code still checks for the same reference. Indeed this is JS engine related issue ( very tricky one ) but I don't know if it's something fixable in a short term. I bet this would also fail on iframe / webworker on browsers.
Suggestion: (not sure if this is cross browser but it does the magic on node/jxcore)
The text was updated successfully, but these errors were encountered: