| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 'use strict'; |
| 4 | 5 |
| 5 const fs = require('fs'); | 6 const fs = require('fs'); |
| 6 const path = require('path'); | 7 const path = require('path'); |
| 7 | 8 |
| 8 const inspectorManifest = require('../front_end/inspector.json'); | 9 const inspectorManifest = require('../front_end/inspector.json'); |
| 9 const utils = require('./utils'); | 10 const utils = require('./utils'); |
| 10 | 11 |
| 11 const gnPath = path.resolve(__dirname, '..', 'BUILD.gn'); | 12 const gnPath = path.resolve(__dirname, '..', 'BUILD.gn'); |
| 12 const gnFile = fs.readFileSync(gnPath, 'utf-8'); | 13 const gnFile = fs.readFileSync(gnPath, 'utf-8'); |
| 13 const gnLines = gnFile.split('\n'); | 14 const gnLines = gnFile.split('\n'); |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 function selectGNLines(startLine, endLine) { | 57 function selectGNLines(startLine, endLine) { |
| 57 let lines = gnLines.map(line => line.trim()); | 58 let lines = gnLines.map(line => line.trim()); |
| 58 let startIndex = lines.indexOf(startLine); | 59 let startIndex = lines.indexOf(startLine); |
| 59 if (startIndex === -1) | 60 if (startIndex === -1) |
| 60 return []; | 61 return []; |
| 61 let endIndex = lines.indexOf(endLine, startIndex); | 62 let endIndex = lines.indexOf(endLine, startIndex); |
| 62 if (endIndex === -1) | 63 if (endIndex === -1) |
| 63 return []; | 64 return []; |
| 64 return lines.slice(startIndex + 1, endIndex); | 65 return lines.slice(startIndex + 1, endIndex); |
| 65 } | 66 } |
| OLD | NEW |