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`).
<rdar://problem/61120919>
Created attachment 395322 [details] Patch
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.
Created attachment 395397 [details] Patch
Committed r259479: <https://trac.webkit.org/changeset/259479> All reviewed patches have been landed. Closing bug and clearing flags on attachment 395397 [details].
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 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 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!