Commit 67f28d2d authored by Joey Arhar's avatar Joey Arhar Committed by Commit Bot

[DevTools] Add null check to target.parentTarget() in NetworkLog

I forgot to add a null check as Dmitry suggested here:
https://chromium-review.googlesource.com/c/chromium/src/+/1357666/4#message-bc921121ce2c839de5e6a614a51ae48952d1a53a

Bug: 908592
Change-Id: I32d46fd2feef20b7c129ea5bf7075fd386befcb9
Reviewed-on: https://chromium-review.googlesource.com/c/1471220
Commit-Queue: Joey Arhar <jarhar@chromium.org>
Reviewed-by: default avatarErik Luo <luoe@chromium.org>
Cr-Commit-Position: refs/heads/master@{#632354}
parent a11f72df
...@@ -330,7 +330,8 @@ SDK.NetworkLog = class extends Common.Object { ...@@ -330,7 +330,8 @@ SDK.NetworkLog = class extends Common.Object {
if (!networkManager) if (!networkManager)
continue; continue;
const target = networkManager.target(); const target = networkManager.target();
if (!(target.type() === SDK.Target.Type.Worker && target.parentTarget().type() === SDK.Target.Type.ServiceWorker)) if (!(target.type() === SDK.Target.Type.Worker && target.parentTarget() &&
target.parentTarget().type() === SDK.Target.Type.ServiceWorker))
continue; continue;
// If there is a matching request that came before this one, keep it. // If there is a matching request that came before this one, keep it.
......
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