The FormatterWorkerPool._onWorkerMessage method can call its current
task's callback with null as its parameter.
This happen when the formatter work doesn't send event data back.
When this happens, it creates exceptions in the ScriptFormatter class.
So, this change simply guards against this.
Bug: 1132284
Change-Id: I9a995a2b81b5e211ae1690caad7bf56a4772c354
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2431404
Reviewed-by: Jose Leal <joselea@microsoft.com>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Commit-Queue: Patrick Brosset <patrick.brosset@microsoft.com>
This CL changes references to self.Common.settings (the global
instance of SDK.Common.Settings) over to
Common.Settings.Settings.instance(). To keep both TypeScript and
Closure happy we must make a method on the Settings class itself,
since it only allows private constructors to be accessed by static
methods on the class.
Bug: 1058320
Change-Id: I04afc8caf64acf29cdda13ef03ad05cfff4786a1
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2091450
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
By using the script in crrev.com/c/devtools/devtools-frontend/+/1942289
we can prune all globals that are not actually global. Most of these are
internal private variables that are now module-scoped. Some variables
were also completely unused, which ESLint nicely reported.
Change-Id: I43689ac7544ad1239acc7d0eeec4dcd563d7fea9
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1942290
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
The Chromium/Google style guides does not enforce curly braces for
single-line if-statements, but does strongly recommend doing so. Adding
braces will improve code readability, by visually separating code
blocks. This will also prevent issues where accidental additions are
pushed to the "else"-clause instead of in the if-block.
This CL also updates the presubmit `eslint` to run the fix with the
correct configuration. It will now fix all issues it can fix.
Change-Id: I4b616f21a99393f168dec743c0bcbdc7f5db04a9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1821526
Commit-Queue: Tim Van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Jeff Fisher <jeffish@microsoft.com>
Cr-Original-Commit-Position: refs/heads/master@{#701070}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 7e0bdbe2d7f9fc2386bfaefda3cc29c66ccc18f9
Both Bindings.cssWorkspaceBinding.uiLocationToRawLocations and well as
Bindings.debuggerWorkspaceBinding.uiLocationToRawLocations resolve
locations to non-existing CSS and Script locations. This patch fixes
Bindings.debuggerWorkspaceBinding.uiLocationToRawLocations to not do
this anymore, and hacks
Bindings.cssWorkspaceBinding.uiLocationToRawLocations to not do it
for formatted sources anymore. For the ultimate fix, we need to get
the end position for inline CSS from the back-end. This will allow
us to clean-up the hack as well.
The significance of this change is that it enables precise coverage
gutters for inline CSS and inline scripts.
Bug: chromium:1004203, chromium:1005708, chromium:1005789
Change-Id: Ieadb2aef7e610ecec35e28f5f1cc4516a28a0780
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1814299
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Andrey Kosyakov <caseq@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#698431}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 0a2176832ad71200173bab203b83a4128062683c