Bug 105722 - Web Inspector: Make InspectorState instances per-agent, corresponding to JSON map entries in the cookie
Summary: Web Inspector: Make InspectorState instances per-agent, corresponding to JSON...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Alexander Pavlov (apavlov)
URL:
Keywords:
: 105438 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-12-24 08:34 PST by Alexander Pavlov (apavlov)
Modified: 2012-12-28 23:56 PST (History)
9 users (show)

See Also:


Attachments
Patch (83.23 KB, patch)
2012-12-24 23:11 PST, Alexander Pavlov (apavlov)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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. ***