Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 335 var sourceText = getCurrentSourceText(); | 335 var sourceText = getCurrentSourceText(); |
| 336 processLines(sourceText, sourceText.length, processOneLine); | 336 processLines(sourceText, sourceText.length, processOneLine); |
| 337 return line; | 337 return line; |
| 338 } | 338 } |
| 339 | 339 |
| 340 function functionChangedHandler() { | 340 function functionChangedHandler() { |
| 341 var functionSelect = document.getElementById('function-selector-id'); | 341 var functionSelect = document.getElementById('function-selector-id'); |
| 342 var source = getCurrentSourceText(); | 342 var source = getCurrentSourceText(); |
| 343 var sourceDivElement = document.getElementById('source-text'); | 343 var sourceDivElement = document.getElementById('source-text'); |
| 344 var code = getCurrentCodeObject(); | 344 var code = getCurrentCodeObject(); |
| 345 var newHtml = "<pre class=\"prettyprint linenums\" id=\"source-text\">" | 345 var newHtml = "<pre class=\"prettyprint linenums\" id=\"source-text-pre\">" |
|
Dmitry Lomov (no reviews)
2013/10/23 09:06:50
Construct this with createElement instead of HTML
| |
| 346 + 'function ' + code.name + source + "</pre>"; | 346 + 'function ' + code.name + source + "</pre>"; |
| 347 sourceDivElement.innerHTML = newHtml; | 347 sourceDivElement.innerHTML = newHtml; |
| 348 try { | 348 try { |
| 349 // Wrap in try to work when offline. | 349 // Wrap in try to work when offline. |
| 350 PR.prettyPrint(); | 350 PR.prettyPrint(); |
| 351 } catch (e) { | 351 } catch (e) { |
| 352 } | 352 } |
| 353 var sourceLineContainer = sourceDivElement.firstChild.firstChild; | 353 var sourceLineContainer = sourceDivElement.firstChild.firstChild; |
| 354 var lineCount = sourceLineContainer.childElementCount; | 354 var lineCount = sourceLineContainer.childElementCount; |
| 355 var current = sourceLineContainer.firstChild; | 355 var current = sourceLineContainer.firstChild; |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 400 return { | 400 return { |
| 401 buildFunctionKindSelector: buildFunctionKindSelector, | 401 buildFunctionKindSelector: buildFunctionKindSelector, |
| 402 kindChangedHandler: kindChangedHandler, | 402 kindChangedHandler: kindChangedHandler, |
| 403 functionChangedHandler: functionChangedHandler, | 403 functionChangedHandler: functionChangedHandler, |
| 404 asmClick: asmClick, | 404 asmClick: asmClick, |
| 405 addressClick: addressClick, | 405 addressClick: addressClick, |
| 406 readLog: readLog | 406 readLog: readLog |
| 407 }; | 407 }; |
| 408 | 408 |
| 409 })(); | 409 })(); |
| OLD | NEW |