Closed crawlik closed 12 years ago
It looks like UglifyJS can't parse the file for some reason. Could be a bug in UglifyJS or the JS is somehow slightly broken. I don't have the source code so I don't have any idea how to solve this. The free version works fine.
It'd help if you could extract a minimal offending example.
Looks like that is the one. It reproduces exactly the same error. Removing debugger;
line eliminates the error. Don't know exactly what this line is for. Looks like debugging leftover to me.
dhtmlXGridObject.prototype.splitAt = function (a) {
this._fake.doColResize = function (b, c, d, e, f) {
debugger;
var k = -1,
g = 0;
if (arguments[1]._cellIndex == a - 1) {
k = this._initalSplR + (b.clientX - e);
if (!this._initalSplF) this._initalSplF = arguments[3] + this.objBox.scrollWidth - this.objBox.offsetWidth;
if (this.objBox.scrollWidth == this.objBox.offsetWidth && (this._fake.alter_split_resize || b.clientX - e > 0)) arguments[3] = this._initalSplF || arguments[3]
} else if (this.obj.offsetWidth < this.entBox.offsetWidth) k = this.obj.offsetWidth;
g = this.doColResizeA.apply(this, arguments);
this._correctSplit(k);
this.resized = this._fake.resized = 1;
return g
};
};
Ah yes, debugger. It's fixed in UglifyJS master, but the released version doesn't seem to have it. It'll be fixed in uglifier when UglifyJS does a release.
Yeah... just pulled UglifyJS master and tried to uglify code with debugger. It worked. @lautis, I am kind of confused. Why we need UglifyJS release? As far as I understand uglifier build just pulls latest from UglifyJS master and packages in into gem. So I am wondering why uglifier build won't solve this problem? Last uglifier release was done on March 27, 2012 basically two week before 'debugger' issue was merged into master.
Of course, I could create a new version of uglifier based on trunk. I just feel more comfortable when using released version instead of whatever happened to be in master when I made the release.
I could update the the uglifyjs code here at master branch and then the brave ones could use that version with git dependency in their Gemfiles.
it will work :)
@lautis, one more question just to feed my curiosity. What is the process to generate uglify.js?
Master is now updated. Uglifier has uglifyjs as git submodule. Javascript source can be packaged with node build
.
Thanks. Worked for me. JavaScript got compressed. Noticed that compression uses a lot of computing power. System Load Average was around ~20.
Guys, Please take a look at this post http://forum.dhtmlx.com/viewtopic.php?f=2&t=24298 and let me know if there is a way to work around the problem. Thanks a lot.