Bug 62721 - Web Inspector: provide unique identifiers for frames
Summary: Web Inspector: provide unique identifiers for frames
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: Andrey Kosyakov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-15 05:45 PDT by Andrey Kosyakov
Modified: 2011-06-15 08:44 PDT (History)
11 users (show)

See Also:


Attachments
patch (5.86 KB, patch)
2011-06-15 05:49 PDT, Andrey Kosyakov
no flags Details | Formatted Diff | Diff
patch (style fixed) (5.86 KB, patch)
2011-06-15 05:56 PDT, Andrey Kosyakov
pfeldman: review-
Details | Formatted Diff | Diff
patch (FrameDestructionObserver -> InspectorInstrumentation) (7.48 KB, patch)
2011-06-15 06:40 PDT, Andrey Kosyakov
pfeldman: review-
Details | Formatted Diff | Diff
patch (7.50 KB, patch)
2011-06-15 07:37 PDT, Andrey Kosyakov
pfeldman: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andrey Kosyakov 2011-06-15 05:45:54 PDT
Currently, we use frame address as a frame id, this does not guarantee frame ids to be unique through the life time of the process.
This is first step in making frame ids unique -- we now assign sequential ids and maintain them as a map within InspectorPageAgent.
The next step would be to make the ids unique for multi-process browsers by including some system-unique identifier.
Comment 1 Andrey Kosyakov 2011-06-15 05:49:06 PDT
Created attachment 97279 [details]
patch
Comment 2 WebKit Review Bot 2011-06-15 05:53:22 PDT
Attachment 97279 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCor..." exit_code: 1

Source/WebCore/inspector/InspectorPageAgent.cpp:648:  Place brace on its own line for function definitions.  [whitespace/braces] [4]
Source/WebCore/inspector/InspectorPageAgent.cpp:653:  Place brace on its own line for function definitions.  [whitespace/braces] [4]
Source/WebCore/inspector/InspectorPageAgent.cpp:659:  Declaration has space between type name and * in Frame *frame  [whitespace/declaration] [3]
Total errors found: 3 in 4 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Andrey Kosyakov 2011-06-15 05:56:20 PDT
Created attachment 97280 [details]
patch (style fixed)
Comment 4 Pavel Feldman 2011-06-15 06:04:49 PDT
Comment on attachment 97280 [details]
patch (style fixed)

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

> Source/WebCore/inspector/InspectorPageAgent.cpp:646
> +InspectorPageAgent::FrameEntry::FrameEntry()

I'd rather instrument frame destruction.
Comment 5 Andrey Kosyakov 2011-06-15 06:40:22 PDT
Created attachment 97287 [details]
patch (FrameDestructionObserver -> InspectorInstrumentation)
Comment 6 WebKit Review Bot 2011-06-15 06:57:48 PDT
Attachment 97280 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/update-webkit', '--chromium']" exit_code: 9

Updating OpenSource
RA layer request failed: OPTIONS of 'http://svn.webkit.org/repository/webkit': timed out waiting for server (http://svn.webkit.org) at /usr/lib/git-core/git-svn line 2295

Died at Tools/Scripts/update-webkit line 146.


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 7 Pavel Feldman 2011-06-15 07:19:34 PDT
Comment on attachment 97287 [details]
patch (FrameDestructionObserver -> InspectorInstrumentation)

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

> Source/WebCore/inspector/InspectorPageAgent.cpp:594
> +    ASSERT(iterator != m_frameToIdentifier.end());

This assertion will fail due to the lazy identifier assignment.
Comment 8 Andrey Kosyakov 2011-06-15 07:37:09 PDT
Created attachment 97292 [details]
patch

Thanks for catching this! This is an unfortunate leftover from the previous implementation.
Comment 9 Andrey Kosyakov 2011-06-15 08:44:44 PDT
manually committed r88940: http://trac.webkit.org/changeset/88940