Skip to content
This repository has been archived by the owner on Apr 3, 2024. It is now read-only.

Commit

Permalink
Cleanup todos
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Loring committed Jan 13, 2016
1 parent a95b308 commit a782875
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 16 deletions.
2 changes: 0 additions & 2 deletions lib/debuglet.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,6 @@ Debuglet.prototype.scheduleRegistration_ = function(seconds) {
that.logger_.error('Failed to re-register debuggee: ' + err);
that.logger_.error('Disabling gcloud debuglet');
that.stop(); // fatal error
// TODO: unless this is a configuration/fatal problem, maybe we should try
// again after a larger delay?
}

setTimeout(function() {
Expand Down
2 changes: 0 additions & 2 deletions lib/scanner.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,6 @@ function computeStats(fileList, callback) {
if (pending === 0) {
// Sort the hashes to get a deterministic order as the files may not
// be in the same order each time we scan the disk.
// TODO: it might be faster to sort if we had a binary hash instead
// of a string.
var buffer = hashes.sort().join();
var sha1 = crypto.createHash('sha1').update(buffer).digest('hex');
callback(null, 'SHA1-' + sha1, statistics);
Expand Down
7 changes: 1 addition & 6 deletions lib/state.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ module.exports = {
evaluate: evaluate
};

//var util = require('util');
var assert = require('assert');

var StatusMessage = require('./apiclasses.js').StatusMessage;
Expand Down Expand Up @@ -332,11 +331,7 @@ StateResolver.prototype.resolveVariable_ = function(name, value) {
};

StateResolver.prototype.getVariableIndex_ = function(value) {
// TODO(ofrobots): Once V8 de-optimization issue is fixed, come back and
// re-evaluate this method. The naïve indexOf scan be sped up by monkey
// patching the value mirror object with an index. Not sure if it is
// significantly faster to be worth doing at this point.
var idx = this.rawVariableTable_.indexOf(value);
var idx = this.rawVariableTable_.indexOf(value);
if (idx === -1) {
idx = this.storeObjectToVariableTable_(value);
}
Expand Down
6 changes: 0 additions & 6 deletions lib/v8debugapi.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@ module.exports.create = function(logger_, config_, fileStats_) {
messages.ERROR_COMPILING_CONDITION);
}
}
// TODO: more robust file finding of compiled files
scriptPath = scriptPath.substr(0, scriptPath.lastIndexOf('.')) + '.js';
var mappingUrl = scriptPath + '.map';

Expand Down Expand Up @@ -231,7 +230,6 @@ module.exports.create = function(logger_, config_, fileStats_) {
function setInternal(breakpoint, scriptPath, compile, cb) {
// Parse and validate conditions and watch expressions for correctness and
// immutability
// TODO: make it an option for users to disable validation
var ast = null;
if (breakpoint.condition) {
var acorn = require('acorn');
Expand Down Expand Up @@ -273,9 +271,6 @@ module.exports.create = function(logger_, config_, fileStats_) {
StatusMessage.BREAKPOINT_SOURCE_LOCATION,
messages.SOURCE_FILE_AMBIGUOUS);
}
// TODO: need to cleanup the above
// TODO: need test coverage for the above
// TODO: work with debug server to come up with a more robust solution

if (breakpoint.location.line >= fileStats[matchingScript].lines) {
return setErrorStatusAndCallback(cb, breakpoint,
Expand Down Expand Up @@ -509,7 +504,6 @@ module.exports.create = function(logger_, config_, fileStats_) {
return { value: true };
}

// TODO: we already parsed breakpoint.condition before -- pass it somehow
var result = state.evaluate(breakpoint.condition, execState.frame(0));

if (result.error) {
Expand Down

0 comments on commit a782875

Please sign in to comment.