mrennie/crossfire

Multiple scripts defining Cc, Ci, and Cu as "const"

itewksbu opened this issue · 3 comments

Both the SocketTransport.js and CommandLineHandler.js define the global Cc, Ci, and Cu variables as "const". The side effect of this is that CommandLineHandler is loaded before SocketTransport. Then when SocketTrasnport is loaded it fails at trying to define Cc as "const" since it is already defined. Then when crossfire.js attempts to load it fails because SocketTransport failed to load. So then the entire extension point fails to work.

I pushed a fix to: https://github.com/firebug-crossfire/crossfire/commit/4ec13658209df0426fb43ceec23fddb7ef1204fc

that removes all use of the aliases for those types, that way it does not matter what order they are loaded in.

not sure what happened but that last commit did not include the changes to SocketTransport.js, which are here:

https://github.com/firebug-crossfire/crossfire/commit/4b4c34be85e80fc50c7fa32b89bd8a77c55a0f90

HEAD works for me now.