RESOLVED FIXED 44103
Web Inspector: [CRASH] Console formatting crashes after cross-domain navigation.
https://bugs.webkit.org/show_bug.cgi?id=44103
Summary Web Inspector: [CRASH] Console formatting crashes after cross-domain navigation.
Pavel Feldman
Reported 2010-08-17 05:48:15 PDT
- Go to a page with console.log(document) call - Navigate to a different domain - Open inspector
Attachments
[PATCH] Proposed fix. (6.28 KB, patch)
2010-08-17 06:22 PDT, Pavel Feldman
yurys: review+
[PATCH] Review comments addressed. (7.93 KB, patch)
2010-08-17 08:49 PDT, Pavel Feldman
no flags
Pavel Feldman
Comment 1 2010-08-17 06:22:10 PDT
Created attachment 64583 [details] [PATCH] Proposed fix. I wonder if we should try saving the first string entry. I'll think about doing it while you are reviewing the crash fix.
Yury Semikhatsky
Comment 2 2010-08-17 07:26:47 PDT
Comment on attachment 64583 [details] [PATCH] Proposed fix. WebCore/inspector/ConsoleMessage.cpp:142 + inspectorValue = InspectorString::create("(frame collected)"); This string should be localized and live in the front-end. And I think it should be frame navigated.
Pavel Feldman
Comment 3 2010-08-17 08:49:25 PDT
Created attachment 64596 [details] [PATCH] Review comments addressed.
Pavel Feldman
Comment 4 2010-08-17 08:56:25 PDT
Comment on attachment 64596 [details] [PATCH] Review comments addressed. Clearing flags on attachment: 64596 Committed r65506: <http://trac.webkit.org/changeset/65506>
Pavel Feldman
Comment 5 2010-08-17 08:56:38 PDT
All reviewed patches have been landed. Closing bug.
Joseph Pecoraro
Comment 6 2010-08-17 10:08:52 PDT
Comment on attachment 64596 [details] [PATCH] Review comments addressed. > diff --git LayoutTests/http/tests/inspector-enabled/resources/console-log-frame-before-navigation.html > + console.log("Console message (C) %d with element", 2010, document.documentElement); The way this console.log would work (one %d, but two arguments) would be to print the string, then print the element afterwards. The patch's expected results were as follows: > -Message: 2010 HTMLHtmlElement > +Message: Console message (C) %d with element > TEST COMPLETE. So the desired output for the element was the empty string? I'm fine with that, but what I saw something else in the bugzilla comments. > + // Note that localhost is different from the 127.0.0.1 that tests are runnung against. So this navigation > + // is in fact cross-domain. NIT: Typo. "runnung" => "running".
Pavel Feldman
Comment 7 2010-08-17 11:54:24 PDT
(In reply to comment #6) > (From update of attachment 64596 [details]) > > diff --git LayoutTests/http/tests/inspector-enabled/resources/console-log-frame-before-navigation.html > > + console.log("Console message (C) %d with element", 2010, document.documentElement); > > The way this console.log would work (one %d, but two arguments) would be to > print the string, then print the element afterwards. The patch's expected > results were as follows: > > > -Message: 2010 HTMLHtmlElement > > +Message: Console message (C) %d with element > > TEST COMPLETE. > > So the desired output for the element was the empty string? I'm fine with > that, but what I saw something else in the bugzilla comments. > > Desired output is only the first string argument. Rationale: we can't format parameters due to missing global object after the navigation. So we ignore all the parameters: in this case both - integer and element. > > + // Note that localhost is different from the 127.0.0.1 that tests are runnung against. So this navigation > > + // is in fact cross-domain. > > NIT: Typo. "runnung" => "running". Thanks. Will fix later.
Note You need to log in before you can comment on or make changes to this bug.