Edgewall Software
Modify

Opened 17 years ago

Closed 17 years ago

#5929 closed defect (invalid)

Compress option not supported in current version mozilla Context class

Reported by: mgainty@… Owned by: ?
Priority: high Milestone:
Component: general Version:
Severity: normal Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description (last modified by Tim Hatch)

./jslib/buildUtil.js
current contents
buildUtil.optimizeJs = function(/*String fileName*/fileName, /*String*/fileContents, /*String*/copyright, /*String*/optimizeType){
	//summary: either strips comments from string or compresses it.
	copyright = copyright || "";

	//Use rhino to help do minifying/compressing.
	//Even when using Dean Edwards' Packer, run it through the custom rhino so
	//that the source is formatted nicely for Packer's consumption (in particular get
	//commas after function definitions).
	var context = Packages.org.mozilla.javascript.Context.enter();
	try{
		// Use the interpreter for interactive input (copied this from Main rhino class).
		context.setOptimizationLevel(-1);

		var script = context.compileString(fileContents, fileName, 1, null);
		if(optimizeType.indexOf("shrinksafe") == 0){
			//Apply compression using custom compression call in Dojo-modified rhino.
			fileContents = new String(context.compressScript(script, 0, fileContents, 1));

http://www.mozilla.org/rhino/apidocs/org/mozilla/javascript/Context.html details no compression methods for Context class

disabling for now

26 Aug 2007 Martin

Attachments (0)

Change History (1)

comment:1 by Tim Hatch, 17 years ago

Description: modified (diff)
Resolution: invalid
Status: newclosed

Not our bug, please report to the proper bugtracker. As a helpful hint, mark up code blocks wherever you report them with

{{{

some code

}}}

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain ?.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from ? to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.