Bug 209940 - Web Inspector: increase the auto-inspect debugger timeout delay to account for slower networks/devices
Summary: Web Inspector: increase the auto-inspect debugger timeout delay to account fo...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Local Build
Hardware: All All
: P2 Normal
Assignee: Devin Rousso
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-04-02 16:49 PDT by Devin Rousso
Modified: 2020-04-03 14:39 PDT (History)
11 users (show)

See Also:


Attachments
Patch (3.30 KB, patch)
2020-04-02 16:50 PDT, Devin Rousso
no flags Details | Formatted Diff | Diff
Patch (3.19 KB, patch)
2020-04-03 11:08 PDT, Devin Rousso
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Devin Rousso 2020-04-02 16:49:11 PDT
Right now, when auto-inspecting, we only pause for a maximum of 1s which may not be enough time for messages from the frontend to be received, especially if there are a lot of things that need to be done (e.g. loading breakpoints from `indexedDB`).
Comment 1 Devin Rousso 2020-04-02 16:49:23 PDT
<rdar://problem/61120919>
Comment 2 Devin Rousso 2020-04-02 16:50:34 PDT
Created attachment 395322 [details]
Patch
Comment 3 Joseph Pecoraro 2020-04-02 19:17:03 PDT
Comment on attachment 395322 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=395322&action=review

r=me

> Source/JavaScriptCore/inspector/remote/cocoa/RemoteInspectorCocoa.mm:160
> +        dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 10 * NSEC_PER_SEC), dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{

Would still be good to pull this out as a constant so its easier to read.
Comment 4 Devin Rousso 2020-04-03 11:08:29 PDT
Created attachment 395397 [details]
Patch
Comment 5 EWS 2020-04-03 11:30:36 PDT
Committed r259479: <https://trac.webkit.org/changeset/259479>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 395397 [details].
Comment 6 BJ Burg 2020-04-03 11:50:25 PDT
Comment on attachment 395397 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=395397&action=review

> Source/JavaScriptCore/inspector/remote/cocoa/RemoteInspectorCocoa.mm:-145
> -            LOG_ERROR("Skipping Automatic Inspection Candidate with pageId(%u) because we are already paused waiting for pageId(%u)", targetIdentifier, m_automaticInspectionCandidateTargetIdentifier);

I don't think this change is correct. Why WTFLogAlways? We have RELEASE_LOG_ERROR and RELEASE_LOG_ERROR_IF, which should do the same thing but go through os_log and won't get lost in stderr/stdout.
Comment 7 Devin Rousso 2020-04-03 12:14:01 PDT
Comment on attachment 395397 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=395397&action=review

>> Source/JavaScriptCore/inspector/remote/cocoa/RemoteInspectorCocoa.mm:-145
>> -            LOG_ERROR("Skipping Automatic Inspection Candidate with pageId(%u) because we are already paused waiting for pageId(%u)", targetIdentifier, m_automaticInspectionCandidateTargetIdentifier);
> 
> I don't think this change is correct. Why WTFLogAlways? We have RELEASE_LOG_ERROR and RELEASE_LOG_ERROR_IF, which should do the same thing but go through os_log and won't get lost in stderr/stdout.

JSC doesn't have any of the necessary things to make `RELEASE_LOG_ERROR` work, namely a `LOG_CHANNEL_PREFIX` and any logging channels.  I suppose I could make one, but that seemed like a lot of overkill for something that should hopefully not happen.
Comment 8 BJ Burg 2020-04-03 14:39:48 PDT
Comment on attachment 395397 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=395397&action=review

>>> Source/JavaScriptCore/inspector/remote/cocoa/RemoteInspectorCocoa.mm:-145
>>> -            LOG_ERROR("Skipping Automatic Inspection Candidate with pageId(%u) because we are already paused waiting for pageId(%u)", targetIdentifier, m_automaticInspectionCandidateTargetIdentifier);
>> 
>> I don't think this change is correct. Why WTFLogAlways? We have RELEASE_LOG_ERROR and RELEASE_LOG_ERROR_IF, which should do the same thing but go through os_log and won't get lost in stderr/stdout.
> 
> JSC doesn't have any of the necessary things to make `RELEASE_LOG_ERROR` work, namely a `LOG_CHANNEL_PREFIX` and any logging channels.  I suppose I could make one, but that seemed like a lot of overkill for something that should hopefully not happen.

Oh, forgot about that. Carry on!