diff options
author | Konstantin Tokarev <annulen@yandex.ru> | 2016-11-22 08:08:05 +0300 |
---|---|---|
committer | Konstantin Tokarev <annulen@yandex.ru> | 2017-02-02 12:31:16 +0000 |
commit | 1c8f056531c65706b85c44c2db657ea891be868d (patch) | |
tree | 29c2cd2bf06230e9e76945990ef9c0e70cfb483e /Source/WebCore | |
parent | 8f2cfe80a5fb6632b4bbb9181db28f0505058128 (diff) | |
download | qtwebkit-1c8f056531c65706b85c44c2db657ea891be868d.tar.gz |
Imported WebKit commit a16099e901e36e6d298dd30c0694a2130052d70e
Change-Id: I484731400983d1d964bdcf4afc4007f41ca1bb8a
Reviewed-by: Konstantin Tokarev <annulen@yandex.ru>
Diffstat (limited to 'Source/WebCore')
-rw-r--r-- | Source/WebCore/bindings/scripts/preprocessor.pm | 11 | ||||
-rw-r--r-- | Source/WebCore/css/makegrammar.pl | 4 | ||||
-rw-r--r-- | Source/WebCore/platform/network/qt/QNetworkReplyHandler.cpp | 6 |
3 files changed, 17 insertions, 4 deletions
diff --git a/Source/WebCore/bindings/scripts/preprocessor.pm b/Source/WebCore/bindings/scripts/preprocessor.pm index a34e8461b..5d9376d65 100644 --- a/Source/WebCore/bindings/scripts/preprocessor.pm +++ b/Source/WebCore/bindings/scripts/preprocessor.pm @@ -24,6 +24,7 @@ use warnings; use Config; use IPC::Open2; use IPC::Open3; +use Text::ParseWords; BEGIN { use Exporter (); @@ -59,6 +60,9 @@ sub applyPreprocessor } else { push(@args, qw(-E -P -x c++)); } + } else { + @args = shellwords($preprocessor); + $preprocessor = shift @args; } if ($Config::Config{"osname"} eq "darwin") { @@ -99,9 +103,12 @@ sub applyPreprocessor } }; } elsif ($Config::Config{"osname"} eq "MSWin32") { - $pid = open2(\*PP_OUT, \*PP_IN, $preprocessor, @args, @macros, $fileName); + # Suppress STDERR so that if we're using cl.exe, the output + # name isn't needlessly echoed. + use Symbol 'gensym'; my $err = gensym; + $pid = open3(\*PP_IN, \*PP_OUT, $err, $preprocessor, @args, @macros, $fileName); } else { - $pid = open2(\*PP_OUT, \*PP_IN, split(' ', $preprocessor), @args, @macros, $fileName); + $pid = open2(\*PP_OUT, \*PP_IN, $preprocessor, @args, @macros, $fileName); } close PP_IN; my @documentContent = <PP_OUT>; diff --git a/Source/WebCore/css/makegrammar.pl b/Source/WebCore/css/makegrammar.pl index 47cbc2f47..5d63b0810 100644 --- a/Source/WebCore/css/makegrammar.pl +++ b/Source/WebCore/css/makegrammar.pl @@ -73,7 +73,9 @@ if ($suffix eq ".y.in") { } my $fileBase = File::Spec->join($outputDir, $filename); -system("\"$bison\" -d -p $symbolsPrefix $grammarFilePath -o $fileBase.cpp"); +my @bisonCommand = ($bison, "-d", "-p", $symbolsPrefix, $grammarFilePath, "-o", "$fileBase.cpp"); +push @bisonCommand, "--no-lines" if $^O eq "MSWin32"; # Work around bug in bison >= 3.0 on Windows where it puts backslashes into #line directives. +system(@bisonCommand) == 0 or die; open HEADER, ">$fileBase.h" or die; print HEADER << "EOF"; diff --git a/Source/WebCore/platform/network/qt/QNetworkReplyHandler.cpp b/Source/WebCore/platform/network/qt/QNetworkReplyHandler.cpp index 69c72309f..e94367287 100644 --- a/Source/WebCore/platform/network/qt/QNetworkReplyHandler.cpp +++ b/Source/WebCore/platform/network/qt/QNetworkReplyHandler.cpp @@ -70,7 +70,11 @@ bool FormDataIODevice::reset() m_currentFile->close(); m_currentDelta = 0; - m_formElements = m_formData->elements(); + + if (m_formData) + m_formElements = m_formData->elements(); + else + m_formElements.clear(); prepareCurrentElement(); return true; |