Bug 37133 - Web Inspector: Console with two recursive arrays causes infinite loop trying to display
Summary: Web Inspector: Console with two recursive arrays causes infinite loop trying ...
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: Pavel Feldman
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-05 20:05 PDT by Timothy Hatcher
Modified: 2010-04-09 22:03 PDT (History)
8 users (show)

See Also:


Attachments
[PATCH] Proposed fix. (5.48 KB, patch)
2010-04-09 12:05 PDT, Pavel Feldman
joepeck: review+
Details | Formatted Diff | Diff
[IMAGE] Screenshot while running with patch. (95.71 KB, image/png)
2010-04-09 12:21 PDT, Pavel Feldman
no flags Details
[PATCH] Proposed fix with no blank line. (5.48 KB, patch)
2010-04-09 12:44 PDT, Pavel Feldman
no flags Details | Formatted Diff | Diff
[PATCH] Oh-ah, there were two change logs. (5.48 KB, patch)
2010-04-09 12:45 PDT, Pavel Feldman
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Timothy Hatcher 2010-04-05 20:05:57 PDT
Steps:
1. Open Web Inspector Console
2. Enter the following sequence:

x = []
y = []
x.push(y)
y.push(x)
x
Comment 1 Pavel Feldman 2010-04-09 12:05:39 PDT
Created attachment 52974 [details]
[PATCH] Proposed fix.
Comment 2 Joseph Pecoraro 2010-04-09 12:14:43 PDT
So what does the output actually look like now (not the dump'd output, but a screenshot of what shows up in the console)?
Comment 3 Pavel Feldman 2010-04-09 12:21:16 PDT
Created attachment 52975 [details]
[IMAGE] Screenshot while running with patch.
Comment 4 Joseph Pecoraro 2010-04-09 12:22:24 PDT
Ohh, I like that. The patch also looks good to me. Lets see if I can r+ this.
Comment 5 Joseph Pecoraro 2010-04-09 12:25:13 PDT
Comment on attachment 52974 [details]
[PATCH] Proposed fix.

> +        Web Inspector: Console with two recursive arrays causes infinite loop trying to display.
> +
> +        https://bugs.webkit.org/show_bug.cgi?id=37133

Nit: Please remove this blank line.
Comment 6 Joseph Pecoraro 2010-04-09 12:35:26 PDT
(In reply to comment #5)
> Nit: Please remove this blank line.

It looks like sometimes you have this blank line, and sometimes you don't. So I tested what prepare-ChangeLog does:

  shell> prepare-ChangeLog -b 37133

        Web Inspector: Console with two recursive arrays causes infinite loop trying to display
        https://bugs.webkit.org/show_bug.cgi?id=37133

I like this format, it chunks the sections together nicer.
Comment 7 Joseph Pecoraro 2010-04-09 12:36:19 PDT
One more time without wrapping (sorry for the email spam)

>   shell> prepare-ChangeLog -b 37133
> 
>         Web Inspector: Console with two recursive arrays causes infinite loop trying to display
>         https://bugs.webkit.org/show_bug.cgi?id=37133
Comment 8 Pavel Feldman 2010-04-09 12:44:00 PDT
Created attachment 52976 [details]
[PATCH] Proposed fix with no blank line.
Comment 9 Pavel Feldman 2010-04-09 12:45:03 PDT
Created attachment 52977 [details]
[PATCH] Oh-ah, there were two change logs.
Comment 10 WebKit Commit Bot 2010-04-09 19:25:53 PDT
Comment on attachment 52977 [details]
[PATCH] Oh-ah, there were two change logs.

Rejecting patch 52977 from commit-queue.

Failed to run "['/Users/eseidel/Projects/CommitQueue/WebKitTools/Scripts/svn-apply', '--reviewer', 'Pavel Feldman', '--force']" exit_code: 2
patching file LayoutTests/ChangeLog
patch: **** malformed patch at line 18:  

patching file LayoutTests/inspector/console-format-collections-expected.txt
patching file LayoutTests/inspector/console-format-collections.html
patching file WebCore/ChangeLog
patch: **** malformed patch at line 21:  

patching file WebCore/inspector/front-end/ConsoleView.js
patching file WebCore/inspector/front-end/InjectedScript.js

Full output: http://webkit-commit-queue.appspot.com/results/1696049
Comment 11 Pavel Feldman 2010-04-09 22:02:37 PDT
Committing to http://svn.webkit.org/repository/webkit/trunk ...
	M	LayoutTests/ChangeLog
	M	LayoutTests/inspector/console-format-collections-expected.txt
	M	LayoutTests/inspector/console-format-collections.html
	M	WebCore/ChangeLog
	M	WebCore/inspector/front-end/ConsoleView.js
	M	WebCore/inspector/front-end/InjectedScript.js
Committed r57405