Opened 13 years ago

Closed 12 years ago

#611 closed defect (fixed)

ShrinkSafe breaks prototype.js

Reported by: KemenAran Owned by: alex
Priority: high Milestone: 0.9
Component: BuildTools Version: 0.2
Keywords: ShrinkSafe, prototype Cc:
Blocked By: Blocking:

Description

ShrinkSafe? breaks prototype.js v1.5.0_pre1. In two functions, the first parameter of the function hasn't the same name in the function declaration and in the function body.

Location of the problems :

First compress prototype.js v1.5.0_pre1, without stripping newlines. Then go to the line 1326-1327, which should read :

},observe:function(_161,name,_163,_164){
var _165=$(_165);

The original source code is :

  observe: function(element, name, observer, useCapture) {
	var element = $(element);

Thus var _165=$(_165); should be var _161=$(_161); - actually vars _161 and _165 are duplicated.

The same problem occurs at lines 1333-1334. The compression seems to work elsewhere.

Change History (2)

comment:1 Changed 13 years ago by dylan

Component: GeneralBuildTools
Milestone: 0.5
Owner: changed from anonymous to alex

comment:2 Changed 12 years ago by alex

Resolution: fixed
Status: newclosed

appears to have been fixed in the last year or so:

obelisk:/tmp alex$ cat ssbug.js 
var tmp = {
  observe: function(element, name, observer, useCapture){
                var element = $(element);
  }
}
obelisk:/tmp alex$ rhino -c ssbug.js 
var tmp={observe:function(_1,_2,_3,_4){
var _1=$(_1);
}};
Note: See TracTickets for help on using tickets.