Bug 167449 - Remote Inspector: Listing should be updated when a target gains or loses a debugger session
Summary: Remote Inspector: Listing should be updated when a target gains or loses a de...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Joseph Pecoraro
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-01-25 21:58 PST by Joseph Pecoraro
Modified: 2017-01-28 16:41 PST (History)
9 users (show)

See Also:


Attachments
[PATCH] Proposed Fix (4.83 KB, patch)
2017-01-25 22:08 PST, Joseph Pecoraro
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph Pecoraro 2017-01-25 21:58:03 PST
Summary:
Listing should be updated when a target gains or loses a debugger session

This controls whether or not we prevent device idle behavior or not.

So we should update the listing whenever a debugger session starts or ends.

Steps to Reproduce:
1. Remotely inspect a page in iOS Safari
2. Wait 2 minutes
  => device falls asleep, expected it to stay awake.

Notes:
Debuggers will want to track this state so different debuggers don't try to debug a target already being debugged.
Comment 1 Joseph Pecoraro 2017-01-25 22:08:02 PST
Created attachment 299793 [details]
[PATCH] Proposed Fix
Comment 2 Radar WebKit Bug Importer 2017-01-25 22:22:14 PST
<rdar://problem/30203156>
Comment 3 Matt Baker 2017-01-27 16:54:50 PST
Comment on attachment 299793 [details]
[PATCH] Proposed Fix

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

> Source/JavaScriptCore/inspector/remote/RemoteInspector.mm:622
> +    auto target = m_targetMap.get(targetIdentifier);

I think we're preferring the more explicit auto* and auto& for pointer and reference types (per recent discussions with Darin).
Comment 4 BJ Burg 2017-01-28 14:07:11 PST
Comment on attachment 299793 [details]
[PATCH] Proposed Fix

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

r=me

> Source/JavaScriptCore/inspector/remote/RemoteInspector.mm:619
> +

This means caller must hold the listings lock before calling these, right?
Comment 5 Joseph Pecoraro 2017-01-28 16:16:04 PST
Comment on attachment 299793 [details]
[PATCH] Proposed Fix

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

>> Source/JavaScriptCore/inspector/remote/RemoteInspector.mm:619
>> +
> 
> This means caller must hold the listings lock before calling these, right?

Yes
Comment 6 WebKit Commit Bot 2017-01-28 16:41:06 PST
Comment on attachment 299793 [details]
[PATCH] Proposed Fix

Clearing flags on attachment: 299793

Committed r211344: <http://trac.webkit.org/changeset/211344>
Comment 7 WebKit Commit Bot 2017-01-28 16:41:10 PST
All reviewed patches have been landed.  Closing bug.