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

Unified Diff: third_party/WebKit/Source/devtools/front_end/sdk/Script.js

Issue 2264013004: [DevTools] Add error check before _reportDeprecatedCommentIfNeeded call (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed comments Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/devtools/front_end/sdk/Script.js
diff --git a/third_party/WebKit/Source/devtools/front_end/sdk/Script.js b/third_party/WebKit/Source/devtools/front_end/sdk/Script.js
index 5a6fc2453bfd43fdf230f85dea2b5d9a2e1e2477..b4a3e1f46bd7b3a908c395fab8da756695d5cb1f 100644
--- a/third_party/WebKit/Source/devtools/front_end/sdk/Script.js
+++ b/third_party/WebKit/Source/devtools/front_end/sdk/Script.js
@@ -180,8 +180,12 @@ WebInspector.Script.prototype = {
*/
function didGetScriptSource(error, source)
{
- WebInspector.Script._reportDeprecatedCommentIfNeeded(this, source);
- this._source = WebInspector.Script._trimSourceURLComment(error ? "" : source);
+ if (!error) {
+ WebInspector.Script._reportDeprecatedCommentIfNeeded(this, source);
+ this._source = WebInspector.Script._trimSourceURLComment(source);
+ } else {
+ this._source = "";
+ }
callback(this._source);
}
},
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698