Title: [231346] trunk/Source/WebCore
- Revision
- 231346
- Author
- [email protected]
- Date
- 2018-05-03 22:28:12 -0700 (Thu, 03 May 2018)
Log Message
Use subprocess.call instead of os.system to handle path with spaces
https://bugs.webkit.org/show_bug.cgi?id=185291
Reviewed by Darin Adler.
If gperf path includes spaces, these python scripts fail to execute gperf.
We use subprocess module instead of os.system to invoke gperf.
* css/makeSelectorPseudoClassAndCompatibilityElementMap.py:
* css/makeSelectorPseudoElementsMap.py:
* platform/network/create-http-header-name-table:
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (231345 => 231346)
--- trunk/Source/WebCore/ChangeLog 2018-05-04 04:33:53 UTC (rev 231345)
+++ trunk/Source/WebCore/ChangeLog 2018-05-04 05:28:12 UTC (rev 231346)
@@ -1,5 +1,19 @@
2018-05-03 Yusuke Suzuki <[email protected]>
+ Use subprocess.call instead of os.system to handle path with spaces
+ https://bugs.webkit.org/show_bug.cgi?id=185291
+
+ Reviewed by Darin Adler.
+
+ If gperf path includes spaces, these python scripts fail to execute gperf.
+ We use subprocess module instead of os.system to invoke gperf.
+
+ * css/makeSelectorPseudoClassAndCompatibilityElementMap.py:
+ * css/makeSelectorPseudoElementsMap.py:
+ * platform/network/create-http-header-name-table:
+
+2018-05-03 Yusuke Suzuki <[email protected]>
+
Unreviewed, attempt to fix WinCairo build failure
https://bugs.webkit.org/show_bug.cgi?id=185218
Modified: trunk/Source/WebCore/css/makeSelectorPseudoClassAndCompatibilityElementMap.py (231345 => 231346)
--- trunk/Source/WebCore/css/makeSelectorPseudoClassAndCompatibilityElementMap.py 2018-05-04 04:33:53 UTC (rev 231345)
+++ trunk/Source/WebCore/css/makeSelectorPseudoClassAndCompatibilityElementMap.py 2018-05-04 05:28:12 UTC (rev 231346)
@@ -25,6 +25,7 @@
import os
import sys
+import subprocess
def enumerablePseudoType(stringPseudoType):
@@ -211,7 +212,6 @@
if 'GPERF' in os.environ:
gperf_command = os.environ['GPERF']
-gperf_return = os.system("%s --key-positions=\"*\" -m 10 -s 2 SelectorPseudoClassAndCompatibilityElementMap.gperf --output-file=SelectorPseudoClassAndCompatibilityElementMap.cpp" % gperf_command)
-if gperf_return != 0:
+if subprocess.call([gperf_command, '--key-positions=*', '-m', '10', '-s', '2', 'SelectorPseudoClassAndCompatibilityElementMap.gperf', '--output-file=SelectorPseudoClassAndCompatibilityElementMap.cpp']) != 0:
print("Error when generating SelectorPseudoClassAndCompatibilityElementMap.cpp from SelectorPseudoClassAndCompatibilityElementMap.gperf :(")
sys.exit(gperf_return)
Modified: trunk/Source/WebCore/css/makeSelectorPseudoElementsMap.py (231345 => 231346)
--- trunk/Source/WebCore/css/makeSelectorPseudoElementsMap.py 2018-05-04 04:33:53 UTC (rev 231345)
+++ trunk/Source/WebCore/css/makeSelectorPseudoElementsMap.py 2018-05-04 05:28:12 UTC (rev 231346)
@@ -25,6 +25,7 @@
import os
import sys
+import subprocess
def enumerablePseudoType(stringPseudoType):
@@ -206,7 +207,6 @@
if 'GPERF' in os.environ:
gperf_command = os.environ['GPERF']
-gperf_return = os.system("%s --key-positions=\"*\" -m 10 -s 2 SelectorPseudoElementTypeMap.gperf --output-file=SelectorPseudoElementTypeMap.cpp" % gperf_command)
-if gperf_return != 0:
+if subprocess.call([gperf_command, '--key-positions=*', '-m', '10', '-s', '2', 'SelectorPseudoElementTypeMap.gperf', '--output-file=SelectorPseudoElementTypeMap.cpp']) != 0:
print("Error when generating SelectorPseudoElementTypeMap.cpp from SelectorPseudoElementTypeMap.gperf :(")
sys.exit(gperf_return)
Modified: trunk/Source/WebCore/platform/network/create-http-header-name-table (231345 => 231346)
--- trunk/Source/WebCore/platform/network/create-http-header-name-table 2018-05-04 04:33:53 UTC (rev 231345)
+++ trunk/Source/WebCore/platform/network/create-http-header-name-table 2018-05-04 05:28:12 UTC (rev 231346)
@@ -29,6 +29,7 @@
import os
import sys
+import subprocess
program_name = os.path.basename(__file__)
if len(sys.argv) < 2:
@@ -240,6 +241,6 @@
gperf = os.getenv('GPERF') or sys.argv[2]
-if os.system('%s --key-positions="*" -D -n -s 2 HTTPHeaderNames.gperf --output-file=HTTPHeaderNames.cpp' % gperf):
+if subprocess.call([gperf, '--key-positions=*', '-D', '-n', '-s', '2', 'HTTPHeaderNames.gperf', '--output-file=HTTPHeaderNames.cpp']) != 0:
sys.stderr.write('Failed to run gperf.')
exit(1)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes