CLOSED TREE
Backed out changeset 9af9111e9c27 (bug 1126089)
Backed out changeset 288efd5e2ca0 (bug 1126089)
Backed out changeset 3bcebfd13538 (bug 1126089)
Break up the steps of creating a socket listener and opening it. This allows
more socket options beyond port / path to be added and controlled more
naturally, instead of jamming them into the open method.
Changes to the RemoteDebuggerServer main.js and child.js to provide hooks needed by modules which want to propagate their data lazily between the e10s parent and child processes.
In the future with multiple types of socket listeners (bare TCP vs. TLS), each
will need its own logic for allowing connection. This is moved to the listener
level, rather than living at the level of the entire server.
Relocate the debugger client's connect and server's listen functionality in a
separate file. This isolates the security-sensitive socket handling pieces, and
also enables easier extension to make room for TLS sockets.
The -*- file variable lines -*- establish per-file settings that Emacs will
pick up. This patch makes the following changes to those lines (and touches
nothing else):
- Never set the buffer's mode.
Years ago, Emacs did not have a good JavaScript mode, so it made sense
to use Java or C++ mode in .js files. However, Emacs has had js-mode for
years now; it's perfectly serviceable, and is available and enabled by
default in all major Emacs packagings.
Selecting a mode in the -*- file variable line -*- is almost always the
wrong thing to do anyway. It overrides Emacs's default choice, which is
(now) reasonable; and even worse, it overrides settings the user might
have made in their '.emacs' file for that file extension. It's only
useful when there's something specific about that particular file that
makes a particular mode appropriate.
- Correctly propagate settings that establish the correct indentation
level for this file: c-basic-offset and js2-basic-offset should be
js-indent-level. Whatever value they're given should be preserved;
different parts of our tree use different indentation styles.
- We don't use tabs in Mozilla JS code. Always set indent-tabs-mode: nil.
Remove tab-width: settings, at least in files that don't contain tab
characters.
- Remove js2-mode settings that belong in the user's .emacs file, like
js2-skip-preprocessor-directives.