src/extensions/default/NavigationAndHistory/NavigationProvider.js
function _validateFrame(entry) {
        var deferred = new $.Deferred(),
            fileEntry = FileSystem.getFileForPath(entry.filePath);

        if (entry.inMem) {
            var indexInWS = MainViewManager.findInWorkingSet(entry.paneId, entry.filePath);
            // Remove entry if InMemoryFile is not found in Working set
            if (indexInWS === -1) {
                deferred.reject();
            } else {
                deferred.resolve();
            }
        } else {
            fileEntry.exists(function (err, exists) {
                if (!err && exists) {
                    // Additional check to handle external modification and mutation of the doc text affecting markers
                    if (fileEntry._hash !== entry._hash) {
                        deferred.reject();
                    } else if (!entry._validateMarkers()) {
                        deferred.reject();
                    } else {
                        deferred.resolve();
                    }
                } else {
                    deferred.reject();
                }
            });
        }

        return deferred.promise();
    }
function _validateFrame(entry) {
        var deferred = new $.Deferred(),
            fileEntry = FileSystem.getFileForPath(entry.filePath);

        if (entry.inMem) {
            var indexInWS = MainViewManager.findInWorkingSet(entry.paneId, entry.filePath);
            // Remove entry if InMemoryFile is not found in Working set
            if (indexInWS === -1) {
                deferred.reject();
            } else {
                deferred.resolve();
            }
        } else {
            fileEntry.exists(function (err, exists) {
                if (!err && exists) {
                    // Additional check to handle external modification and mutation of the doc text affecting markers
                    if (fileEntry._hash !== entry._hash) {
                        deferred.reject();
                    } else if (!entry._validateMarkers()) {
                        deferred.reject();
                    } else {
                        deferred.resolve();
                    }
                } else {
                    deferred.reject();
                }
            });
        }

        return deferred.promise();
    }
function _validateFrame ( entry ) { var deferred = new $ . Deferred ( ) , fileEntry = FileSystem . getFileForPath ( entry . filePath ) ; if ( entry . inMem ) { var indexInWS = MainViewManager . findInWorkingSet ( entry . paneId , entry . filePath ) ; // Remove entry if InMemoryFile is not found in Working set if ( indexInWS === - 1 ) { deferred . reject ( ) ; } else { deferred . resolve ( ) ; } } else { fileEntry . exists ( function ( err , exists ) { if ( ! err && exists ) { // Additional check to handle external modification and mutation of the doc text affecting markers if ( fileEntry . _hash !== entry . _hash ) { deferred . reject ( ) ; } else if ( ! entry . _validateMarkers ( ) ) { deferred . reject ( ) ; } else { deferred . resolve ( ) ; } } else { deferred . reject ( ) ; } } ) ; } return deferred . promise ( ) ; }
Function to check existence of a file entry, validity of markers
@private
Function to check existence of a file entry validity of markers