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

Unified Diff: third_party/WebKit/Source/devtools/front_end/sources/SourceMapNamesResolver.js

Issue 2649593002: DevTools: add missing check for null script in SourceMapNamesResolver (Closed)
Patch Set: Created 3 years, 11 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/sources/SourceMapNamesResolver.js
diff --git a/third_party/WebKit/Source/devtools/front_end/sources/SourceMapNamesResolver.js b/third_party/WebKit/Source/devtools/front_end/sources/SourceMapNamesResolver.js
index 8768ac0740db7246ab2a2fda1f33365d3eaeff5c..2649b9bf678c2c274869f9f751d43e180bea9bb0 100644
--- a/third_party/WebKit/Source/devtools/front_end/sources/SourceMapNamesResolver.js
+++ b/third_party/WebKit/Source/devtools/front_end/sources/SourceMapNamesResolver.js
@@ -31,7 +31,8 @@ Sources.SourceMapNamesResolver._scopeIdentifiers = function(scope) {
var endLocation = scope.endLocation();
if (scope.type() === Protocol.Debugger.ScopeType.Global || !startLocation || !endLocation ||
- !startLocation.script().sourceMapURL || (startLocation.script() !== endLocation.script()))
+ !startLocation.script() || !startLocation.script().sourceMapURL ||
+ (startLocation.script() !== endLocation.script()))
return Promise.resolve(/** @type {!Array<!Sources.SourceMapNamesResolver.Identifier>}*/ ([]));
var script = startLocation.script();
@@ -332,7 +333,8 @@ Sources.SourceMapNamesResolver.resolveScopeInObject = function(scope) {
var endLocation = scope.endLocation();
if (scope.type() === Protocol.Debugger.ScopeType.Global || !startLocation || !endLocation ||
- !startLocation.script().sourceMapURL || startLocation.script() !== endLocation.script())
+ !startLocation.script() || !startLocation.script().sourceMapURL ||
+ startLocation.script() !== endLocation.script())
return scope.object();
return new Sources.SourceMapNamesResolver.RemoteObject(scope);
« 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