Skip to content

Commit

Permalink
comments
Browse files Browse the repository at this point in the history
  • Loading branch information
connorjclark committed Dec 11, 2019
1 parent e6fde71 commit caa269b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lighthouse-core/lib/cdt/SDK.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ const SDK = {
...require('./generated/SourceMap.js'),
};

// CDT pollutes Array.prototype w/ `upperBound`. SourceMap
// relies on this, but only for `.mappings`. To avoid global pollution,
// we explicitly set `.mappings.upperBound`.
const originalMappings = SDK.TextSourceMap.prototype.mappings;
SDK.TextSourceMap.prototype.mappings = function() {
const mappings = originalMappings.call(this);
Expand Down Expand Up @@ -55,7 +58,7 @@ function upperBound(object, comparator, left, right) {
return r;
}

// Add `lastColumnNumber` to mappings.
// Add `lastColumnNumber` to mappings. This will eventually be added to CDT.
// @ts-ignore
SDK.TextSourceMap.prototype.computeLastGeneratedColumns = function() {
const mappings = this.mappings();
Expand Down

0 comments on commit caa269b

Please sign in to comment.