New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 632454 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Oct 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocking:
issue 658839



Sign in to add a comment

DCHECK hit in file_select_helper.cc when re-using <INPUT TYPE=FILE>

Project Member Reported by jsb...@chromium.org, Jul 28 2016

Issue description

ToT Debug build: Cr-Commit-Position: refs/heads/master@{#408405}

Repro:
1. Open a page with <INPUT TYPE=FILE> (like attached)
2. Click button, select file
3. Click button again

FATAL:file_select_helper.cc(455)] Check failed: params->default_file_name.empty() || params->mode == FileChooserParams::Save. The default_file_name parameter should only be specified for Save file choosers
#0 0x7f5d8bc3384e base::debug::StackTrace::StackTrace()
#1 0x7f5d8bc9ae9f logging::LogMessage::~LogMessage()
#2 0x7f5d90b0f901 FileSelectHelper::RunFileChooser()
#3 0x7f5d90b0f645 FileSelectHelper::RunFileChooser()
#4 0x7f5d8f91df51 Browser::RunFileChooser()
#5 0x7f5d859b7bd0 content::WebContentsImpl::RunFileChooser()
#6 0x7f5d85151681 content::RenderFrameHostImpl::OnRunFileChooser()


 
just_an_input_file.html
18 bytes View Download

Comment 1 by tkent@chromium.org, Jul 28 2016

Status: Available (was: Untriaged)

Comment 2 by jsb...@chromium.org, Oct 24 2016

Blocking: 658839

Comment 3 by jsb...@chromium.org, Oct 24 2016

Owner: jsb...@chromium.org
Status: Started (was: Available)
Project Member

Comment 4 by bugdroid1@chromium.org, Oct 26 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/14785d90f691b2b20d07612a62ba35a630bbb9ac

commit 14785d90f691b2b20d07612a62ba35a630bbb9ac
Author: jsbell <jsbell@chromium.org>
Date: Wed Oct 26 21:37:26 2016

Remove WebFileChooserParams::initialValue

On the Chromium side, FileSelectHelper::RunFileChooser asserts that
default filenames should only be specified for "Save" choosers. Blink
doesn't use those ("download" is a browser thing) so just remove
the field which would be ignored anyway. (Remembering the last used
directory is done through other means in the browser.)

BUG= 632454 , 655298 

Review-Url: https://codereview.chromium.org/2446743002
Cr-Commit-Position: refs/heads/master@{#427814}

[modify] https://crrev.com/14785d90f691b2b20d07612a62ba35a630bbb9ac/content/browser/fileapi/file_system_browsertest.cc
[add] https://crrev.com/14785d90f691b2b20d07612a62ba35a630bbb9ac/content/browser/fileapi/fileapi_browsertest.cc
[modify] https://crrev.com/14785d90f691b2b20d07612a62ba35a630bbb9ac/content/renderer/pepper/pepper_file_chooser_host.cc
[modify] https://crrev.com/14785d90f691b2b20d07612a62ba35a630bbb9ac/content/renderer/render_frame_impl.cc
[modify] https://crrev.com/14785d90f691b2b20d07612a62ba35a630bbb9ac/content/renderer/render_frame_impl.h
[modify] https://crrev.com/14785d90f691b2b20d07612a62ba35a630bbb9ac/content/test/BUILD.gn
[modify] https://crrev.com/14785d90f691b2b20d07612a62ba35a630bbb9ac/content/test/content_browser_test_utils_internal.cc
[modify] https://crrev.com/14785d90f691b2b20d07612a62ba35a630bbb9ac/content/test/content_browser_test_utils_internal.h
[modify] https://crrev.com/14785d90f691b2b20d07612a62ba35a630bbb9ac/third_party/WebKit/Source/web/ChromeClientImpl.cpp
[modify] https://crrev.com/14785d90f691b2b20d07612a62ba35a630bbb9ac/third_party/WebKit/public/web/WebFileChooserParams.h

Comment 5 by jsb...@chromium.org, Oct 26 2016

Status: Fixed (was: Started)
Labels: TE-Verified-56.0.2902.0 TE-Verified-M56
Verified this issue on Windows-7 using chrome latest Dev M56-56.0.2902.0 by following steps & attached html file in the merged defect (658839) & observed that it ' defaults to the last selected directory' upon clicking the button 2nd time.So issue working as expected.

Hence adding TE-Verified label.

Please find the attached screencast for reference.
632454.mp4
842 KB View Download
Issue tested & working as expected in Mac 10.11.4 and Linux ubuntu 14.04 .

Sign in to add a comment