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

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

Issue 2441933002: [DevTools] Refactor connection-related classes. (Closed)
Patch Set: tests.js Created 4 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
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/sdk/WorkerManager.js ('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 /* 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 1632 matching lines...) Expand 10 before | Expand all | Expand 10 after
2144 case warnings.V8Deopt: 2144 case warnings.V8Deopt:
2145 span.appendChild(WebInspector.linkifyURLAsNode("https://github.com/Googl eChrome/devtools-docs/issues/53", 2145 span.appendChild(WebInspector.linkifyURLAsNode("https://github.com/Googl eChrome/devtools-docs/issues/53",
2146 WebInspector.UIString("Not optimized"), undefined, true)); 2146 WebInspector.UIString("Not optimized"), undefined, true));
2147 span.createTextChild(WebInspector.UIString(": %s", eventData["deoptReaso n"])); 2147 span.createTextChild(WebInspector.UIString(": %s", eventData["deoptReaso n"]));
2148 break; 2148 break;
2149 default: 2149 default:
2150 console.assert(false, "Unhandled TimelineModel.WarningType"); 2150 console.assert(false, "Unhandled TimelineModel.WarningType");
2151 } 2151 }
2152 return span; 2152 return span;
2153 }; 2153 };
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/sdk/WorkerManager.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698