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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/sources/JavaScriptSourceFrame.js

Issue 1699183003: [DevTools] Don't load sourcemap for blackboxed scripts (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@add-source-map-support-v3
Patch Set: Created 4 years, 10 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
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/bindings/DebuggerWorkspaceBinding.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) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 return; 155 return;
156 } 156 }
157 157
158 if (this._blackboxInfobar) 158 if (this._blackboxInfobar)
159 this._blackboxInfobar.dispose(); 159 this._blackboxInfobar.dispose();
160 160
161 var infobar = new WebInspector.Infobar(WebInspector.Infobar.Type.Warning , WebInspector.UIString("This script is blackboxed in debugger")); 161 var infobar = new WebInspector.Infobar(WebInspector.Infobar.Type.Warning , WebInspector.UIString("This script is blackboxed in debugger"));
162 this._blackboxInfobar = infobar; 162 this._blackboxInfobar = infobar;
163 163
164 infobar.createDetailsRowMessage(WebInspector.UIString("Debugger will ski p stepping through this script, and will not stop on exceptions")); 164 infobar.createDetailsRowMessage(WebInspector.UIString("Debugger will ski p stepping through this script, and will not stop on exceptions"));
165
166 var scriptFile = this._scriptFileForTarget.valuesArray()[0];
167 if (scriptFile.hasSourceMapURL())
168 infobar.createDetailsRowMessage(WebInspector.UIString("Source map fo und, but ignored for blackboxed file."));
165 infobar.createDetailsRowMessage(); 169 infobar.createDetailsRowMessage();
166 infobar.createDetailsRowMessage(WebInspector.UIString("Possible ways to cancel this behavior are:")); 170 infobar.createDetailsRowMessage(WebInspector.UIString("Possible ways to cancel this behavior are:"));
167 171
168 infobar.createDetailsRowMessage(" - ").createTextChild(WebInspector.UISt ring("Go to \"%s\" tab in settings", WebInspector.manageBlackboxingSettingsTabLa bel())); 172 infobar.createDetailsRowMessage(" - ").createTextChild(WebInspector.UISt ring("Go to \"%s\" tab in settings", WebInspector.manageBlackboxingSettingsTabLa bel()));
169 var unblackboxLink = infobar.createDetailsRowMessage(" - ").createChild( "span", "link"); 173 var unblackboxLink = infobar.createDetailsRowMessage(" - ").createChild( "span", "link");
170 unblackboxLink.textContent = WebInspector.UIString("Unblackbox this scri pt"); 174 unblackboxLink.textContent = WebInspector.UIString("Unblackbox this scri pt");
171 unblackboxLink.addEventListener("click", unblackbox, false); 175 unblackboxLink.addEventListener("click", unblackbox, false);
172 176
173 function unblackbox() 177 function unblackbox()
174 { 178 {
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 if (!url) 342 if (!url)
339 return; 343 return;
340 scriptFile.addSourceMapURL(url); 344 scriptFile.addSourceMapURL(url);
341 } 345 }
342 346
343 /** 347 /**
344 * @this {WebInspector.JavaScriptSourceFrame} 348 * @this {WebInspector.JavaScriptSourceFrame}
345 */ 349 */
346 function populateSourceMapMembers() 350 function populateSourceMapMembers()
347 { 351 {
348 if (this.uiSourceCode().project().type() === WebInspector.projectTyp es.Network && WebInspector.moduleSetting("jsSourceMapsEnabled").get()) { 352 if (this.uiSourceCode().project().type() === WebInspector.projectTyp es.Network && WebInspector.moduleSetting("jsSourceMapsEnabled").get() && !WebIns pector.blackboxManager.isBlackboxedUISourceCode(this.uiSourceCode())) {
349 if (this._scriptFileForTarget.size) { 353 if (this._scriptFileForTarget.size) {
350 var scriptFile = this._scriptFileForTarget.valuesArray()[0]; 354 var scriptFile = this._scriptFileForTarget.valuesArray()[0];
351 var addSourceMapURLLabel = WebInspector.UIString.capitalize( "Add ^source ^map\u2026"); 355 var addSourceMapURLLabel = WebInspector.UIString.capitalize( "Add ^source ^map\u2026");
352 contextMenu.appendItem(addSourceMapURLLabel, addSourceMapURL .bind(null, scriptFile)); 356 contextMenu.appendItem(addSourceMapURLLabel, addSourceMapURL .bind(null, scriptFile));
353 contextMenu.appendSeparator(); 357 contextMenu.appendSeparator();
354 } 358 }
355 } 359 }
356 } 360 }
357 361
358 return WebInspector.UISourceCodeFrame.prototype.populateTextAreaContextM enu.call(this, contextMenu, lineNumber, columnNumber).then(populateSourceMapMemb ers.bind(this)); 362 return WebInspector.UISourceCodeFrame.prototype.populateTextAreaContextM enu.call(this, contextMenu, lineNumber, columnNumber).then(populateSourceMapMemb ers.bind(this));
(...skipping 753 matching lines...) Expand 10 before | Expand all | Expand 10 after
1112 this.uiSourceCode().removeEventListener(WebInspector.UISourceCode.Events .WorkingCopyChanged, this._workingCopyChanged, this); 1116 this.uiSourceCode().removeEventListener(WebInspector.UISourceCode.Events .WorkingCopyChanged, this._workingCopyChanged, this);
1113 this.uiSourceCode().removeEventListener(WebInspector.UISourceCode.Events .WorkingCopyCommitted, this._workingCopyCommitted, this); 1117 this.uiSourceCode().removeEventListener(WebInspector.UISourceCode.Events .WorkingCopyCommitted, this._workingCopyCommitted, this);
1114 this.uiSourceCode().removeEventListener(WebInspector.UISourceCode.Events .TitleChanged, this._showBlackboxInfobarIfNeeded, this); 1118 this.uiSourceCode().removeEventListener(WebInspector.UISourceCode.Events .TitleChanged, this._showBlackboxInfobarIfNeeded, this);
1115 WebInspector.moduleSetting("skipStackFramesPattern").removeChangeListene r(this._showBlackboxInfobarIfNeeded, this); 1119 WebInspector.moduleSetting("skipStackFramesPattern").removeChangeListene r(this._showBlackboxInfobarIfNeeded, this);
1116 WebInspector.moduleSetting("skipContentScripts").removeChangeListener(th is._showBlackboxInfobarIfNeeded, this); 1120 WebInspector.moduleSetting("skipContentScripts").removeChangeListener(th is._showBlackboxInfobarIfNeeded, this);
1117 WebInspector.UISourceCodeFrame.prototype.dispose.call(this); 1121 WebInspector.UISourceCodeFrame.prototype.dispose.call(this);
1118 }, 1122 },
1119 1123
1120 __proto__: WebInspector.UISourceCodeFrame.prototype 1124 __proto__: WebInspector.UISourceCodeFrame.prototype
1121 } 1125 }
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/bindings/DebuggerWorkspaceBinding.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698