Fix access on undefined script object
Fix access on undefined script object

I saw the following stacktrace while running Chromium locally:

[205430:205430:1007/182130.681774:ERROR:CONSOLE(61)] "TypeError: Cannot read property 'originStackTrace' of null TypeError: Cannot read property 'originStackTrace' of null
    at Function._script (devtools://devtools/bundled/sources/sources_module.js:1469:197)
    at Sources.ScriptOriginPlugin.rightToolbarItems (devtools://devtools/bundled/sources/sources_module.js:1467:41)
    at Sources.UISourceCodeFrame.syncToolbarItems (devtools://devtools/bundled/sources/sources_module.js:335:215)
    at Sources.SourcesView._updateScriptViewToolbarItems (devtools://devtools/bundled/sources/sources_module.js:1215:168)
    at Sources.SourcesView._editorClosed (devtools://devtools/bundled/sources/sources_module.js:1226:43)
    at Sources.TabbedEditorContainer.dispatchEventToListeners (devtools://devtools/bundled/common/Object.js:12:173)
    at Sources.TabbedEditorContainer._tabClosed (devtools://devtools/bundled/sources/sources_module.js:1012:114)
    at TabbedPane.dispatchEventToListeners (devtools://devtools/bundled/common/Object.js:12:173)
    at TabbedPane._innerCloseTab (devtools://devtools/bundled/ui/TabbedPane.js:30:73)
    at TabbedPane.closeTabs (devtools://devtools/bundled/ui/TabbedPane.js:23:93)", source: devtools://devtools/bundled/host/InspectorFrontendHost.js (61)

It appears that the code in this file already assumes that script can be
undefined, but forgot this particular case.

Change-Id: I7b0c0d34b4d16a1d29656cd8d86e3f290f8bb227
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1845751
Commit-Queue: Tim Van der Lippe <dba8716ee7f8d16236046f74d2167cb94410f6ed@chromium.org>
Commit-Queue: Yang Guo <1cf0af8245a3a17a632a2c73531392b0f9761c76@chromium.org>
Auto-Submit: Tim Van der Lippe <dba8716ee7f8d16236046f74d2167cb94410f6ed@chromium.org>
Reviewed-by: Yang Guo <1cf0af8245a3a17a632a2c73531392b0f9761c76@chromium.org>
Cr-Original-Commit-Position: 972c6d2dc6dd5efdad1377c0d224e03eb8f276f7@{#703397}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: c69e1b709eb6fae315ae8138cc4f4a05fcc0f83b

ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend