WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
99179
Web Inspector: Saving HAR, snapshots and timeline data do not work in remote debugging mode
https://bugs.webkit.org/show_bug.cgi?id=99179
Summary
Web Inspector: Saving HAR, snapshots and timeline data do not work in remote ...
eustas.bug
Reported
2012-10-12 08:19:29 PDT
CRBUG:
http://code.google.com/p/chromium/issues/detail?id=155494
Attachments
Patch
(6.03 KB, patch)
2012-10-12 08:40 PDT
,
eustas.bug
no flags
Details
Formatted Diff
Diff
Patch
(9.06 KB, patch)
2012-10-15 00:22 PDT
,
eustas.bug
no flags
Details
Formatted Diff
Diff
Patch
(11.52 KB, patch)
2012-10-15 08:25 PDT
,
eustas.bug
no flags
Details
Formatted Diff
Diff
Patch
(11.47 KB, patch)
2012-10-15 22:03 PDT
,
eustas.bug
no flags
Details
Formatted Diff
Diff
Patch
(11.50 KB, patch)
2012-10-16 00:50 PDT
,
eustas.bug
no flags
Details
Formatted Diff
Diff
Patch
(11.50 KB, patch)
2012-10-16 06:26 PDT
,
eustas.bug
no flags
Details
Formatted Diff
Diff
Patch
(11.52 KB, patch)
2012-10-17 04:48 PDT
,
eustas.bug
no flags
Details
Formatted Diff
Diff
Patch
(11.96 KB, patch)
2012-10-17 07:30 PDT
,
eustas.bug
yurys
: review+
Details
Formatted Diff
Diff
Show Obsolete
(7)
View All
Add attachment
proposed patch, testcase, etc.
eustas.bug
Comment 1
2012-10-12 08:40:20 PDT
Created
attachment 168426
[details]
Patch
Andrey Kosyakov
Comment 2
2012-10-12 08:59:45 PDT
Comment on
attachment 168426
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=168426&action=review
> Source/WebCore/inspector/front-end/FileManager.js:58 > + return InspectorFrontendHost.canSave() && ("append" in InspectorFrontendHost) && (!("canAppend" in InspectorFrontendHost) || InspectorFrontendHost.canAppend());
Looks like InspectorFrontendHost.canAppend() is always false.
> Source/WebCore/inspector/front-end/FileUtils.js:350 > + this._isBuffering = !WebInspector.fileManager.canAppend();
So now each method of the class looks like if (this._isBuffering) { ... } else { ... }. I think that's an indication that we should be using a different implementation of OutputStream instead of abusing FileOutputStrem. I'd suggest adding BlobOutputStream and a factory method that creates either of the streams based on whether we canAppend().
> Source/WebCore/inspector/front-end/FileUtils.js:391 > + function callbackWrapper() > + { > + callback(this); > + }
why not bind to callback directly?
> Source/WebCore/inspector/front-end/InspectorFrontendHostStub.js:151 > + function cleanup() { > + window.URL.revokeObjectURL(objectUrl); > }
style: { => next line I think this could also be inlined into setTimeout()
eustas.bug
Comment 3
2012-10-15 00:20:50 PDT
Comment on
attachment 168426
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=168426&action=review
>> Source/WebCore/inspector/front-end/FileManager.js:58 >> + return InspectorFrontendHost.canSave() && ("append" in InspectorFrontendHost) && (!("canAppend" in InspectorFrontendHost) || InspectorFrontendHost.canAppend()); > > Looks like InspectorFrontendHost.canAppend() is always false.
Addressed.
>> Source/WebCore/inspector/front-end/FileUtils.js:350 >> + this._isBuffering = !WebInspector.fileManager.canAppend(); > > So now each method of the class looks like if (this._isBuffering) { ... } else { ... }. I think that's an indication that we should be using a different implementation of OutputStream instead of abusing FileOutputStrem. I'd suggest adding BlobOutputStream and a factory method that creates either of the streams based on whether we canAppend().
Done.
>> Source/WebCore/inspector/front-end/FileUtils.js:391 >> + } > > why not bind to callback directly?
Fixed.
>> Source/WebCore/inspector/front-end/InspectorFrontendHostStub.js:151 >> } > > style: { => next line > I think this could also be inlined into setTimeout()
Done.
eustas.bug
Comment 4
2012-10-15 00:22:13 PDT
Created
attachment 168636
[details]
Patch
eustas.bug
Comment 5
2012-10-15 08:25:19 PDT
Created
attachment 168714
[details]
Patch
Build Bot
Comment 6
2012-10-15 08:34:40 PDT
Comment on
attachment 168714
[details]
Patch
Attachment 168714
[details]
did not pass mac-ews (mac): Output:
http://queues.webkit.org/results/14299700
eustas.bug
Comment 7
2012-10-15 22:03:58 PDT
Created
attachment 168851
[details]
Patch
Andrey Kosyakov
Comment 8
2012-10-15 23:05:01 PDT
Comment on
attachment 168851
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=168851&action=review
> Source/WebCore/inspector/front-end/HeapSnapshotView.js:956 > + return !this.fromFile() && !!this._snapshotProxy && !this._receiver;
nit: I don't think !! has any effect here.
> Source/WebCore/inspector/front-end/InspectorFrontendHostStub.js:151 > + setTimeout(function() {
style: { => next line. consider bind?
> Source/WebCore/inspector/front-end/InspectorFrontendHostStub.js:163 > + setTimeout(function() {
ditto.
> Source/WebCore/inspector/front-end/InspectorFrontendHostStub.js:179 > + setTimeout(function() {
ditto
eustas.bug
Comment 9
2012-10-16 00:43:39 PDT
Comment on
attachment 168851
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=168851&action=review
>> Source/WebCore/inspector/front-end/HeapSnapshotView.js:956 >> + return !this.fromFile() && !!this._snapshotProxy && !this._receiver; > > nit: I don't think !! has any effect here.
This makes influence on return value type. Without cast, return value is {boolean|null} instead of {boolean}.
>> Source/WebCore/inspector/front-end/InspectorFrontendHostStub.js:151 >> + setTimeout(function() { > > style: { => next line. > consider bind?
OK.
>> Source/WebCore/inspector/front-end/InspectorFrontendHostStub.js:163 >> + setTimeout(function() { > > ditto.
Done
>> Source/WebCore/inspector/front-end/InspectorFrontendHostStub.js:179 >> + setTimeout(function() { > > ditto
Binding is impossible. Explicitly declared nested function.
eustas.bug
Comment 10
2012-10-16 00:50:05 PDT
Created
attachment 168879
[details]
Patch
Andrey Kosyakov
Comment 11
2012-10-16 05:56:06 PDT
Comment on
attachment 168879
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=168879&action=review
LGTM with a nit.
> Source/WebCore/inspector/front-end/InspectorFrontendHostStub.js:176 > + function cleanup() {
{ => next line, please.
eustas.bug
Comment 12
2012-10-16 06:26:36 PDT
Created
attachment 168934
[details]
Patch
Yury Semikhatsky
Comment 13
2012-10-17 01:36:23 PDT
Comment on
attachment 168934
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=168934&action=review
> Source/WebCore/inspector/InspectorFrontendHost.cpp:253 > +void InspectorFrontendHost::close(const String& /* url */) { }
style: remove comment and put each brace on its own line.
> Source/WebCore/inspector/front-end/InspectorFrontendHostStub.js:151 > + setTimeout(WebInspector.fileManager.savedURL.bind(WebInspector.fileManager, url), 0);
Why do you need setTimeout here?
> Source/WebCore/inspector/front-end/InspectorFrontendHostStub.js:161 > + setTimeout(WebInspector.fileManager.appendedToURL.bind(WebInspector.fileManager, url), 0);
Why do you need setTimeout here?
> Source/WebCore/inspector/front-end/InspectorFrontendHostStub.js:180 > + setTimeout(cleanup, 0);
Is there an event that we could listen to instead of scheduling revokeObjectURL on timeout?
eustas.bug
Comment 14
2012-10-17 04:10:52 PDT
Comment on
attachment 168934
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=168934&action=review
>> Source/WebCore/inspector/InspectorFrontendHost.cpp:253 >> +void InspectorFrontendHost::close(const String& /* url */) { } > > style: remove comment and put each brace on its own line.
Done.
>> Source/WebCore/inspector/front-end/InspectorFrontendHostStub.js:151 >> + setTimeout(WebInspector.fileManager.savedURL.bind(WebInspector.fileManager, url), 0); > > Why do you need setTimeout here?
It is expected (by caller) that callback is invoked asynchronously.
>> Source/WebCore/inspector/front-end/InspectorFrontendHostStub.js:161 >> + setTimeout(WebInspector.fileManager.appendedToURL.bind(WebInspector.fileManager, url), 0); > > Why do you need setTimeout here?
Ditto.
>> Source/WebCore/inspector/front-end/InspectorFrontendHostStub.js:180 >> + setTimeout(cleanup, 0); > > Is there an event that we could listen to instead of scheduling revokeObjectURL on timeout?
There are no specific events for Blobs. window events do not fire either.
eustas.bug
Comment 15
2012-10-17 04:48:17 PDT
Created
attachment 169158
[details]
Patch
Yury Semikhatsky
Comment 16
2012-10-17 05:36:41 PDT
Comment on
attachment 169158
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=169158&action=review
> Source/WebCore/inspector/front-end/InspectorFrontendHostStub.js:174 > + window.location = objectUrl + "#" + url;
Can we use hostname instead?
eustas.bug
Comment 17
2012-10-17 07:29:53 PDT
Comment on
attachment 169158
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=169158&action=review
>> Source/WebCore/inspector/front-end/InspectorFrontendHostStub.js:174 >> + window.location = objectUrl + "#" + url; > > Can we use hostname instead?
addressed
eustas.bug
Comment 18
2012-10-17 07:30:33 PDT
Created
attachment 169182
[details]
Patch
WebKit Review Bot
Comment 19
2012-10-18 23:13:02 PDT
Comment on
attachment 169182
[details]
Patch Rejecting
attachment 169182
[details]
from commit-queue. Failed to run "['/mnt/git/webkit-commit-queue/Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '-..." exit_code: 1 ERROR: /mnt/git/webkit-commit-queue/Source/WebKit/chromium/ChangeLog neither lists a valid reviewer nor contains the string "Unreviewed" or "Rubber stamp" (case insensitive). Full output:
http://queues.webkit.org/results/14412891
Andrey Kosyakov
Comment 20
2012-10-19 01:02:43 PDT
Committed
r131872
: <
http://trac.webkit.org/changeset/131872
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug