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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/bindings/DefaultScriptMapping.js

Issue 1907263002: DevTools: Fix all outstanding JavaScript style issues. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove yoda disable. fix throw parens Created 4 years, 8 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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 }, 92 },
93 93
94 /** 94 /**
95 * @param {!WebInspector.Script} script 95 * @param {!WebInspector.Script} script
96 */ 96 */
97 addScript: function(script) 97 addScript: function(script)
98 { 98 {
99 99
100 var splitURL = WebInspector.ParsedURL.splitURLIntoPathComponents(script. sourceURL); 100 var splitURL = WebInspector.ParsedURL.splitURLIntoPathComponents(script. sourceURL);
101 var url = splitURL[splitURL.length - 1]; 101 var url = splitURL[splitURL.length - 1];
102 url = "debugger:///VM" + script.scriptId + (url ? " " + url: ""); 102 url = "debugger:///VM" + script.scriptId + (url ? " " + url : "");
103 103
104 var uiSourceCode = this._project.createUISourceCode(url, WebInspector.re sourceTypes.Script); 104 var uiSourceCode = this._project.createUISourceCode(url, WebInspector.re sourceTypes.Script);
105 uiSourceCode[WebInspector.DefaultScriptMapping._scriptSymbol] = script; 105 uiSourceCode[WebInspector.DefaultScriptMapping._scriptSymbol] = script;
106 this._uiSourceCodeForScriptId.set(script.scriptId, uiSourceCode); 106 this._uiSourceCodeForScriptId.set(script.scriptId, uiSourceCode);
107 this._scriptIdForUISourceCode.set(uiSourceCode, script.scriptId); 107 this._scriptIdForUISourceCode.set(uiSourceCode, script.scriptId);
108 this._project.addUISourceCodeWithProvider(uiSourceCode, script); 108 this._project.addUISourceCodeWithProvider(uiSourceCode, script);
109 109
110 this._debuggerWorkspaceBinding.setSourceMapping(this._debuggerModel.targ et(), uiSourceCode, this); 110 this._debuggerWorkspaceBinding.setSourceMapping(this._debuggerModel.targ et(), uiSourceCode, this);
111 this._debuggerWorkspaceBinding.pushSourceMapping(script, this); 111 this._debuggerWorkspaceBinding.pushSourceMapping(script, this);
112 }, 112 },
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 } 146 }
147 147
148 /** 148 /**
149 * @param {!WebInspector.Target} target 149 * @param {!WebInspector.Target} target
150 * @return {string} 150 * @return {string}
151 */ 151 */
152 WebInspector.DefaultScriptMapping.projectIdForTarget = function(target) 152 WebInspector.DefaultScriptMapping.projectIdForTarget = function(target)
153 { 153 {
154 return "debugger:" + target.id(); 154 return "debugger:" + target.id();
155 } 155 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698