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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/timeline/TimelineUIUtils.js

Issue 2441933002: [DevTools] Refactor connection-related classes. (Closed)
Patch Set: test fixes Created 4 years, 2 months 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * Copyright (C) 2012 Intel Inc. All rights reserved. 3 * Copyright (C) 2012 Intel Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after
491 491
492 /** 492 /**
493 * @param {string} scriptId 493 * @param {string} scriptId
494 * @param {number} lineNumber 494 * @param {number} lineNumber
495 * @param {number} columnNumber 495 * @param {number} columnNumber
496 * @return {?string} 496 * @return {?string}
497 */ 497 */
498 function linkifyLocationAsText(scriptId, lineNumber, columnNumber) 498 function linkifyLocationAsText(scriptId, lineNumber, columnNumber)
499 { 499 {
500 var debuggerModel = WebInspector.DebuggerModel.fromTarget(target); 500 var debuggerModel = WebInspector.DebuggerModel.fromTarget(target);
501 if (!target || target.isDetached() || !scriptId || !debuggerModel) 501 if (!target || target.isDisposed() || !scriptId || !debuggerModel)
502 return null; 502 return null;
503 var rawLocation = debuggerModel.createRawLocationByScriptId(scriptId, li neNumber, columnNumber); 503 var rawLocation = debuggerModel.createRawLocationByScriptId(scriptId, li neNumber, columnNumber);
504 if (!rawLocation) 504 if (!rawLocation)
505 return null; 505 return null;
506 var uiLocation = WebInspector.debuggerWorkspaceBinding.rawLocationToUILo cation(rawLocation); 506 var uiLocation = WebInspector.debuggerWorkspaceBinding.rawLocationToUILo cation(rawLocation);
507 return uiLocation.linkText(); 507 return uiLocation.linkText();
508 } 508 }
509 509
510 /** 510 /**
511 * @return {?string} 511 * @return {?string}
(...skipping 1633 matching lines...) Expand 10 before | Expand all | Expand 10 after
2145 case warnings.V8Deopt: 2145 case warnings.V8Deopt:
2146 span.appendChild(WebInspector.linkifyURLAsNode("https://github.com/Googl eChrome/devtools-docs/issues/53", 2146 span.appendChild(WebInspector.linkifyURLAsNode("https://github.com/Googl eChrome/devtools-docs/issues/53",
2147 WebInspector.UIString("Not optimized"), undefined, true)); 2147 WebInspector.UIString("Not optimized"), undefined, true));
2148 span.createTextChild(WebInspector.UIString(": %s", eventData["deoptReaso n"])); 2148 span.createTextChild(WebInspector.UIString(": %s", eventData["deoptReaso n"]));
2149 break; 2149 break;
2150 default: 2150 default:
2151 console.assert(false, "Unhandled TimelineModel.WarningType"); 2151 console.assert(false, "Unhandled TimelineModel.WarningType");
2152 } 2152 }
2153 return span; 2153 return span;
2154 } 2154 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698