Skip to content

Commit cc688f7

Browse files
committed
ace: Delete dead code
1 parent 5283bfc commit cc688f7

File tree

3 files changed

+0
-37
lines changed

3 files changed

+0
-37
lines changed

doc/api/editorInfo.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@ Returns the `rep` object.
2929
## editorInfo.ace_applyPreparedChangesetToBase()
3030
## editorInfo.ace_setUserChangeNotificationCallback(f)
3131
## editorInfo.ace_setAuthorInfo(author, info)
32-
## editorInfo.ace_setAuthorSelectionRange(author, start, end)
33-
## editorInfo.ace_getUnhandledErrors()
34-
## editorInfo.ace_getDebugProperty(prop)
3532
## editorInfo.ace_fastIncorp(?)
3633
## editorInfo.ace_isCaret(?)
3734
## editorInfo.ace_getLineAndCharForPoint(?)

src/static/js/ace.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,6 @@ const Ace2Editor = function () {
120120
'applyPreparedChangesetToBase',
121121
'setUserChangeNotificationCallback',
122122
'setAuthorInfo',
123-
'setAuthorSelectionRange',
124123
'callWithAce',
125124
'execCommand',
126125
'replaceRange',
@@ -137,8 +136,6 @@ const Ace2Editor = function () {
137136

138137
this.exportText = () => loaded ? info.ace_exportText() : '(awaiting init)\n';
139138

140-
this.getDebugProperty = (prop) => info.ace_getDebugProperty(prop);
141-
142139
this.getInInternationalComposition =
143140
() => loaded ? info.ace_getInInternationalComposition() : null;
144141

@@ -152,9 +149,6 @@ const Ace2Editor = function () {
152149
// changes, and modify the changeset to be applied by applyPreparedChangesetToBase accordingly.
153150
this.prepareUserChangeset = () => loaded ? info.ace_prepareUserChangeset() : null;
154151

155-
// returns array of {error: <browser Error object>, time: +new Date()}
156-
this.getUnhandledErrors = () => loaded ? info.ace_getUnhandledErrors() : [];
157-
158152
const addStyleTagsFor = (doc, files) => {
159153
for (const file of files) {
160154
const link = doc.createElement('link');

src/static/js/ace2_inner.js

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,6 @@ function Ace2Inner(editorInfo, cssManagers) {
5050
const FORMATTING_STYLES = ['bold', 'italic', 'underline', 'strikethrough'];
5151
const SELECT_BUTTON_CLASS = 'selected';
5252

53-
const caughtErrors = [];
54-
5553
let thisAuthor = '';
5654

5755
let disposed = false;
@@ -375,13 +373,6 @@ function Ace2Inner(editorInfo, cssManagers) {
375373
});
376374

377375
cleanExit = true;
378-
} catch (e) {
379-
caughtErrors.push(
380-
{
381-
error: e,
382-
time: +new Date(),
383-
});
384-
throw e;
385376
} finally {
386377
const cs = currentCallStack;
387378
if (cleanExit) {
@@ -695,28 +686,9 @@ function Ace2Inner(editorInfo, cssManagers) {
695686
editorInfo.ace_setAuthorInfo = (author, info) => {
696687
setAuthorInfo(author, info);
697688
};
698-
editorInfo.ace_setAuthorSelectionRange = (author, start, end) => {
699-
changesetTracker.setAuthorSelectionRange(author, start, end);
700-
};
701-
702-
editorInfo.ace_getUnhandledErrors = () => caughtErrors.slice();
703689

704690
editorInfo.ace_getDocument = () => document;
705691

706-
editorInfo.ace_getDebugProperty = (prop) => {
707-
if (prop === 'debugger') {
708-
// obfuscate "eval" so as not to scare yuicompressor
709-
window['ev' + 'al']('debugger');
710-
} else if (prop === 'rep') {
711-
return rep;
712-
} else if (prop === 'window') {
713-
return window;
714-
} else if (prop === 'document') {
715-
return document;
716-
}
717-
return undefined;
718-
};
719-
720692
const now = () => Date.now();
721693

722694
const newTimeLimit = (ms) => {

0 commit comments

Comments
 (0)