mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-15 14:25:52 +00:00
Bug 929225 - Enable syntax highlighting for large files in the debugger;r=bgrins
--HG-- extra : commitid : ko3upKBSCD
This commit is contained in:
parent
4bbd072a06
commit
147e8c91cd
@ -5,7 +5,6 @@
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
"use strict";
|
||||
|
||||
const SOURCE_SYNTAX_HIGHLIGHT_MAX_FILE_SIZE = 1048576; // 1 MB in bytes
|
||||
const SOURCE_URL_DEFAULT_MAX_LENGTH = 64; // chars
|
||||
const STACK_FRAMES_SOURCE_URL_MAX_LENGTH = 15; // chars
|
||||
const STACK_FRAMES_SOURCE_URL_TRIM_SECTION = "center";
|
||||
@ -408,12 +407,6 @@ var DebuggerView = {
|
||||
* The source text content.
|
||||
*/
|
||||
_setEditorMode: function(aUrl, aContentType = "", aTextContent = "") {
|
||||
// Avoid setting the editor mode for very large files.
|
||||
// Is this still necessary? See bug 929225.
|
||||
if (aTextContent.length >= SOURCE_SYNTAX_HIGHLIGHT_MAX_FILE_SIZE) {
|
||||
return void this.editor.setMode(Editor.modes.text);
|
||||
}
|
||||
|
||||
// Use JS mode for files with .js and .jsm extensions.
|
||||
if (SourceUtils.isJavaScript(aUrl, aContentType)) {
|
||||
return void this.editor.setMode(Editor.modes.js);
|
||||
|
Loading…
Reference in New Issue
Block a user