Commit 8c0db936 authored by Andrey Lushnikov's avatar Andrey Lushnikov Committed by Commit Bot

DevTools: fix null-pointer exception with sourcemap infobar

Ther sourcemap infobar might never be created if user has clicked
"never show" button.

R=dgozman, einbinder

Change-Id: I5d494ca218bb3b793a0c734d5fcf92549821749d
Reviewed-on: https://chromium-review.googlesource.com/1018530Reviewed-by: default avatarDmitry Gozman <dgozman@chromium.org>
Commit-Queue: Andrey Lushnikov <lushnikov@chromium.org>
Cr-Commit-Position: refs/heads/master@{#552072}
parent 4bc98b37
...@@ -1412,6 +1412,8 @@ Sources.DebuggerPlugin = class extends Sources.UISourceCodeFrame.Plugin { ...@@ -1412,6 +1412,8 @@ Sources.DebuggerPlugin = class extends Sources.UISourceCodeFrame.Plugin {
this._sourceMapInfobar = UI.Infobar.create( this._sourceMapInfobar = UI.Infobar.create(
UI.Infobar.Type.Info, Common.UIString('Source Map detected.'), UI.Infobar.Type.Info, Common.UIString('Source Map detected.'),
Common.settings.createSetting('sourceMapInfobarDisabled', false)); Common.settings.createSetting('sourceMapInfobarDisabled', false));
if (!this._sourceMapInfobar)
return;
this._sourceMapInfobar.createDetailsRowMessage(Common.UIString( this._sourceMapInfobar.createDetailsRowMessage(Common.UIString(
'Associated files should be added to the file tree. You can debug these resolved source files as regular JavaScript files.')); 'Associated files should be added to the file tree. You can debug these resolved source files as regular JavaScript files.'));
this._sourceMapInfobar.createDetailsRowMessage(Common.UIString( this._sourceMapInfobar.createDetailsRowMessage(Common.UIString(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment