Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1803)

Side by Side Diff: tools/sodium/sodium.js

Issue 36833002: Fix bugs in Sodium (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Review feedback Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/objects.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
346 + 'function ' + code.name + source + "</pre>"; 346 var new_pre = document.createElement("pre");
347 sourceDivElement.innerHTML = newHtml; 347 new_pre.classList.add('prettyprint');
348 new_pre.classList.add('linenums');
349 new_pre.id = 'source-text-pre';
350 new_pre.textContent = 'function ' + code.name + source;
351 sourceDivElement.replaceChild(new_pre, sourceDivElement.firstChild);
352
348 try { 353 try {
349 // Wrap in try to work when offline. 354 // Wrap in try to work when offline.
350 PR.prettyPrint(); 355 PR.prettyPrint();
351 } catch (e) { 356 } catch (e) {
352 } 357 }
353 var sourceLineContainer = sourceDivElement.firstChild.firstChild; 358 var sourceLineContainer = sourceDivElement.firstChild.firstChild;
354 var lineCount = sourceLineContainer.childElementCount; 359 var lineCount = sourceLineContainer.childElementCount;
355 var current = sourceLineContainer.firstChild; 360 var current = sourceLineContainer.firstChild;
356 for (var i = 1; i < lineCount; ++i) { 361 for (var i = 1; i < lineCount; ++i) {
357 current.id = "source-line-" + i; 362 current.id = "source-line-" + i;
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 return { 405 return {
401 buildFunctionKindSelector: buildFunctionKindSelector, 406 buildFunctionKindSelector: buildFunctionKindSelector,
402 kindChangedHandler: kindChangedHandler, 407 kindChangedHandler: kindChangedHandler,
403 functionChangedHandler: functionChangedHandler, 408 functionChangedHandler: functionChangedHandler,
404 asmClick: asmClick, 409 asmClick: asmClick,
405 addressClick: addressClick, 410 addressClick: addressClick,
406 readLog: readLog 411 readLog: readLog
407 }; 412 };
408 413
409 })(); 414 })();
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698