Bug 105722

Summary: Web Inspector: Make InspectorState instances per-agent, corresponding to JSON map entries in the cookie
Product: WebKit Reporter: Alexander Pavlov (apavlov) <apavlov>
Component: Web Inspector (Deprecated)Assignee: Alexander Pavlov (apavlov) <apavlov>
Status: RESOLVED FIXED    
Severity: Normal CC: apavlov, keishi, loislo, pfeldman, pmuellr, vsevik, web-inspector-bugs, webkit.review.bot, yurys
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch none

Description Alexander Pavlov (apavlov) 2012-12-24 08:34:57 PST
The blamed line is InspectorState.cpp:136

Patch to follow.
Comment 1 Yury Semikhatsky 2012-12-24 21:03:06 PST
(In reply to comment #0)
> The blamed line is InspectorState.cpp:136
> 
> Patch to follow.

Could you provide more details or at least link to the corresponding revision where the line 136 would fail as on the current tot r138449 InspectorState.cpp is only 131 line long?
Comment 2 Alexander Pavlov (apavlov) 2012-12-24 21:32:10 PST
(In reply to comment #1)
> (In reply to comment #0)
> > The blamed line is InspectorState.cpp:136
> > 
> > Patch to follow.
> 
> Could you provide more details or at least link to the corresponding revision where the line 136 would fail as on the current tot r138449 InspectorState.cpp is only 131 line long?

As agreed with pfeldman, the offending change r138436 was reverted, as the composite state should be implemented in a slightly different way.
Comment 3 Alexander Pavlov (apavlov) 2012-12-24 23:11:51 PST
Created attachment 180703 [details]
Patch
Comment 4 Yury Semikhatsky 2012-12-24 23:38:08 PST
Comment on attachment 180703 [details]
Patch

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

> Source/WebCore/inspector/InspectorState.cpp:137
> +        if (!agentStateObject) {

When can this happen? Also if some agent states may be missing there might be some extra states which we probably want to delete?
Comment 5 Alexander Pavlov (apavlov) 2012-12-25 00:39:21 PST
(In reply to comment #4)
> (From update of attachment 180703 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=180703&action=review
> 
> > Source/WebCore/inspector/InspectorState.cpp:137
> > +        if (!agentStateObject) {
> 
> When can this happen?

This can happen if a cookie was written before all InspectorStates had been constructed.

> Also if some agent states may be missing there might be some extra states which we probably want to delete?

This means that the respective state is empty, which we handle by creating an empty object to pass into InspectorState::setFromCookie().
Comment 6 WebKit Review Bot 2012-12-25 01:01:41 PST
Comment on attachment 180703 [details]
Patch

Clearing flags on attachment: 180703

Committed r138457: <http://trac.webkit.org/changeset/138457>
Comment 7 WebKit Review Bot 2012-12-25 01:01:45 PST
All reviewed patches have been landed.  Closing bug.
Comment 8 Alexander Pavlov (apavlov) 2012-12-28 23:56:25 PST
*** Bug 105438 has been marked as a duplicate of this bug. ***