summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElvis Pranskevichus <elvis@magic.io>2017-12-04 11:51:54 -0500
committerPatrice Clement <monsieurp@gentoo.org>2017-12-08 23:22:06 +0100
commit08f69fe500076c4ecd3291a4297eb6b392f69985 (patch)
tree92110252f896c393c6a3eaf3d3919275a6d9fa57
parentdev-python/parse-type: remove old. (diff)
downloadgentoo-08f69fe500076c4ecd3291a4297eb6b392f69985.tar.gz
gentoo-08f69fe500076c4ecd3291a4297eb6b392f69985.tar.bz2
gentoo-08f69fe500076c4ecd3291a4297eb6b392f69985.zip
dev-util/electron: version bump to 1.6.15.
Closes: https://bugs.gentoo.org/633720 Closes: https://bugs.gentoo.org/635276 Closes: https://bugs.gentoo.org/638270 Closes: https://bugs.gentoo.org/638992 Closes: https://bugs.gentoo.org/640140 Closes: https://github.com/gentoo/gentoo/pull/6478 Signed-off-by: Elvis Pranskevichus <elvis@magic.io> Package-Manager: Portage-2.3.13, Repoman-2.3.3
-rw-r--r--dev-util/electron/Manifest49
-rw-r--r--dev-util/electron/electron-1.6.15.ebuild (renamed from dev-util/electron/electron-1.6.11-r1.ebuild)90
-rw-r--r--dev-util/electron/files/chromium-gcc-7-r0.patch114
-rw-r--r--dev-util/electron/files/chromium-icu-59-r0.patch582
-rw-r--r--dev-util/electron/files/chromium-icu-60-r0.patch66
-rw-r--r--dev-util/electron/files/chromium-python3-compat-r0.patch34
-rw-r--r--dev-util/electron/files/chromium-shared-v8-r2.patch94
-rw-r--r--dev-util/electron/files/chromium-system-icu-r0.patch140
-rw-r--r--dev-util/electron/files/chromium-v8-icu-59-r0.patch83
-rw-r--r--dev-util/electron/files/electron-1.6.11-vendor-libchromiumcontent.patch86
-rw-r--r--dev-util/electron/files/electron-1.6.15-vendor-breakpad.patch223
-rw-r--r--dev-util/electron/files/electron-1.6.15-vendor-brightray.patch (renamed from dev-util/electron/files/electron-1.6.11-vendor-brightray.patch)74
-rw-r--r--dev-util/electron/files/electron-1.6.15-vendor-libchromiumcontent.patch202
-rw-r--r--dev-util/electron/files/electron-1.6.15-vendor-node.patch (renamed from dev-util/electron/files/electron-1.6.11-vendor-node.patch)44
-rw-r--r--dev-util/electron/files/electron-1.6.15.patch (renamed from dev-util/electron/files/electron-1.6.11.patch)124
-rw-r--r--dev-util/electron/files/electron-system-icu-r0.patch34
16 files changed, 1744 insertions, 295 deletions
diff --git a/dev-util/electron/Manifest b/dev-util/electron/Manifest
index b8e5dc6eead3..8fbd6064440f 100644
--- a/dev-util/electron/Manifest
+++ b/dev-util/electron/Manifest
@@ -1,30 +1,31 @@
-DIST asar-0.12.1.tar.gz 1016626 SHA256 731714f0036318fe0878b517391a01977954bb088d4dbc7dd98682ff1e03c0e7 SHA512 fc64be9b11215426d405f7acd7adf6c0eead3135b0012baf6d168a13c77675058a4e2c60682928ac014e4bef4538d452ad745d1e87dd315387997a19e04718a7 WHIRLPOOL d73b8bb459724bb3b011de312171519c1f1954a94ce1bb0a20eb9877c168baa82a15786d3ab420d5b3d32ce8a11333e85f844b43c21cbd56c3b019e73774388e
-DIST brightray-8dbaeed37b9c4fb8ae985670b142f659bb265fb4.tar.gz 76965 SHA256 fb5e57cc723500c8a7b5fba8cf0a38d4ca79b3f967dd9f9427e6fca8cde81552 SHA512 eb0ad05107ebfb4151fb0f26f7dbea58c353cde0407c13ea00c7b98487fb29582d5f3e334900749dc43c8aeca828d8885c4d77dff6739de97ec19b33017a6e93 WHIRLPOOL d2aa3bd6361643304158dff859aa071400bc1b74f0fce934d5dc5eb25bf76d599a27efabde6c13bd20dadb15ffec7bb3ea8577bdb1e38e2382f81600d543fd35
+DIST asar-0.12.1.tar.gz 1016626 BLAKE2B f3e2bee6e844fffcc19150f96cf4b20b5f6bf398d9c4c89f0527ded20478ad100e9fd1eadb3685ad05853b07b0e084c8cdcf99bb0d646e7f7acdcd9e3e9ec3cf SHA512 fc64be9b11215426d405f7acd7adf6c0eead3135b0012baf6d168a13c77675058a4e2c60682928ac014e4bef4538d452ad745d1e87dd315387997a19e04718a7
+DIST asar-0.13.0.tar.gz 1622264 BLAKE2B 018bccc3d2b54040fe7c6e6c1ecfbe0ab4d52554feab78fae41a09d35b7e934720cba45f77239eda46d746390c4f072b3e0eecdf7f0953882d6f27cb940de018 SHA512 619b59e9576a185905b455b780630188ce32aed72b424c69967a7bf15236d1edf2f5d92f7dde972599679c88fe0a80f05295a3d82b2ae0944be08d332a659aee
+DIST brightray-8dbaeed37b9c4fb8ae985670b142f659bb265fb4.tar.gz 76965 BLAKE2B 1705aecfbfa19f20136133f4ed35d0d2a4c6e8157591440954274202110ae73fac67047c9e432f81ec9572b1cc8fc9bacfa4c3251385e46d743ed326156a77fd SHA512 eb0ad05107ebfb4151fb0f26f7dbea58c353cde0407c13ea00c7b98487fb29582d5f3e334900749dc43c8aeca828d8885c4d77dff6739de97ec19b33017a6e93
DIST brightray-9bc1d21b69ac99bed546d42035dc1205ea6b04af.tar.gz 74416 SHA256 9cb944145085384423efdbdbe4dd523b71eaf517fd040e1993666832ffac4fa6 SHA512 c7a16f3634111a43d45959e0406488dc7417848403a6261204b58f67d62688f888f733ca23f3eac3a2dc76955c185ce845d63a6dc1e5a0fba54fb115202414d0 WHIRLPOOL c1ebe0e3adbd74da772778589f59f30a2e288723d62cf8bc686c1b0795daef4c31e9d38363b29dae9b162ccf856707f7a9eb34c8b31ca76042870d7adfa14e99
-DIST brightray-ee26c5218eeec199c54c92a7517a72d2dbd0adbf.tar.gz 82375 SHA256 37090168dfa0d776e28ecca88ef3ba57d3aa2937ef7dc4238e6685aa6f2b3e21 SHA512 7595f5a168d40c42687b8013b588e9c74d6f0047e71549a32d892fa3ca9de9d467303e635364bd779e94094aa9772b705ac027aad481b40d42c0c039ce8f3709 WHIRLPOOL 7b1686cfd9d2189942ab268485a7b230b99ef2a043a4e1b06aaf25c37a01a4278b35769fd73af5b838fdcb782f3a78a2821f95f6a91358d27f11149451437a17
-DIST browserify-14.0.0.tar.gz 1847439 SHA256 616e53fba090d14d673748c12e8ac215b6f7d6f74362666ca91065ce80386344 SHA512 fea8219ab2c5b422c15cc8c305a8aa0396f3de46c8d602eb4976af1d2b0a043214f808e3fa8e31cae0ad7c76d9ddc38239d0208911105f9c851efddfaf96b0c7 WHIRLPOOL 2d2a1dc6f5d5c0db2b43acee8b1dc69c6d3c431e1e0172bf4a3894b628e49dba1aa51155fa8f04e260ce2897ea8c562af200f3e569b9b38e0c783d34c7ae6087
+DIST brightray-ee26c5218eeec199c54c92a7517a72d2dbd0adbf.tar.gz 82375 BLAKE2B 5677ea1c8f3be4bd656bfe0ec4995c903df1fab1a0bc9d5b8a80e83e82713dd2b528adcf7bd1b33ca76104bc340fe48a2ae01a36bd8e204fd12240b8d7116b3e SHA512 7595f5a168d40c42687b8013b588e9c74d6f0047e71549a32d892fa3ca9de9d467303e635364bd779e94094aa9772b705ac027aad481b40d42c0c039ce8f3709
+DIST browserify-14.0.0.tar.gz 1847439 BLAKE2B 50d84f51d8640fa881751339e1d37f04d6ba3ea5aa17222c1e9a29bc805ade5f14ce95bb97fb494e0a1a71e6a5da672566aeb0fbbea4b48d9ad19d20405a0b11 SHA512 fea8219ab2c5b422c15cc8c305a8aa0396f3de46c8d602eb4976af1d2b0a043214f808e3fa8e31cae0ad7c76d9ddc38239d0208911105f9c851efddfaf96b0c7
DIST chromium-47.0.2526.110.tar.xz 394673276 SHA256 65a86d9532e03f94844a4e9b1996af85baeb00c95effe962baa153352483463e SHA512 d1655e822776567101632696c7817067e9a85c0f74df22ea40b8fcb45b9571471d8bb1291bae4dd879d746ddb57206276db8df92ccb546bb00129bc26bb33bb8 WHIRLPOOL 047d5bd9f3cfc09b85288f8f6c24bc72ee2399992b2f02410d4ed651deb1b1141f390d0eb3e56728ac286a3b24fa0d3db9489399ae116fcd820d482f5a055ae3
-DIST chromium-49.0.2623.75.tar.xz 452264916 SHA256 a4fd4c85b12b021789d8afc33b27555396e47d9f67c8a062ee3609c4d6b582f5 SHA512 694f0ccd0a4ff10d8b19e52defb48f6d47daeaa47013f01c2924251f3c6ebaccb20813379c3b7dd6fd939138f25122ed7d1a56e1a6b80309aca65b6c854768fa WHIRLPOOL 00d5b37f425714e4bcb2b563759a8a7b084dc01b7abe6e90f21a3aa470c42944675b5a875e3e918506469cb6cd870038791566ad647b26bd4b11502beb97ecad
-DIST chromium-52.0.2743.82.tar.xz 458110272 SHA256 a7de6015df9cf685d68efd1e070ae9c706c723cd9395d079a7d43672a2c37eb4 SHA512 9bba841cb726bfa06888deefacfcee628e36d25de47dd0303d3fd1ce2f07922148d60befe934f44c33fcdfed6ce3dadfb9e3ee0828b66994807178a488051806 WHIRLPOOL f0d258882db85291262c2381aeb6d85ebf20a252344e114a2da35e75f79dc8b73de95b71926512537af17e109fd7a8dd04386d5b3ed610262d42d11bcc1a5707
-DIST chromium-56.0.2924.87.tar.xz 514429808 SHA256 9aac081ffccaae6497068100477a4e6ac7086bd15ad3c3cd009b9a760b7a53e0 SHA512 1c154004a9bca73e2491c73520a5f7d5c50c5b9d66e8e2660bf46585dd9b6ad3db706a9d824356f319794fa790bc3918ae6199843bcba717b9e74efbf26882c9 WHIRLPOOL ea18fa6d9ad5b296bc561e0fd13f596f3973ec3a020db62de4164b6edf251825a3f26768064ea70ee9e50696b18ec647dc5b9ca3c04dbb3d618ec609302675bc
+DIST chromium-49.0.2623.75.tar.xz 452264916 BLAKE2B 723dd3bc09184690724a7380f2f6e98f9e64b9d77bace85dca49d80734cc63952c3fe80446bd6bc4daf743e9f16f4390884b2d556aaaf355f17637bbedc5d73a SHA512 694f0ccd0a4ff10d8b19e52defb48f6d47daeaa47013f01c2924251f3c6ebaccb20813379c3b7dd6fd939138f25122ed7d1a56e1a6b80309aca65b6c854768fa
+DIST chromium-52.0.2743.82.tar.xz 458110272 BLAKE2B bd255c6f4924cdcd2c17ea5d3c8fc14be95d6f49555c98164a5bfe6f76a9cca2dc49e32ef64f1b8c503092fcfd1c1bf231aabab946eb5a5149c57ca33e5e3be8 SHA512 9bba841cb726bfa06888deefacfcee628e36d25de47dd0303d3fd1ce2f07922148d60befe934f44c33fcdfed6ce3dadfb9e3ee0828b66994807178a488051806
+DIST chromium-56.0.2924.87.tar.xz 514429808 BLAKE2B 96e688230266f00917c6a6ebfaeb9b4e1cbe882a6bd907034a339d7a7b36fe97b451978898fb910938a36e47a9e25fb88117fe764dae759127d391e902533b47 SHA512 1c154004a9bca73e2491c73520a5f7d5c50c5b9d66e8e2660bf46585dd9b6ad3db706a9d824356f319794fa790bc3918ae6199843bcba717b9e74efbf26882c9
DIST electron-0.36.12.tar.gz 3068567 SHA256 8e4ee7ed37d32ad73f8cbfb132ce0009506a01a68d5a71bafd6858c6bc11f9a6 SHA512 37d016768e57f81b01338cea6d0d5eaa6ea72d83a2122b54c9c73e37b0afc7fb8351b0cb846afda29206379d5625657b815b002c2eb3c31babcd0cffa47ae3de WHIRLPOOL a358e353259d377dd59ae563f38b2fe185ade6d7a00bbad8c61831c92b4e200ac1f2f25b79564eae11d9082a569be342ccd4be6e400955cd65729e9299b48796
-DIST electron-0.37.8.tar.gz 3154625 SHA256 d6b01e800aa4cd54b680aa1d78e8c04ed99f82423bab37fe03ad5eb12310f0c0 SHA512 1469129cc6e07da2540ab67d2bb9e2dec4055da77b35bf0abf86a70e82e3ccf443e75edb25feac6c8855c5e841592738319e1a81a52d504e90a5ce9197153754 WHIRLPOOL 677fc9c5bd96d04de43a28c8db23921fb98d3d9a455c32da8235b15c72f2480cce16a3705ae258de1c2b3a5af8d11607c3f868bae248553e593a77c454f94582
-DIST electron-1.3.13.tar.gz 4560040 SHA256 36695722484da433e4bfd465c5688a3b1429365385b547973444c8d7ef0cd810 SHA512 c15b8303e1a18674fd828991a118bf670ccd052b35cac7d476b06e7903055fa905a93a79dced4186c70d30c7d220a3b7daa2a4f490b70c87134fbc393d54d94d WHIRLPOOL 4e027b48a076a208c4c83f7a82e8f591de9bf22b4c5146d50dc06772257768db6a996eea974ad6097838573f8e69828899c862b3b9271bd34c92d95e9502376b
-DIST electron-1.6.11.tar.gz 4938208 SHA256 b2e1ff38076b0554eae399ef16725643a9484fb923c90be0d65ec2cb1a17dfa3 SHA512 dc44ae9b9e69ed1b0a2b9f2faceea2bc8bac29b3897f1f95273b1e17268159d77b4ba7344e6b0383aa4196d21df203cca404a6356a8674b3dbab7452968cf60f WHIRLPOOL eb1853ab4d04fb77b6d1510d25dbcedd71ddc6431d451ab1a544e12bdf1cb362a8f4589849dacf0d022b0e57cb5fdbb66a7afaead9c8a4d47c118c008dbc55f7
-DIST electron-breakpad-e35167de7516448fcc2bf687ad580b9d8b6aedc2.tar.gz 5161275 SHA256 d361fe5f8a1c203ceb5844b4c1faf2f4f3d7860dc9fe2757b317dda968170511 SHA512 dce89f5976ddac0f87f70f11cc5fdf44a29198b302ed6eecd2c7530ccb33613563ef2ce797b7187c986d3b900b212eede8530e1e8f3b6a88ac727ff9623dd333 WHIRLPOOL f88865a72a2c7e6cc0327f9bef5a021deda91b16257fe7a3432982bf95aa0579c6934eeddc83f1516b6c7ae91769720fc18b9ec19df268141db801359dab2344
-DIST electron-brightray-909c49265493bd095c27cefd999567be2107899a.tar.gz 98022 SHA256 249424ca00a4b96ea22c58584952748f02376e92ee231e63230403e20e11fed0 SHA512 e1df1159a97c87e1edce9ea896d790e3004cc836d879385cdc5324c1961209ebf884fb7771861f4c6bf86b50ff1d8818540555bbcc77bf10987e0a68cd855127 WHIRLPOOL fe9bd8fb40c34e9278832a8660ab6b03f9ee0f900e9dce940107216d33c72a8e7ce13f7e5556d788c2a0ebabb0a536ff6cfb77e65ef96f4ea5a76441025baff6
-DIST electron-chromium-breakpad-c566c50d81f7b1edeaee9f11f5d07bda858d6b64.tar.gz 1141356 SHA256 ac8cd3e020dd437e60d2d29b712fb7019705a0706c895d6f7935b4f5ed2f2763 SHA512 9fb07facb147d401655cefea103cb1499de9ca27093c756a3b5d6ff1117a288ac491fedf01df61775ce6590e852e942cf7db1e135d6d30e94188283a53dd8e10 WHIRLPOOL fdcd9a90cf7d5156796679a21cd1210ad7e75c910d0f924168e20d8f1ccf61f803f5913a50766ddc2b7b08f864677d1bab6199e1fc06cd615b765f412297405e
-DIST electron-grit-9536fb6429147d27ef1563088341825db0a893cd.tar.gz 378461 SHA256 20b80507c29ce7b0eab57d814176fe1b1897a9b69add0bf073d5ba7b1b5d7c56 SHA512 515797740421d5f80912b33dab2039c35b2ae432a0c4351aa031461ef6c82b7a1775c3d4d41ba6c646f81ba3ddf3bbfcb35b81da1ef88b486a2a67d15f09ec86 WHIRLPOOL b6d395d549238f7552fa05eb3640ca8afd6781d998f7c9fdea8d34323b4b57ec77ca714fe4e14d97a5a44e1a4157260cd5e017d9b132fba3c32be49a57559430
-DIST electron-libchromiumcontent-e2ec6935fbf034207d5ad00fa905a4b2cdd60bb7.tar.gz 418797 SHA256 bdf1876c144a72ebb782abf8c00981fd25f317c69611255b6143e1822866ee6f SHA512 aa6d5b16be6e0a218042c11865751fb14b6f4ccf3252075e681309df853f03fda9a38b955749b1fe16f11a127f2aab181edcb3eed8511f69aa5c43395ff9f7f7 WHIRLPOOL e02893b291806d3fa0b2e0c4ae5b7b71a44637ebecd10fec922d03ec261dd152478f12fe9bf9dab60d520bb49cf947f62240edfe386fa355e6c283848fddef3d
-DIST electron-native-mate-fd0e7dc4ab778f0d1ccda6c9640464ea06ee771e.tar.gz 23926 SHA256 bbbcdd6de05ea677658df775dc3943820596654e5aecb0f25d1c1bdbb897f376 SHA512 8715c417473340163ca3db2754ab10619679ac72378ff5c7f63899fe891d5c83e7b3db6832af885de63eb5a732ed54f393bcc3aeb8ddd38569e74023c46f72ac WHIRLPOOL aff212822f12a111126116cee60f5c3e8bb3e53bfc7de1209315a7b7671b413e3428088f639b9c6c2132cd1b30f3bb9edf813b74feb74cd7a899ae902e723691
-DIST electron-node-6bcd8af891a991f8aa196e49e6bf908ebbe24cae.tar.gz 36600837 SHA256 6b7bb43be6d24bc55a6ccd4b8efd2f88d8d2fd7d8437d7aa33d813c649f791f7 SHA512 7fcafa01027bd68794a7cd2f049a7bdf45e1dd56622583bd5d53d662328e64619dd5dbeec295ff559b1b268e90bf6abf3d76cd6d00f055602bbaa7443e3a3450 WHIRLPOOL c5dd664910a59c7fb1d4aaf3c91b298b7266466596ce2a4f4f41ff6637db9e480450eaf1e9255ab810de13df1abbd769f32bdc73124bea9ab4ed013cda945bd0
-DIST electron-node-9b1683e7000481ec6214eafa3eef7ac4594eb410.tar.gz 46194500 SHA256 0204c0402ffb5c8a7ded1a8a65018fbeffd86ead38e95ee3341e10f5a4162170 SHA512 f258cf5597154e976e1e4c0b81f6b63e9b344e4a28492137b80d59dc841490d4ad69e6bab2456a6334a42e51dfe2862cc389e837a4baac90a698ff60e5b08ab4 WHIRLPOOL 651c793ca4ea7b144c79d842a565cd5870a2a7826b8e86929e9b1950ab1fe45d833a4d54ec549e120e7b69a724563ae583156ab7f8f77bef3c3f5263bcb6f64e
+DIST electron-0.37.8.tar.gz 3154625 BLAKE2B 3f1359560d555951b0f0f4d481449ec2676d53db2d135017bb6d57a6595a6b41eab3307fbca91106dc53bec463153205aa4495f092a10b16f27105beb2f1b512 SHA512 1469129cc6e07da2540ab67d2bb9e2dec4055da77b35bf0abf86a70e82e3ccf443e75edb25feac6c8855c5e841592738319e1a81a52d504e90a5ce9197153754
+DIST electron-1.3.13.tar.gz 4560040 BLAKE2B 1ef5a52547828427eba6ed8b85e50ba2405658ccfce6bb27af32f380c8122e12c7f69115321f961948cf9f4ba8af6a4f04945a2c45d4dd82169f876d06a9d3e9 SHA512 c15b8303e1a18674fd828991a118bf670ccd052b35cac7d476b06e7903055fa905a93a79dced4186c70d30c7d220a3b7daa2a4f490b70c87134fbc393d54d94d
+DIST electron-1.6.15.tar.gz 4943663 BLAKE2B 867964e23bea77b0892febcc47198bf783f0021df842c40c94c2159abca75ca45cac345323bb2735a9ddc935bedba62126d5afe9ad9e0fc031abefbaf444d441 SHA512 e6e7519db6d272d151e5618976a69feb11c35f1845561d152c64b474696f3835644b232b020df00166f80913b2c492e6e8cefce1a96494a2bb92096936e18958
+DIST electron-breakpad-e35167de7516448fcc2bf687ad580b9d8b6aedc2.tar.gz 5161275 BLAKE2B a8414bb2876031f71e5c0c9263cf7ee03c4af9d8dee2890bb4c39c82869282bc20b4c2807068ab72bcb96e71559dbea083ca27b9cddbc991bf1dc7e6c16a5dc3 SHA512 dce89f5976ddac0f87f70f11cc5fdf44a29198b302ed6eecd2c7530ccb33613563ef2ce797b7187c986d3b900b212eede8530e1e8f3b6a88ac727ff9623dd333
+DIST electron-brightray-909c49265493bd095c27cefd999567be2107899a.tar.gz 98022 BLAKE2B a90ab9d0480c1d1f7d5f40ccf9bf8f4568175c9662bc47f9754a293018d6cc8930cf6e104aea57f660893c44837b3f48ddaacc3bdc2bcf347f1a60f93a987f4a SHA512 e1df1159a97c87e1edce9ea896d790e3004cc836d879385cdc5324c1961209ebf884fb7771861f4c6bf86b50ff1d8818540555bbcc77bf10987e0a68cd855127
+DIST electron-chromium-breakpad-c566c50d81f7b1edeaee9f11f5d07bda858d6b64.tar.gz 1141356 BLAKE2B 6a16d29639c668a6360514ed56373f4da5396650ba63d3aa7a3bca66a89ef1b2244bbe4a2e02ea0439f999c872bbb12e0d1289051c49cebf3d931ae7255b83b7 SHA512 9fb07facb147d401655cefea103cb1499de9ca27093c756a3b5d6ff1117a288ac491fedf01df61775ce6590e852e942cf7db1e135d6d30e94188283a53dd8e10
+DIST electron-grit-9536fb6429147d27ef1563088341825db0a893cd.tar.gz 378461 BLAKE2B cb194cca884419f1c85524740860db244b06a237428add2cd9afaae8e0fe63ccb266b8e5e44f2125da57d263f167aec6c46c9c3451c5217100d58825f4322ecd SHA512 515797740421d5f80912b33dab2039c35b2ae432a0c4351aa031461ef6c82b7a1775c3d4d41ba6c646f81ba3ddf3bbfcb35b81da1ef88b486a2a67d15f09ec86
+DIST electron-libchromiumcontent-a9b88fab38a8162bb485cc5854973f71ea0bc7a6.tar.gz 427806 BLAKE2B 21274045953499b7656366520d93acb63515995e7d6614afa5bba097e80bf833611fd715f0a8782dbdcb3c7c11ce2c4f5c2789483d4847e5bd73567123022dfd SHA512 da23b6119aa39d2ebc39b20280e2b6c0c26eba3e45271a3b8b196149ae8fb17f7ae63b97821ecdbc74c8d28617e361a3570e89c716d560a3b0caa7fa1f673f09
+DIST electron-native-mate-fd0e7dc4ab778f0d1ccda6c9640464ea06ee771e.tar.gz 23926 BLAKE2B 72ec5ee020ac18c5b3a8b6552698ed845cb0c401c0b02a4627479c98c581018658471df95de9d242db85ac9a4588b5f80b488180049271322545d69ecbf01123 SHA512 8715c417473340163ca3db2754ab10619679ac72378ff5c7f63899fe891d5c83e7b3db6832af885de63eb5a732ed54f393bcc3aeb8ddd38569e74023c46f72ac
+DIST electron-node-6bcd8af891a991f8aa196e49e6bf908ebbe24cae.tar.gz 36600837 BLAKE2B afe210292b84c71b0859c790cadc60e894e8a2531d0fcea8ba60a70c7a2a937d09056647a0e6862eb710a7196f2eb9fd8d7a9be01b4b6eba4c5388aad687afe2 SHA512 7fcafa01027bd68794a7cd2f049a7bdf45e1dd56622583bd5d53d662328e64619dd5dbeec295ff559b1b268e90bf6abf3d76cd6d00f055602bbaa7443e3a3450
+DIST electron-node-9b1683e7000481ec6214eafa3eef7ac4594eb410.tar.gz 46194500 BLAKE2B 36537f40a597f9ed969abe385de8cf58fd2f48526021461ab5feb0e061a2dc0d4a49109191254e69b685101f6aa79d1c870091f0eae251ba8b3bc0b3e6a975e6 SHA512 f258cf5597154e976e1e4c0b81f6b63e9b344e4a28492137b80d59dc841490d4ad69e6bab2456a6334a42e51dfe2862cc389e837a4baac90a698ff60e5b08ab4
DIST electron-node-a507a3c3816d6ac085ed46250c489a3d76ab8b3c.tar.gz 36578658 SHA256 56489ffa9d58b736008f5c1c2775bc10f3afe02d3c768035e7742893cc8e1d82 SHA512 a5b62c05ec7300a26b3feab3c1e796a87691d41fa7c039541574878491df51e9075685abc5d630fc62bca95bf821eeede041d4ab36caedaf76156844f1095ea6 WHIRLPOOL 8675b05753cf905cfb2fc0ebb19fc256489a7b932c57be291eb2fc7194de599c07f4120541f4a61cccdb43b09b6280c7c02f9565aef98129c584fdca4c154279
-DIST electron-node-c47e9bf9011de682d07c82f7f610a467f30cca60.tar.gz 44172045 SHA256 d0dad2c1ee6eea81fa6f55a70f4142eb7bffcc143532d50e848fea08b31d5ef7 SHA512 830cb5e4aa1956d0f67b0c5ad44241254596791b3bbc533a170b1b7bcb7a45137ff62b885a65a78a64323ad94f660c6b75142109d79256420b8d20a7d26acff7 WHIRLPOOL a69758c90ddbd3f75f9d62efb9cfefba9fe6c52c627fbcab103abe6e11916826c42e1b5072e203ce34657ac7fe9b79c2bc1621dd3b595626e138161bd91c6766
-DIST electron-pdf-viewer-a050a339cfeabcfb5f07c313161d2ee27b6c3a39.tar.gz 38431 SHA256 03a147dfc8273495cf47b53a2a03ca41e03695e1af66c51df9e49ca52ff51233 SHA512 a028b67c0644d4ddcfc5aee4e2abb305648eb666082ea2c151cb6b9b3972503093cadb32b102aa19b04c8e863c2ac55bb20cccbf2abbf7832f9cfd3c3618612e WHIRLPOOL 54dd4ff5fc59e057ce67f409629818accad0ee7c97e18e9cb86174cbfd845fdd7d370b291b2adddc91d81e3743eb744aa6c4f149a74f87cad3ffd32674c5f1e8
-DIST libchromiumcontent-27add4cfef98f21d5910539bebb47ae175f024c2.tar.gz 403724 SHA256 cf0342130f4bb929894249a381b6d6433f8d5b6d9331f4bd843250c4e66063b6 SHA512 7995fe40100b91f57ccc8fde445f136fda62d2c88a8a06d1b07aa588bcdb27905a542d62ec9cdf567b626439d8648fc749b73d7e9f52deaa94ead27e191a732f WHIRLPOOL 426d75c7ff7788d6dd208b68407bad7600090f6c1208823db65ef10ab7efcb8b8cbe9fce7ada6886a6711dfea0503a70a088e63f71221a8098cb62f3f3d1131c
-DIST libchromiumcontent-60c7ec9f9bf465a8c9c7ccc3fcd2aa1cdf644bac.tar.gz 402072 SHA256 69877d4b9def6dc69063f0bf37d9d59721c22acced45e271b3f36bde8446a37c SHA512 ddd52e58df1848edab6c514e0ef8e4155eccec6bec9d4e557dc0ee7d5c2cc4036f25d1786376b5b47a5122a266f00cd589ce665b8463549e9383d60292d180dc WHIRLPOOL 789be242983ab54e212df13c6f51c5c949d6a4ace21a548b99f17e292b37842ce0c748e29c17bd116a95a163ca2bd709dadc59ecacc9d3ab8c58143ddf9f2d71
+DIST electron-node-c47e9bf9011de682d07c82f7f610a467f30cca60.tar.gz 44172045 BLAKE2B 4c9bb3df3366e01347e527df9aba1fe57bfcda1fb0542e5c0a84c924094965a05d7cfa1be336a29ac6562e9a1eaafce3df015ee27a3df7f032bb2c2a20a6aa78 SHA512 830cb5e4aa1956d0f67b0c5ad44241254596791b3bbc533a170b1b7bcb7a45137ff62b885a65a78a64323ad94f660c6b75142109d79256420b8d20a7d26acff7
+DIST electron-pdf-viewer-a050a339cfeabcfb5f07c313161d2ee27b6c3a39.tar.gz 38431 BLAKE2B 962b1eeaa74544d57a5664fc6965b9f43e6d94671a08be024bb3001d7cf7e3ee02b2c63c2074e2ed4d6484dc5db7515cb170bf7432a8d11ccf595716e5c4500e SHA512 a028b67c0644d4ddcfc5aee4e2abb305648eb666082ea2c151cb6b9b3972503093cadb32b102aa19b04c8e863c2ac55bb20cccbf2abbf7832f9cfd3c3618612e
+DIST libchromiumcontent-27add4cfef98f21d5910539bebb47ae175f024c2.tar.gz 403724 BLAKE2B 126cd5ae76be99268a8f4c765a2efae325a56e43c8d6ae171e8d1a4f1f872358bcbc3004e8abf77826cd6cc15dd3e3bf212b2300d9247fe6fc724f21de193db0 SHA512 7995fe40100b91f57ccc8fde445f136fda62d2c88a8a06d1b07aa588bcdb27905a542d62ec9cdf567b626439d8648fc749b73d7e9f52deaa94ead27e191a732f
+DIST libchromiumcontent-60c7ec9f9bf465a8c9c7ccc3fcd2aa1cdf644bac.tar.gz 402072 BLAKE2B 908a54450a4a39b37be08e5926b808f29111214a36bb8d91c8c24d31e53cac7ac38b19508e942586e9338267096ab7e1395de2773e46721029dc6ba004ac9875 SHA512 ddd52e58df1848edab6c514e0ef8e4155eccec6bec9d4e557dc0ee7d5c2cc4036f25d1786376b5b47a5122a266f00cd589ce665b8463549e9383d60292d180dc
DIST libchromiumcontent-ad63d8ba890bcaad2f1b7e6de148b7992f4d3af7.tar.gz 400648 SHA256 36b46659fff3053ce273d3ed159fca74e18ebc873694f857a521d3c48fc079b1 SHA512 5fcb5e3dd98d5875ff7aa9f9f4d02af45487534d0301ca7a0a7adde934f528fedc3dfaf886b9031027e41309eb8ba658b72a56af4ad8dc44cce458b9c04a0e47 WHIRLPOOL 31d28804f91bbdece8709ddac359e7f5c079b034137734041f274838d138d8e141fe12c0ecf1e66f92b15e8c653526a1779d3bcc342e3ecc9a39a18c689a94a6
-DIST native-mate-0df2d882ea2286e6335f206b7002037fce66c4a5.tar.gz 23738 SHA256 d0ad6b3079fcfdf1adb09a68f5d8b7ac5b83c6d19b078993941b1a95ccac232b SHA512 fdd928a4b170636320e6cfd65753aec47c38380ef6f1b6dde255fbdcf3756abe8568e689e1214d768056187b243f979f16d4289ce8429a5ddd17b07f806ef731 WHIRLPOOL 762c4f2c093853731cbf8a79953e0da0bf66d6f1f08a08ad3ba2131b87113209bc93e138e974745b89da5dd9c14c0d5035dd686ad5b79ad7faba0b6076d2a6fb
-DIST native-mate-b5e5de626c6a57e44c7e6448d8bbaaac475d493c.tar.gz 23465 SHA256 e9a5340c51690100be798c3d8c76662f78b0f292b22e394a5703326c07fc2639 SHA512 d004f4ec3ca77d98b2b2bc271c830b769bb6396e70d8dbf25ede87c509ce95dea083d6e5b3d050647cdf3d0a6a21c6da91176eba90d7256ab80f5d23248a6bb1 WHIRLPOOL 66b0d5544d8e72692150541a8f7ecac7421edef2a4d3837a1f7a1dea785f99fb40492261654ad7b6c1a38fcf04a44d4afa832d20175eb34944437712bbb711ef
+DIST native-mate-0df2d882ea2286e6335f206b7002037fce66c4a5.tar.gz 23738 BLAKE2B f0408715bf85dd087278cd04860ab3f377f5008ff28b05831c960c9cc3a345125639fa0593fd27a02fe3fde217ae3a4f5d0c22a02625f512ff9b62121c581aac SHA512 fdd928a4b170636320e6cfd65753aec47c38380ef6f1b6dde255fbdcf3756abe8568e689e1214d768056187b243f979f16d4289ce8429a5ddd17b07f806ef731
+DIST native-mate-b5e5de626c6a57e44c7e6448d8bbaaac475d493c.tar.gz 23465 BLAKE2B 2d4e5ab06c8fe49188db2b339a5a5a102043fe2a7f21930e2eca5504a159192fdf2ca90fdf5c895ed9a942e512684f20112d26ed7bbc4a7e16d694632482413b SHA512 d004f4ec3ca77d98b2b2bc271c830b769bb6396e70d8dbf25ede87c509ce95dea083d6e5b3d050647cdf3d0a6a21c6da91176eba90d7256ab80f5d23248a6bb1
DIST native-mate-e719eab878c264bb03188d0cd6eb9ad6882bc13a.tar.gz 23818 SHA256 82da85193f6924ce395004ce9dfd1198848cf8f14b7904321e67cad26a39f794 SHA512 4272648127fb0bf90b36d2c090bea718d560737c1c7443a5b3c0de12999ffe607429b2112ecee36ece5d26cde54e78964303250ffd350a19c132c9733b72c523 WHIRLPOOL c275163b9f3f424f5909f17c67f5b029f03bf76679296781bd6d74e64d903dd29cf5c28f1c4e399a049331f54f03175fe2c02de9ef6bf65040d9cef05be44a51
diff --git a/dev-util/electron/electron-1.6.11-r1.ebuild b/dev-util/electron/electron-1.6.15.ebuild
index 756216c84209..9fb088b4ae1c 100644
--- a/dev-util/electron/electron-1.6.11-r1.ebuild
+++ b/dev-util/electron/electron-1.6.15.ebuild
@@ -30,9 +30,9 @@ PDF_VIEWER_COMMIT="a050a339cfeabcfb5f07c313161d2ee27b6c3a39"
# Keep this in sync with vendor/pdf_viewer/vendor/grit
GRIT_COMMIT="9536fb6429147d27ef1563088341825db0a893cd"
# Keep this in sync with script/lib/config.py:LIBCHROMIUMCONTENT_COMMIT
-LIBCHROMIUMCONTENT_COMMIT="e2ec6935fbf034207d5ad00fa905a4b2cdd60bb7"
+LIBCHROMIUMCONTENT_COMMIT="a9b88fab38a8162bb485cc5854973f71ea0bc7a6"
# Keep this in sync with package.json#devDependencies
-ASAR_VERSION="0.12.1"
+ASAR_VERSION="0.13.0"
BROWSERIFY_VERSION="14.0.0"
CHROMIUM_P="chromium-${CHROMIUM_VERSION}"
@@ -95,7 +95,7 @@ COMMON_DEPEND="
>=dev-libs/elfutils-0.149
dev-libs/expat:=
dev-libs/glib:2
- dev-libs/icu:=
+ >=dev-libs/icu-58:=
>=dev-libs/jsoncpp-0.5.0-r1:=
dev-libs/nspr:=
>=dev-libs/nss-3.14.3:=
@@ -178,6 +178,23 @@ DEPEND="${COMMON_DEPEND}
')
"
+CHROMIUM_PATCHES="
+ chromium-FORTIFY_SOURCE.patch
+ chromium-gcc-7-r0.patch
+ chromium-glibc-2.24.patch
+ chromium-56-gcc4.patch
+ chromium-system-ffmpeg-r4.patch
+ chromium-system-icu-r0.patch
+ chromium-icu-59-r0.patch
+ chromium-icu-60-r0.patch
+ chromium-v8-icu-59-r0.patch
+ chromium-disable-widevine.patch
+ chromium-remove-gardiner-mod-font-r1.patch
+ chromium-shared-v8-r2.patch
+ chromium-lto-fixes-r3.patch
+ chromium-python3-compat-r0.patch
+"
+
# Keep this in sync with the python_gen_any_dep call.
python_check_deps() {
has_version --host-root "dev-python/beautifulsoup:python-2[${PYTHON_USEDEP}]" &&
@@ -248,12 +265,17 @@ pkg_setup() {
}
_unnest_patches() {
- local _s="${1%/}/" relpath out
-
- for f in $(find "${_s}" -mindepth 2 -name *.patch -printf \"%P\"\\n); do
- relpath="$(dirname ${f})"
- out="${_s}/${relpath////_}_$(basename ${f})"
- sed -r -e "s|^([-+]{3}) (.*)$|\1 ${relpath}/\2 ${f}|g" > "${out}"
+ local _s="${1%/}/"
+ local path
+ local relpath
+ local out
+
+ (find "${_s}" -mindepth 2 -name '*.patch' -printf "%P\n" || die) \
+ | while read -r path; do
+ relpath="$(dirname ${path})"
+ out="${_s}/__${relpath////_}_$(basename ${path})"
+ sed -r -e "s|^([-+]{3}) [ab]/(.*)$|\1 ${relpath}/\2|g" \
+ "${_s}/${path}" > "${out}" || die
done
}
@@ -320,6 +342,7 @@ src_prepare() {
# electron patches
cd "${ELECTRON_S}" || die
eapply "${FILESDIR}/${P}.patch"
+ eapply "${FILESDIR}/${PN}-system-icu-r0.patch"
# node patches
cd "${NODE_S}" || die
@@ -356,28 +379,28 @@ src_prepare() {
cd "${LIBCC_S}" || die
eapply "${FILESDIR}/${P}-vendor-libchromiumcontent.patch"
+ # breakpad patches
+ cd "${BREAKPAD_S}" || die
+ eapply "${FILESDIR}/${P}-vendor-breakpad.patch"
+
# chromium patches
cd "${CHROMIUM_S}" || die
- eapply "${FILESDIR}/chromium-FORTIFY_SOURCE.patch"
- eapply "${FILESDIR}/chromium-glibc-2.24.patch"
- eapply "${FILESDIR}/chromium-56-gcc4.patch"
- eapply "${FILESDIR}/chromium-system-ffmpeg-r4.patch"
- eapply "${FILESDIR}/chromium-disable-widevine.patch"
- eapply "${FILESDIR}/chromium-remove-gardiner-mod-font-r1.patch"
- eapply "${FILESDIR}/chromium-shared-v8-r2.patch"
- eapply "${FILESDIR}/chromium-lto-fixes-r3.patch"
-
# libcc chromium patches
_unnest_patches "${LIBCC_S}/patches"
EPATCH_SOURCE="${LIBCC_S}/patches" \
EPATCH_SUFFIX="patch" \
EPATCH_FORCE="yes" \
- EPATCH_EXCLUDE="third_party_icu*" \
EPATCH_MULTI_MSG="Applying libchromiumcontent patches..." \
epatch
+ # Apply Gentoo-specific Chromium patches
+ local p
+ for p in ${CHROMIUM_PATCHES}; do
+ eapply "${FILESDIR}/${p}"
+ done
+
# Merge chromiumcontent component into chromium source tree.
mkdir -p "${CHROMIUM_S}/chromiumcontent" || die
cp -a "${LIBCC_S}/chromiumcontent" "${CHROMIUM_S}/" || die
@@ -504,8 +527,10 @@ src_prepare() {
fi
# Remove most bundled libraries. Some are still needed.
+ ebegin "Unbundling libraries"
build/linux/unbundle/remove_bundled_libraries.py \
"${keeplibs[@]}" --do-remove || die
+ eend
cd "${S}" || die
@@ -633,6 +658,8 @@ src_configure() {
# Define a custom toolchain for GN
myconf_gn+=" custom_toolchain=\"${FILESDIR}/toolchain:default\""
+ myconf_gn+=" icu_use_data_file=false"
+
use lto && myconf_gn+=" allow_posix_link_time_opt=true"
# Tools for building programs to be executed on the build system, bug #410883.
@@ -725,6 +752,8 @@ src_compile() {
local libcc_output="${CHROMIUM_S}/out/Release/obj/chromiumcontent"
local libcc_output_shared="${libcc_output}-shared"
local target_arch=$(_get_target_arch)
+ local l=""
+ local create_dist_args=""
tc-export AR CC CXX NM
@@ -735,6 +764,7 @@ src_compile() {
# Build mksnapshot and pax-mark it.
eninja -C "${chromium_target}" mksnapshot || die
pax-mark m "${chromium_target}/mksnapshot"
+ cp -a "${chromium_target}/mksnapshot" "${compile_target}/" || die
# Build chromedriver.
eninja -C "${chromium_target}" chromedriver
@@ -746,18 +776,18 @@ src_compile() {
cd "${S}" || die
# Gather and prepare built components of libchromiumcontent.
+ create_dist_args+=" --target_arch=${target_arch} --component=static_library"
+ create_dist_args+=" --no_zip"
+ create_dist_args+=" --system-icu"
CHROMIUM_BUILD_DIR="${chromium_target}" \
- python2 "${libcc_path}"/script/create-dist \
- --target_arch=${target_arch} \
- --component=static_library \
- --no_zip || die
+ "${EPYTHON}" "${libcc_path}"/script/create-dist ${create_dist_args} || die
# v8 is built as a shared library, so copy it manually
# for generate_filenames_gypi to find.
mkdir -p "${libcc_dist_shared_path}" || die
cp "${chromium_target}/libv8.so" "${libcc_dist_shared_path}" || die
- python2 "${libcc_path}"/tools/generate_filenames_gypi.py \
+ "${EPYTHON}" "${libcc_path}"/tools/generate_filenames_gypi.py \
"${libcc_dist_path}/filenames.gypi" \
"${CHROMIUM_S}" \
"${libcc_dist_shared_path}" \
@@ -771,6 +801,8 @@ src_compile() {
$(gyp_use gnome-keyring linux_link_gnome_keyring)
$(gyp_use lto)"
+ myconf_gyp+=" -Duse_system_icu=1"
+
if [[ $(tc-getCC) == *clang* ]]; then
myconf_gyp+=" -Dclang=1"
else
@@ -788,6 +820,7 @@ src_compile() {
-Dsysroot="
myconf_gyp+=" -Dtarget_arch=${target_arch}"
+ myconf_gyp+=" -Dpython=${EPYTHON}"
# Make sure that -Werror doesn't get added to CFLAGS by the build system.
# Depending on GCC version the warnings are different and we don't want
@@ -797,20 +830,19 @@ src_compile() {
# Disable fatal linker warnings, bug 506268.
myconf_gyp+=" -Ddisable_fatal_linker_warnings=1"
- # Needed for system icu - we don't need additional data files.
myconf_gyp+=" -Dicu_use_data_file_flag=0"
myconf_gyp+=" -Dgenerate_character_data=0"
myconf_gyp+=" -Dlibchromiumcontent_component=0"
myconf_gyp+=" -Dcomponent=static_library"
myconf_gyp+=" -Dlibrary=static_library"
- myconf_gyp+=" -Ivendor/node/config.gypi -Icommon.gypi electron.gyp"
+ myconf_gyp+=" -Icommon.gypi electron.gyp"
EGYP_CHROMIUM_COMMAND="${CHROMIUM_S}/build/gyp_chromium" \
egyp_chromium ${myconf_gyp} || die
- # Copy libv8 and snapshot files so the node binary can find them.
mkdir -p "${compile_target}/lib/" || die
+ # Copy libv8 and snapshot files so the node binary can find them.
cp "${chromium_target}/libv8.so" "${compile_target}/lib/" || die
cp "${chromium_target}/natives_blob.bin" "${compile_target}" || die
cp "${chromium_target}/snapshot_blob.bin" "${compile_target}" || die
@@ -846,9 +878,11 @@ src_install() {
newexe out/R/nodebin node
doexe out/R/electron
doexe out/R/chromedriver
+ doexe out/R/mksnapshot
doins out/R/libv8.so
+ fperms +x "${install_dir}/libv8.so"
doins out/R/libnode.so
- fperms +x "${install_dir}/libv8.so" "${install_dir}/libnode.so"
+ fperms +x "${install_dir}/libnode.so"
doins out/R/natives_blob.bin
doins out/R/snapshot_blob.bin
doins out/R/blink_image_resources_200_percent.pak
diff --git a/dev-util/electron/files/chromium-gcc-7-r0.patch b/dev-util/electron/files/chromium-gcc-7-r0.patch
new file mode 100644
index 000000000000..7a7ded275cd0
--- /dev/null
+++ b/dev-util/electron/files/chromium-gcc-7-r0.patch
@@ -0,0 +1,114 @@
+From 19597ff341e55fef78c7fae794574785bfde9acd Mon Sep 17 00:00:00 2001
+From: Elvis Pranskevichus <elvis@magic.io>
+Date: Thu, 7 Dec 2017 09:25:03 -0500
+Subject: [PATCH] GCC-7 compatibility
+
+---
+ .../Source/platform/graphics/gpu/SharedGpuContext.h | 1 +
+ third_party/WebKit/Source/wtf/LinkedHashSet.h | 1 +
+ v8/src/objects-body-descriptors.h | 2 +-
+ v8/src/objects-inl.h | 19 +++++++++++++++++++
+ v8/src/objects.h | 20 ++++----------------
+ 5 files changed, 26 insertions(+), 17 deletions(-)
+
+diff --git a/third_party/WebKit/Source/platform/graphics/gpu/SharedGpuContext.h b/third_party/WebKit/Source/platform/graphics/gpu/SharedGpuContext.h
+index 7c32007346..dd2d637085 100644
+--- a/third_party/WebKit/Source/platform/graphics/gpu/SharedGpuContext.h
++++ b/third_party/WebKit/Source/platform/graphics/gpu/SharedGpuContext.h
+@@ -5,6 +5,7 @@
+ #include "platform/PlatformExport.h"
+ #include "wtf/ThreadSpecific.h"
+
++#include <functional>
+ #include <memory>
+
+ namespace gpu {
+diff --git a/third_party/WebKit/Source/wtf/LinkedHashSet.h b/third_party/WebKit/Source/wtf/LinkedHashSet.h
+index 65f5100a8f..7c6c9fc5d8 100644
+--- a/third_party/WebKit/Source/wtf/LinkedHashSet.h
++++ b/third_party/WebKit/Source/wtf/LinkedHashSet.h
+@@ -630,6 +630,7 @@ inline LinkedHashSet<T, U, V, W>& LinkedHashSet<T, U, V, W>::operator=(
+ return *this;
+ }
+
++inline void swapAnchor(LinkedHashSetNodeBase& a, LinkedHashSetNodeBase& b);
+ template <typename T, typename U, typename V, typename W>
+ inline void LinkedHashSet<T, U, V, W>::swap(LinkedHashSet& other) {
+ m_impl.swap(other.m_impl);
+diff --git a/v8/src/objects-body-descriptors.h b/v8/src/objects-body-descriptors.h
+index 91cb8883be..a1c3634bd7 100644
+--- a/v8/src/objects-body-descriptors.h
++++ b/v8/src/objects-body-descriptors.h
+@@ -99,7 +99,7 @@ class FixedBodyDescriptor final : public BodyDescriptorBase {
+
+ template <typename StaticVisitor>
+ static inline void IterateBody(HeapObject* obj, int object_size) {
+- IterateBody(obj);
++ IterateBody<StaticVisitor>(obj);
+ }
+ };
+
+diff --git a/v8/src/objects-inl.h b/v8/src/objects-inl.h
+index 1a8274cbf1..6c4b13c0d0 100644
+--- a/v8/src/objects-inl.h
++++ b/v8/src/objects-inl.h
+@@ -39,6 +39,25 @@
+ namespace v8 {
+ namespace internal {
+
++template <typename Derived, typename Shape, typename Key>
++uint32_t HashTable<Derived, Shape, Key>::Hash(Key key) {
++ if (Shape::UsesSeed) {
++ return Shape::SeededHash(key, GetHeap()->HashSeed());
++ } else {
++ return Shape::Hash(key);
++ }
++}
++
++template <typename Derived, typename Shape, typename Key>
++uint32_t HashTable<Derived, Shape, Key>::HashForObject(Key key,
++ Object* object) {
++ if (Shape::UsesSeed) {
++ return Shape::SeededHashForObject(key, GetHeap()->HashSeed(), object);
++ } else {
++ return Shape::HashForObject(key, object);
++ }
++}
++
+ PropertyDetails::PropertyDetails(Smi* smi) {
+ value_ = smi->value();
+ }
+diff --git a/v8/src/objects.h b/v8/src/objects.h
+index 747a4f0511..b9279640e2 100644
+--- a/v8/src/objects.h
++++ b/v8/src/objects.h
+@@ -3531,22 +3531,10 @@ class HashTable : public HashTableBase {
+ public:
+ typedef Shape ShapeT;
+
+- // Wrapper methods
+- inline uint32_t Hash(Key key) {
+- if (Shape::UsesSeed) {
+- return Shape::SeededHash(key, GetHeap()->HashSeed());
+- } else {
+- return Shape::Hash(key);
+- }
+- }
+-
+- inline uint32_t HashForObject(Key key, Object* object) {
+- if (Shape::UsesSeed) {
+- return Shape::SeededHashForObject(key, GetHeap()->HashSeed(), object);
+- } else {
+- return Shape::HashForObject(key, object);
+- }
+- }
++ // Wrapper methods. Defined in src/objects-inl.h
++ // to break a cycle with src/heap/heap.h.
++ inline uint32_t Hash(Key key);
++ inline uint32_t HashForObject(Key key, Object* object);
+
+ // Returns a new HashTable object.
+ MUST_USE_RESULT static Handle<Derived> New(
+--
+2.14.3
+
diff --git a/dev-util/electron/files/chromium-icu-59-r0.patch b/dev-util/electron/files/chromium-icu-59-r0.patch
new file mode 100644
index 000000000000..31dd6983592e
--- /dev/null
+++ b/dev-util/electron/files/chromium-icu-59-r0.patch
@@ -0,0 +1,582 @@
+From f041627ec383536d124002b81301c80b7a1757f7 Mon Sep 17 00:00:00 2001
+From: jshin <jshin@chromium.org>
+Date: Thu, 23 Mar 2017 02:57:16 -0700
+Subject: [PATCH] Prepare Chromium and Blink for ICU 59
+
+ICU 59 uses char16_t as UChar instead of {wchar_t, uint16_t}.
+As a result, char16_t is not compatible with char16 any more.
+When constructing string16 from UnicodeString/UChar buffer, we need to
+reinterpret_cast with a barrier (to avoid an anti-aliasing optimzation
+by some compilers).
+
+Add UnicodeStringToString16() to base/i18n that utilizes ICU 59-to-be's
+helper for the casting regardless of anti-aliasing optimization.
+
+And, refactor UnicodeString->string16->UTF8 string to UnicodeString->UTF8
+in a few places.
+
+For ICU C API "clients", UChar will be configured to be {wchar_t, uint16_t}
+so that there's little to be changed.
+
+This was tested with an ICU branch with char16_t as UChar.
+
+http://source.icu-project.org/repos/icu/branches/markus/ucharptr2/
+
+BUG=693640
+TEST=trybots are all green.
+
+Review-Url: https://codereview.chromium.org/2740673002
+Cr-Commit-Position: refs/heads/master@{#459034}
+---
+ ash/common/system/date/date_view.cc | 30 ++------------------
+ base/BUILD.gn | 1 +
+ base/i18n/message_formatter.cc | 5 ++--
+ base/i18n/number_formatting.cc | 5 ++--
+ base/i18n/string_compare.cc | 5 ++--
+ base/i18n/time_formatting.cc | 9 +++---
+ base/i18n/time_formatting_unittest.cc | 3 +-
+ base/i18n/timezone.cc | 4 +--
+ base/i18n/unicodestring.h | 32 ++++++++++++++++++++++
+ chrome/browser/chromeos/system/timezone_util.cc | 6 ++--
+ .../webui/md_downloads/downloads_list_tracker.cc | 4 +--
+ chromeos/settings/timezone_settings.cc | 4 +--
+ .../core/browser/autofill_profile_comparator.cc | 3 +-
+ components/autofill/core/browser/credit_card.cc | 7 +++--
+ .../browser/android/date_time_chooser_android.cc | 4 +--
+ content/renderer/android/email_detector.cc | 4 +--
+ ios/chrome/browser/notification_promo_unittest.cc | 10 ++-----
+ net/ftp/ftp_util.cc | 5 ++--
+ .../Source/core/html/forms/EmailInputType.cpp | 13 +++++++--
+ 19 files changed, 88 insertions(+), 66 deletions(-)
+ create mode 100644 base/i18n/unicodestring.h
+
+diff --git a/ash/common/system/date/date_view.cc b/ash/common/system/date/date_view.cc
+index 41aa1919a980..8d9c416fd392 100644
+--- a/ash/common/system/date/date_view.cc
++++ b/ash/common/system/date/date_view.cc
+@@ -57,43 +57,19 @@ bool UseMd() {
+ return MaterialDesignController::IsSystemTrayMenuMaterial();
+ }
+
+-base::string16 FormatDateWithPattern(const base::Time& time,
+- const char* pattern) {
+- UErrorCode status = U_ZERO_ERROR;
+- std::unique_ptr<icu::DateTimePatternGenerator> generator(
+- icu::DateTimePatternGenerator::createInstance(status));
+- DCHECK(U_SUCCESS(status));
+- icu::UnicodeString generated_pattern =
+- generator->getBestPattern(icu::UnicodeString(pattern), status);
+- DCHECK(U_SUCCESS(status));
+- icu::SimpleDateFormat simple_formatter(generated_pattern, status);
+- DCHECK(U_SUCCESS(status));
+- icu::UnicodeString date_string;
+- simple_formatter.format(static_cast<UDate>(time.ToDoubleT() * 1000),
+- date_string, status);
+- DCHECK(U_SUCCESS(status));
+- return base::string16(date_string.getBuffer(),
+- static_cast<size_t>(date_string.length()));
+-}
+-
+ base::string16 FormatDate(const base::Time& time) {
+ if (UseMd()) {
+ // Use 'short' month format (e.g., "Oct") followed by non-padded day of
+ // month (e.g., "2", "10").
+- return FormatDateWithPattern(time, "LLLd");
++ return base::TimeFormatWithPattern(time, "LLLd");
+ } else {
+- icu::UnicodeString date_string;
+- std::unique_ptr<icu::DateFormat> formatter(
+- icu::DateFormat::createDateInstance(icu::DateFormat::kMedium));
+- formatter->format(static_cast<UDate>(time.ToDoubleT() * 1000), date_string);
+- return base::string16(date_string.getBuffer(),
+- static_cast<size_t>(date_string.length()));
++ return base::TimeFormatShortDate(time);
+ }
+ }
+
+ base::string16 FormatDayOfWeek(const base::Time& time) {
+ // Use 'short' day of week format (e.g., "Wed").
+- return FormatDateWithPattern(time, "EEE");
++ return base::TimeFormatWithPattern(time, "EEE");
+ }
+
+ } // namespace
+diff --git a/base/BUILD.gn b/base/BUILD.gn
+index 3754be5f383f..29a60c1a265f 100644
+--- a/base/BUILD.gn
++++ b/base/BUILD.gn
+@@ -1564,6 +1564,7 @@ component("i18n") {
+ "i18n/time_formatting.h",
+ "i18n/timezone.cc",
+ "i18n/timezone.h",
++ "i18n/unicodestring.h",
+ "i18n/utf8_validator_tables.cc",
+ "i18n/utf8_validator_tables.h",
+ ]
+diff --git a/base/i18n/message_formatter.cc b/base/i18n/message_formatter.cc
+index 702e51b94aaa..6962a2829755 100644
+--- a/base/i18n/message_formatter.cc
++++ b/base/i18n/message_formatter.cc
+@@ -4,6 +4,7 @@
+
+ #include "base/i18n/message_formatter.h"
+
++#include "base/i18n/unicodestring.h"
+ #include "base/logging.h"
+ #include "base/numerics/safe_conversions.h"
+ #include "base/time/time.h"
+@@ -91,7 +92,7 @@ string16 MessageFormatter::FormatWithNumberedArgs(
+ << u_errorName(error);
+ return string16();
+ }
+- return string16(formatted.getBuffer(), formatted.length());
++ return i18n::UnicodeStringToString16(formatted);
+ }
+
+ string16 MessageFormatter::FormatWithNamedArgs(
+@@ -134,7 +135,7 @@ string16 MessageFormatter::FormatWithNamedArgs(
+ << u_errorName(error);
+ return string16();
+ }
+- return string16(formatted.getBuffer(), formatted.length());
++ return i18n::UnicodeStringToString16(formatted);
+ }
+
+ } // namespace i18n
+diff --git a/base/i18n/number_formatting.cc b/base/i18n/number_formatting.cc
+index b51083348460..5a0503f77de1 100644
+--- a/base/i18n/number_formatting.cc
++++ b/base/i18n/number_formatting.cc
+@@ -10,6 +10,7 @@
+
+ #include "base/format_macros.h"
+ #include "base/i18n/message_formatter.h"
++#include "base/i18n/unicodestring.h"
+ #include "base/lazy_instance.h"
+ #include "base/logging.h"
+ #include "base/strings/string_util.h"
+@@ -60,7 +61,7 @@ string16 FormatNumber(int64_t number) {
+ icu::UnicodeString ustr;
+ number_format->format(number, ustr);
+
+- return string16(ustr.getBuffer(), static_cast<size_t>(ustr.length()));
++ return i18n::UnicodeStringToString16(ustr);
+ }
+
+ string16 FormatDouble(double number, int fractional_digits) {
+@@ -76,7 +77,7 @@ string16 FormatDouble(double number, int fractional_digits) {
+ icu::UnicodeString ustr;
+ number_format->format(number, ustr);
+
+- return string16(ustr.getBuffer(), static_cast<size_t>(ustr.length()));
++ return i18n::UnicodeStringToString16(ustr);
+ }
+
+ string16 FormatPercent(int number) {
+diff --git a/base/i18n/string_compare.cc b/base/i18n/string_compare.cc
+index 2851e7d2dce1..649c28119fe3 100644
+--- a/base/i18n/string_compare.cc
++++ b/base/i18n/string_compare.cc
+@@ -6,6 +6,7 @@
+
+ #include "base/logging.h"
+ #include "base/strings/utf_string_conversions.h"
++#include "third_party/icu/source/common/unicode/unistr.h"
+
+ namespace base {
+ namespace i18n {
+@@ -17,8 +18,8 @@ UCollationResult CompareString16WithCollator(const icu::Collator& collator,
+ const string16& rhs) {
+ UErrorCode error = U_ZERO_ERROR;
+ UCollationResult result = collator.compare(
+- static_cast<const UChar*>(lhs.c_str()), static_cast<int>(lhs.length()),
+- static_cast<const UChar*>(rhs.c_str()), static_cast<int>(rhs.length()),
++ icu::UnicodeString(FALSE, lhs.c_str(), static_cast<int>(lhs.length())),
++ icu::UnicodeString(FALSE, rhs.c_str(), static_cast<int>(rhs.length())),
+ error);
+ DCHECK(U_SUCCESS(error));
+ return result;
+diff --git a/base/i18n/time_formatting.cc b/base/i18n/time_formatting.cc
+index 024b86510b5a..ae1c59eb411a 100644
+--- a/base/i18n/time_formatting.cc
++++ b/base/i18n/time_formatting.cc
+@@ -8,6 +8,7 @@
+
+ #include <memory>
+
++#include "base/i18n/unicodestring.h"
+ #include "base/logging.h"
+ #include "base/strings/utf_string_conversions.h"
+ #include "base/time/time.h"
+@@ -26,8 +27,7 @@ string16 TimeFormat(const icu::DateFormat* formatter,
+ icu::UnicodeString date_string;
+
+ formatter->format(static_cast<UDate>(time.ToDoubleT() * 1000), date_string);
+- return string16(date_string.getBuffer(),
+- static_cast<size_t>(date_string.length()));
++ return i18n::UnicodeStringToString16(date_string);
+ }
+
+ string16 TimeFormatWithoutAmPm(const icu::DateFormat* formatter,
+@@ -46,8 +46,7 @@ string16 TimeFormatWithoutAmPm(const icu::DateFormat* formatter,
+ begin--;
+ time_string.removeBetween(begin, ampm_field.getEndIndex());
+ }
+- return string16(time_string.getBuffer(),
+- static_cast<size_t>(time_string.length()));
++ return i18n::UnicodeStringToString16(time_string);
+ }
+
+ icu::SimpleDateFormat CreateSimpleDateFormatter(const char* pattern) {
+@@ -168,7 +167,7 @@ string16 TimeDurationFormat(const TimeDelta& time,
+ icu::UnicodeString formatted;
+ icu::FieldPosition ignore(icu::FieldPosition::DONT_CARE);
+ measure_format.formatMeasures(measures, 2, formatted, ignore, status);
+- return base::string16(formatted.getBuffer(), formatted.length());
++ return i18n::UnicodeStringToString16(formatted);
+ }
+
+ HourClockType GetHourClockType() {
+diff --git a/base/i18n/time_formatting_unittest.cc b/base/i18n/time_formatting_unittest.cc
+index 51a48513aca6..eca8ea2cdaea 100644
+--- a/base/i18n/time_formatting_unittest.cc
++++ b/base/i18n/time_formatting_unittest.cc
+@@ -7,6 +7,7 @@
+ #include <memory>
+
+ #include "base/i18n/rtl.h"
++#include "base/i18n/unicodestring.h"
+ #include "base/strings/utf_string_conversions.h"
+ #include "base/test/icu_test_util.h"
+ #include "base/time/time.h"
+@@ -37,7 +38,7 @@ base::string16 GetShortTimeZone(const Time& time) {
+ zone_formatter->format(UTZFMT_STYLE_SPECIFIC_SHORT, *zone,
+ static_cast<UDate>(time.ToDoubleT() * 1000),
+ name, nullptr);
+- return base::string16(name.getBuffer(), name.length());
++ return i18n::UnicodeStringToString16(name);
+ }
+
+ #if defined(OS_ANDROID)
+diff --git a/base/i18n/timezone.cc b/base/i18n/timezone.cc
+index e881c9d680f8..95e7aee34c4c 100644
+--- a/base/i18n/timezone.cc
++++ b/base/i18n/timezone.cc
+@@ -610,9 +610,9 @@ std::string CountryCodeForCurrentTimezone() {
+ std::unique_ptr<icu::TimeZone> zone(icu::TimeZone::createDefault());
+ icu::UnicodeString id;
+ zone->getID(id);
+- string16 olson_code(id.getBuffer(), id.length());
++ std::string olson_code;
+ return TimezoneMap::GetInstance()->CountryCodeForTimezone(
+- UTF16ToUTF8(olson_code));
++ id.toUTF8String(olson_code));
+ }
+
+ } // namespace base
+diff --git a/base/i18n/unicodestring.h b/base/i18n/unicodestring.h
+new file mode 100644
+index 000000000000..b62c5264deb4
+--- /dev/null
++++ b/base/i18n/unicodestring.h
+@@ -0,0 +1,32 @@
++// Copyright (c) 2017 The Chromium Authors. All rights reserved.
++// Use of this source code is governed by a BSD-style license that can be
++// found in the LICENSE file.
++
++#ifndef BASE_I18N_UNICODESTRING_H_
++#define BASE_I18N_UNICODESTRING_H_
++
++#include "base/strings/string16.h"
++#include "third_party/icu/source/common/unicode/unistr.h"
++#include "third_party/icu/source/common/unicode/uvernum.h"
++
++#if U_ICU_VERSION_MAJOR_NUM >= 59
++#include "third_party/icu/source/common/unicode/char16ptr.h"
++#endif
++
++namespace base {
++namespace i18n {
++
++inline string16 UnicodeStringToString16(const icu::UnicodeString& unistr) {
++#if U_ICU_VERSION_MAJOR_NUM >= 59
++ return base::string16(icu::toUCharPtr(unistr.getBuffer()),
++ static_cast<size_t>(unistr.length()));
++#else
++ return base::string16(unistr.getBuffer(),
++ static_cast<size_t>(unistr.length()));
++#endif
++}
++
++} // namespace i18n
++} // namespace base
++
++#endif // BASE_UNICODESTRING_H_
+diff --git a/chrome/browser/chromeos/system/timezone_util.cc b/chrome/browser/chromeos/system/timezone_util.cc
+index 6c41a052197a..d01f60e03b9f 100644
+--- a/chrome/browser/chromeos/system/timezone_util.cc
++++ b/chrome/browser/chromeos/system/timezone_util.cc
+@@ -11,6 +11,7 @@
+ #include <utility>
+
+ #include "base/i18n/rtl.h"
++#include "base/i18n/unicodestring.h"
+ #include "base/lazy_instance.h"
+ #include "base/memory/ptr_util.h"
+ #include "base/strings/string_util.h"
+@@ -77,7 +78,7 @@ base::string16 GetExemplarCity(const icu::TimeZone& zone) {
+ if (!U_FAILURE(status)) {
+ city = icu::ures_getUnicodeStringByKey(zone_item.get(), "ec", &status);
+ if (U_SUCCESS(status))
+- return base::string16(city.getBuffer(), city.length());
++ return base::i18n::UnicodeStringToString16(city);
+ }
+
+ // Fallback case in case of failure.
+@@ -135,8 +136,7 @@ base::string16 GetTimezoneName(const icu::TimeZone& timezone) {
+ }
+ base::string16 result(l10n_util::GetStringFUTF16(
+ IDS_OPTIONS_SETTINGS_TIMEZONE_DISPLAY_TEMPLATE,
+- base::ASCIIToUTF16(offset_str),
+- base::string16(name.getBuffer(), name.length()),
++ base::ASCIIToUTF16(offset_str), base::i18n::UnicodeStringToString16(name),
+ GetExemplarCity(timezone)));
+ base::i18n::AdjustStringForLocaleDirection(&result);
+ return result;
+diff --git a/chrome/browser/ui/webui/md_downloads/downloads_list_tracker.cc b/chrome/browser/ui/webui/md_downloads/downloads_list_tracker.cc
+index caf07f69197c..38ed53586d6a 100644
+--- a/chrome/browser/ui/webui/md_downloads/downloads_list_tracker.cc
++++ b/chrome/browser/ui/webui/md_downloads/downloads_list_tracker.cc
+@@ -9,6 +9,7 @@
+ #include "base/bind.h"
+ #include "base/bind_helpers.h"
+ #include "base/i18n/rtl.h"
++#include "base/i18n/unicodestring.h"
+ #include "base/strings/string16.h"
+ #include "base/strings/string_number_conversions.h"
+ #include "base/time/time.h"
+@@ -74,8 +75,7 @@ base::string16 TimeFormatLongDate(const base::Time& time) {
+ icu::DateFormat::createDateInstance(icu::DateFormat::kLong));
+ icu::UnicodeString date_string;
+ formatter->format(static_cast<UDate>(time.ToDoubleT() * 1000), date_string);
+- return base::string16(date_string.getBuffer(),
+- static_cast<size_t>(date_string.length()));
++ return base::i18n::UnicodeStringToString16(date_string);
+ }
+
+ } // namespace
+diff --git a/chromeos/settings/timezone_settings.cc b/chromeos/settings/timezone_settings.cc
+index 38ea65d653ac..63aa4c02f260 100644
+--- a/chromeos/settings/timezone_settings.cc
++++ b/chromeos/settings/timezone_settings.cc
+@@ -12,6 +12,7 @@
+ #include "base/bind.h"
+ #include "base/files/file_path.h"
+ #include "base/files/file_util.h"
++#include "base/i18n/unicodestring.h"
+ #include "base/location.h"
+ #include "base/logging.h"
+ #include "base/macros.h"
+@@ -478,8 +479,7 @@ TimezoneSettings* TimezoneSettings::GetInstance() {
+ // static
+ base::string16 TimezoneSettings::GetTimezoneID(const icu::TimeZone& timezone) {
+ icu::UnicodeString id;
+- timezone.getID(id);
+- return base::string16(id.getBuffer(), id.length());
++ return base::i18n::UnicodeStringToString16(timezone.getID(id));
+ }
+
+ } // namespace system
+diff --git a/components/autofill/core/browser/autofill_profile_comparator.cc b/components/autofill/core/browser/autofill_profile_comparator.cc
+index edfe2450d679..227a5901c683 100644
+--- a/components/autofill/core/browser/autofill_profile_comparator.cc
++++ b/components/autofill/core/browser/autofill_profile_comparator.cc
+@@ -9,6 +9,7 @@
+
+ #include "base/i18n/case_conversion.h"
+ #include "base/i18n/char_iterator.h"
++#include "base/i18n/unicodestring.h"
+ #include "base/strings/string_piece.h"
+ #include "base/strings/string_split.h"
+ #include "base/strings/string_util.h"
+@@ -128,7 +129,7 @@ base::string16 AutofillProfileComparator::NormalizeForComparison(
+
+ icu::UnicodeString value = icu::UnicodeString(result.data(), result.length());
+ transliterator_->transliterate(value);
+- return base::string16(value.getBuffer(), value.length());
++ return base::i18n::UnicodeStringToString16(value);
+ }
+
+ bool AutofillProfileComparator::AreMergeable(const AutofillProfile& p1,
+diff --git a/components/autofill/core/browser/credit_card.cc b/components/autofill/core/browser/credit_card.cc
+index 75a34c75a260..76867e0391c2 100644
+--- a/components/autofill/core/browser/credit_card.cc
++++ b/components/autofill/core/browser/credit_card.cc
+@@ -12,6 +12,8 @@
+ #include <string>
+
+ #include "base/guid.h"
++#include "base/i18n/time_formatting.h"
++#include "base/i18n/unicodestring.h"
+ #include "base/logging.h"
+ #include "base/macros.h"
+ #include "base/metrics/histogram_macros.h"
+@@ -806,7 +808,8 @@ bool CreditCard::ConvertMonth(const base::string16& month,
+ int32_t num_months;
+ const icu::UnicodeString* months = date_format_symbols.getMonths(num_months);
+ for (int32_t i = 0; i < num_months; ++i) {
+- const base::string16 icu_month(months[i].getBuffer(), months[i].length());
++ const base::string16 icu_month(
++ base::i18n::UnicodeStringToString16(months[i]));
+ if (compare.StringsEqual(icu_month, month)) {
+ *num = i + 1; // Adjust from 0-indexed to 1-indexed.
+ return true;
+@@ -819,7 +822,7 @@ bool CreditCard::ConvertMonth(const base::string16& month,
+ base::string16 trimmed_month;
+ base::TrimString(month, ASCIIToUTF16("."), &trimmed_month);
+ for (int32_t i = 0; i < num_months; ++i) {
+- base::string16 icu_month(months[i].getBuffer(), months[i].length());
++ base::string16 icu_month(base::i18n::UnicodeStringToString16(months[i]));
+ base::TrimString(icu_month, ASCIIToUTF16("."), &icu_month);
+ if (compare.StringsEqual(icu_month, trimmed_month)) {
+ *num = i + 1; // Adjust from 0-indexed to 1-indexed.
+diff --git a/content/browser/android/date_time_chooser_android.cc b/content/browser/android/date_time_chooser_android.cc
+index ba20ad53bd5c..28b6d03344f0 100644
+--- a/content/browser/android/date_time_chooser_android.cc
++++ b/content/browser/android/date_time_chooser_android.cc
+@@ -9,6 +9,7 @@
+ #include "base/android/jni_android.h"
+ #include "base/android/jni_string.h"
+ #include "base/i18n/char_iterator.h"
++#include "base/i18n/unicodestring.h"
+ #include "content/common/date_time_suggestion.h"
+ #include "content/common/view_messages.h"
+ #include "content/public/browser/render_view_host.h"
+@@ -36,8 +37,7 @@ base::string16 SanitizeSuggestionString(const base::string16& string) {
+ sanitized.append(c);
+ sanitized_iterator.Advance();
+ }
+- return base::string16(sanitized.getBuffer(),
+- static_cast<size_t>(sanitized.length()));
++ return base::i18n::UnicodeStringToString16(sanitized);
+ }
+
+ } // namespace
+diff --git a/content/renderer/android/email_detector.cc b/content/renderer/android/email_detector.cc
+index 564f3417305f..1a0db8b07a85 100644
+--- a/content/renderer/android/email_detector.cc
++++ b/content/renderer/android/email_detector.cc
+@@ -62,8 +62,8 @@ bool EmailDetector::FindContent(const base::string16::const_iterator& begin,
+ DCHECK(U_SUCCESS(status));
+ icu::UnicodeString content_ustr(matcher->group(status));
+ DCHECK(U_SUCCESS(status));
+- base::UTF16ToUTF8(content_ustr.getBuffer(), content_ustr.length(),
+- content_text);
++ content_text->clear();
++ content_ustr.toUTF8String(*content_text);
+ return true;
+ }
+
+diff --git a/ios/chrome/browser/notification_promo_unittest.cc b/ios/chrome/browser/notification_promo_unittest.cc
+index 830d9c5f65a0..d5356e8e6dcb 100644
+--- a/ios/chrome/browser/notification_promo_unittest.cc
++++ b/ios/chrome/browser/notification_promo_unittest.cc
+@@ -34,18 +34,14 @@ bool YearFromNow(double* date_epoch, std::string* date_string) {
+ UErrorCode status = U_ZERO_ERROR;
+ icu::SimpleDateFormat simple_formatter(icu::UnicodeString(kDateFormat),
+ icu::Locale("en_US"), status);
+- if (!U_SUCCESS(status))
+- return false;
+-
+ icu::UnicodeString date_unicode_string;
+ simple_formatter.format(static_cast<UDate>(*date_epoch * 1000),
+ date_unicode_string, status);
+- if (!U_SUCCESS(status))
++ if (U_FAILURE(status))
+ return false;
+
+- return base::UTF16ToUTF8(date_unicode_string.getBuffer(),
+- static_cast<size_t>(date_unicode_string.length()),
+- date_string);
++ date_unicode_string.toUTF8String(*date_string);
++ return true;
+ }
+
+ } // namespace
+diff --git a/net/ftp/ftp_util.cc b/net/ftp/ftp_util.cc
+index 00b23b7c10b7..e9331ab3818b 100644
+--- a/net/ftp/ftp_util.cc
++++ b/net/ftp/ftp_util.cc
+@@ -9,6 +9,7 @@
+
+ #include "base/i18n/case_conversion.h"
+ #include "base/i18n/char_iterator.h"
++#include "base/i18n/unicodestring.h"
+ #include "base/logging.h"
+ #include "base/macros.h"
+ #include "base/memory/singleton.h"
+@@ -175,8 +176,8 @@ class AbbreviatedMonthsMap {
+ format_symbols.getShortMonths(months_count);
+
+ for (int32_t month = 0; month < months_count; month++) {
+- base::string16 month_name(months[month].getBuffer(),
+- static_cast<size_t>(months[month].length()));
++ base::string16 month_name(
++ base::i18n::UnicodeStringToString16(months[month]));
+
+ // Ignore the case of the month names. The simplest way to handle that
+ // is to make everything lowercase.
+diff --git a/third_party/WebKit/Source/core/html/forms/EmailInputType.cpp b/third_party/WebKit/Source/core/html/forms/EmailInputType.cpp
+index 07d10a31ffde..4dab06aa19a5 100644
+--- a/third_party/WebKit/Source/core/html/forms/EmailInputType.cpp
++++ b/third_party/WebKit/Source/core/html/forms/EmailInputType.cpp
+@@ -23,6 +23,9 @@
+
+ #include "core/html/forms/EmailInputType.h"
+
++#include <unicode/idna.h>
++#include <unicode/unistr.h>
++#include <unicode/uvernum.h>
+ #include "bindings/core/v8/ScriptRegexp.h"
+ #include "core/InputTypeNames.h"
+ #include "core/html/HTMLInputElement.h"
+@@ -31,8 +34,10 @@
+ #include "platform/text/PlatformLocale.h"
+ #include "public/platform/Platform.h"
+ #include "wtf/text/StringBuilder.h"
+-#include <unicode/idna.h>
+-#include <unicode/unistr.h>
++
++#if U_ICU_VERSION_MAJOR_NUM >= 59
++#include <unicode/char16ptr.h>
++#endif
+
+ namespace blink {
+
+@@ -87,7 +92,11 @@ String EmailInputType::convertEmailAddressToASCII(const ScriptRegexp& regexp,
+
+ StringBuilder builder;
+ builder.append(address, 0, atPosition + 1);
++#if U_ICU_VERSION_MAJOR_NUM >= 59
++ builder.append(icu::toUCharPtr(domainName.getBuffer()), domainName.length());
++#else
+ builder.append(domainName.getBuffer(), domainName.length());
++#endif
+ String asciiEmail = builder.toString();
+ return isValidEmailAddress(regexp, asciiEmail) ? asciiEmail : address;
+ }
+diff --git a/third_party/sfntly/src/cpp/src/sample/chromium/subsetter_impl.cc b/third_party/sfntly/src/cpp/src/sample/chromium/subsetter_impl.cc
+index c53e607..17452e1 100644
+--- a/third_party/sfntly/src/cpp/src/sample/chromium/subsetter_impl.cc
++++ b/third_party/sfntly/src/cpp/src/sample/chromium/subsetter_impl.cc
+@@ -23,6 +23,8 @@
+ #include <map>
+ #include <set>
+
++#include <unicode/unistr.h>
++
+ #include "sfntly/table/bitmap/eblc_table.h"
+ #include "sfntly/table/bitmap/ebdt_table.h"
+ #include "sfntly/table/bitmap/index_sub_table.h"
+--
+2.14.3
diff --git a/dev-util/electron/files/chromium-icu-60-r0.patch b/dev-util/electron/files/chromium-icu-60-r0.patch
new file mode 100644
index 000000000000..f6f98497ba09
--- /dev/null
+++ b/dev-util/electron/files/chromium-icu-60-r0.patch
@@ -0,0 +1,66 @@
+From 020c458932087a7da9b514563c3926be5a406d55 Mon Sep 17 00:00:00 2001
+From: Jungshik Shin <jshin@chromium.org>
+Date: Mon, 4 Dec 2017 09:42:01 -0500
+Subject: [PATCH] Disallow 5 aspirational scripts in IDN display
+
+UTS 31 (http://www.unicode.org/reports/tr31/#Aspirational_Use_Scripts )
+used to list 5 scripts in Table 6 as 'aspirational scripts', but it
+deprecated the category and moved 5 scripts to Table 7 for limited use
+scripts.
+
+Given this, there's no basis to treat those 5 scripts differently from
+other limited use scripts. Note that Mozilla stopped allowding those 5
+scripts in IDN display a while ago.
+
+This is also necessary for updating ICU to version 60.
+---
+ components/url_formatter/url_formatter.cc | 33 -------------------------------
+ 1 file changed, 33 deletions(-)
+
+diff --git a/components/url_formatter/url_formatter.cc b/components/url_formatter/url_formatter.cc
+index a93bf1154c..6b000c3480 100644
+--- a/components/url_formatter/url_formatter.cc
++++ b/components/url_formatter/url_formatter.cc
+@@ -426,39 +426,6 @@ void IDNSpoofChecker::SetAllowedUnicodeSet(UErrorCode* status) {
+ const icu::UnicodeSet* inclusion_set = uspoof_getInclusionUnicodeSet(status);
+ allowed_set.addAll(*inclusion_set);
+
+- // Five aspirational scripts are taken from UTR 31 Table 6 at
+- // http://www.unicode.org/reports/tr31/#Aspirational_Use_Scripts .
+- // Not all the characters of aspirational scripts are suitable for
+- // identifiers. Therefore, only characters belonging to
+- // [:Identifier_Type=Aspirational:] (listed in 'Status/Type=Aspirational'
+- // section at
+- // http://www.unicode.org/Public/security/latest/xidmodifications.txt) are
+- // are added to the allowed set. The list has to be updated when a new
+- // version of Unicode is released. The current version is 9.0.0 and ICU 60
+- // will have Unicode 10.0 data.
+-#if U_ICU_VERSION_MAJOR_NUM < 60
+- const icu::UnicodeSet aspirational_scripts(
+- icu::UnicodeString(
+- // Unified Canadian Syllabics
+- "[\\u1401-\\u166C\\u166F-\\u167F"
+- // Mongolian
+- "\\u1810-\\u1819\\u1820-\\u1877\\u1880-\\u18AA"
+- // Unified Canadian Syllabics
+- "\\u18B0-\\u18F5"
+- // Tifinagh
+- "\\u2D30-\\u2D67\\u2D7F"
+- // Yi
+- "\\uA000-\\uA48C"
+- // Miao
+- "\\U00016F00-\\U00016F44\\U00016F50-\\U00016F7E"
+- "\\U00016F8F-\\U00016F9F]",
+- -1, US_INV),
+- *status);
+- allowed_set.addAll(aspirational_scripts);
+-#else
+-#error "Update aspirational_scripts per Unicode 10.0"
+-#endif
+-
+ // U+0338 is included in the recommended set, while U+05F4 and U+2027 are in
+ // the inclusion set. However, they are blacklisted as a part of Mozilla's
+ // IDN blacklist (http://kb.mozillazine.org/Network.IDN.blacklist_chars).
+--
+2.14.3
+
diff --git a/dev-util/electron/files/chromium-python3-compat-r0.patch b/dev-util/electron/files/chromium-python3-compat-r0.patch
new file mode 100644
index 000000000000..d91ea8a4c1b1
--- /dev/null
+++ b/dev-util/electron/files/chromium-python3-compat-r0.patch
@@ -0,0 +1,34 @@
+diff --git a/v8/gypfiles/detect_v8_host_arch.py b/v8/gypfiles/detect_v8_host_arch.py
+index 89e8286..cc61946 100644
+--- a/v8/gypfiles/detect_v8_host_arch.py
++++ b/v8/gypfiles/detect_v8_host_arch.py
+@@ -28,13 +28,15 @@
+
+ """Outputs host CPU architecture in format recognized by gyp."""
+
++from __future__ import print_function
++
+ import platform
+ import re
+ import sys
+
+
+ def main():
+- print DoMain([])
++ print(DoMain([]))
+ return 0
+
+ def DoMain(_):
+diff --git a/v8/gypfiles/toolchain.gypi b/v8/gypfiles/toolchain.gypi
+index 95eb1d9..1ec652a 100644
+--- a/v8/gypfiles/toolchain.gypi
++++ b/v8/gypfiles/toolchain.gypi
+@@ -40,7 +40,7 @@
+ 'has_valgrind%': 0,
+ 'coverage%': 0,
+ 'v8_target_arch%': '<(target_arch)',
+- 'v8_host_byteorder%': '<!(python -c "import sys; print sys.byteorder")',
++ 'v8_host_byteorder%': '<!(python -c "from __future__ import print_function; import sys; print(sys.byteorder)")',
+ 'force_dynamic_crt%': 0,
+
+ # Setting 'v8_can_use_vfp32dregs' to 'true' will cause V8 to use the VFP
diff --git a/dev-util/electron/files/chromium-shared-v8-r2.patch b/dev-util/electron/files/chromium-shared-v8-r2.patch
index 475da8193a92..82d87d48d9fc 100644
--- a/dev-util/electron/files/chromium-shared-v8-r2.patch
+++ b/dev-util/electron/files/chromium-shared-v8-r2.patch
@@ -1,79 +1,19 @@
-diff --git a/v8/BUILD.gn.orig b/v8/BUILD.gn
-index 8587356..4365e03 100644
---- a/v8/BUILD.gn
-+++ b/v8/BUILD.gn
-@@ -113,7 +113,7 @@ config("internal_config") {
-
- include_dirs = [ "." ]
-
-- if (is_component_build) {
-+ if (is_component_build || is_electron_build) {
- defines = [ "BUILDING_V8_SHARED" ]
- }
- }
-@@ -127,14 +127,14 @@ config("internal_config_base") {
- # This config should be applied to code using the libplatform.
- config("libplatform_config") {
- include_dirs = [ "include" ]
-- if (is_component_build) {
-+ if (is_component_build || is_electron_build) {
- defines = [ "USING_V8_PLATFORM_SHARED" ]
- }
+diff --git a/v8/gni/v8.gni.orig b/v8/gni/v8.gni
+index 264c1de..df17239 100644
+--- a/v8/gni/v8.gni.orig
++++ b/v8/gni/v8.gni
+@@ -114,13 +114,7 @@ template("v8_executable") {
}
- # This config should be applied to code using the libbase.
- config("libbase_config") {
-- if (is_component_build) {
-+ if (is_component_build || is_electron_build) {
- defines = [ "USING_V8_BASE_SHARED" ]
- }
- libs = []
-@@ -151,7 +151,7 @@ config("libsampler_config") {
- # This config should only be applied to code using V8 and not any V8 code
- # itself.
- config("external_config") {
-- if (is_component_build) {
-+ if (is_component_build || is_electron_build) {
- defines = [ "USING_V8_SHARED" ]
- }
- include_dirs = [ "include" ]
-@@ -2265,7 +2265,7 @@ v8_component("v8_libbase") {
-
- defines = []
-
-- if (is_component_build) {
-+ if (is_component_build || is_electron_build) {
- defines = [ "BUILDING_V8_BASE_SHARED" ]
- }
-
-@@ -2355,7 +2355,7 @@ v8_component("v8_libplatform") {
-
- configs = [ ":internal_config_base" ]
-
-- if (is_component_build) {
-+ if (is_component_build || is_electron_build) {
- defines = [ "BUILDING_V8_PLATFORM_SHARED" ]
- }
-
-@@ -2498,7 +2498,7 @@ group("gn_all") {
- }
- }
-
--if (is_component_build) {
-+if (is_component_build || is_electron_build) {
- v8_component("v8") {
- sources = [
- "src/v8dll-main.cc",
-diff --git a/v8/src/inspector/BUILD.gn b/v8/src/inspector/BUILD.gn
-index 6ebb91c..b6a2489 100644
---- a/v8/src/inspector/BUILD.gn
-+++ b/v8/src/inspector/BUILD.gn
-@@ -106,7 +106,7 @@ config("inspector_config") {
- "/wd4996", # Deprecated function call.
- ]
- }
-- if (is_component_build) {
-+ if (is_component_build || is_electron_build) {
- defines = [ "BUILDING_V8_SHARED" ]
- }
- }
+ template("v8_component") {
+- if (is_electron_build && !is_component_build &&
+- (target_name == "v8_libbase" || target_name == "v8_libplatform")) {
+- v8_component = "source_set"
+- } else {
+- v8_component = component_electron
+- }
+- target(v8_component, target_name) {
++ component(target_name) {
+ forward_variables_from(invoker, "*", [ "configs" ])
+ configs += invoker.configs
+ configs -= v8_remove_configs
diff --git a/dev-util/electron/files/chromium-system-icu-r0.patch b/dev-util/electron/files/chromium-system-icu-r0.patch
new file mode 100644
index 000000000000..484a1974e812
--- /dev/null
+++ b/dev-util/electron/files/chromium-system-icu-r0.patch
@@ -0,0 +1,140 @@
+From 520c62f2b87a42bf4f8f8820f6bcde15e342fe4a Mon Sep 17 00:00:00 2001
+From: floppymaster <floppymaster@gmail.com>
+Date: Mon, 12 Jun 2017 09:44:54 -0700
+Subject: [PATCH] ICU unbundling fixes
+
+Update instructions to generate ICU header lists
+Update header list for unbundling ICU 59
+
+Bug: https://bugs.gentoo.org/619796#c2
+Review-Url: https://codereview.chromium.org/2935603002
+Cr-Commit-Position: refs/heads/master@{#478662}
+---
+ build/linux/unbundle/icu.gn | 29 +++++++++++++++++------------
+ 1 file changed, 17 insertions(+), 12 deletions(-)
+
+diff --git a/build/linux/unbundle/icu.gn b/build/linux/unbundle/icu.gn
+index f3734b7a01a3..5bdd91555df7 100644
+--- a/build/linux/unbundle/icu.gn
++++ b/build/linux/unbundle/icu.gn
+@@ -16,6 +16,7 @@ config("icu_config") {
+ defines = [
+ "USING_SYSTEM_ICU=1",
+ "ICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_STATIC",
++ "UCHAR_TYPE=uint16_t",
+ ]
+ }
+
+@@ -50,10 +51,9 @@ source_set("icuuc") {
+ shim_headers("icui18n_shim") {
+ root_path = "source/i18n"
+ headers = [
+- # This list can easily be updated using the command below:
+- # find third_party/icu/source/i18n/unicode \
+- # -iname '*.h' -printf '"%p",\n' | \
+- # sed -e 's|third_party/icu/i18n/common/||' | sort -u
++ # This list can easily be updated using the commands below:
++ # cd third_party/icu/source/i18n
++ # find unicode -iname '*.h' -printf ' "%p",\n' | LC_ALL=C sort -u
+ "unicode/alphaindex.h",
+ "unicode/basictz.h",
+ "unicode/calendar.h",
+@@ -78,7 +78,6 @@ shim_headers("icui18n_shim") {
+ "unicode/fpositer.h",
+ "unicode/gender.h",
+ "unicode/gregocal.h",
+- "unicode/locdspnm.h",
+ "unicode/measfmt.h",
+ "unicode/measunit.h",
+ "unicode/measure.h",
+@@ -113,15 +112,12 @@ shim_headers("icui18n_shim") {
+ "unicode/ucol.h",
+ "unicode/ucoleitr.h",
+ "unicode/ucsdet.h",
+- "unicode/ucurr.h",
+ "unicode/udat.h",
+ "unicode/udateintervalformat.h",
+ "unicode/udatpg.h",
+- "unicode/udisplaycontext.h",
+ "unicode/ufieldpositer.h",
+ "unicode/uformattable.h",
+ "unicode/ugender.h",
+- "unicode/uldnames.h",
+ "unicode/ulocdata.h",
+ "unicode/umsg.h",
+ "unicode/unirepl.h",
+@@ -130,6 +126,7 @@ shim_headers("icui18n_shim") {
+ "unicode/upluralrules.h",
+ "unicode/uregex.h",
+ "unicode/uregion.h",
++ "unicode/ureldatefmt.h",
+ "unicode/usearch.h",
+ "unicode/uspoof.h",
+ "unicode/utmscale.h",
+@@ -141,20 +138,22 @@ shim_headers("icui18n_shim") {
+ shim_headers("icuuc_shim") {
+ root_path = "source/common"
+ headers = [
+- # This list can easily be updated using the command below:
+- # find third_party/icu/source/common/unicode \
+- # -iname '*.h' -printf '"%p",\n' | \
+- # sed -e 's|third_party/icu/source/common/||' | sort -u
++ # This list can easily be updated using the commands below:
++ # cd third_party/icu/source/common
++ # find unicode -iname '*.h' -printf ' "%p",\n' | LC_ALL=C sort -u
+ "unicode/appendable.h",
+ "unicode/brkiter.h",
+ "unicode/bytestream.h",
+ "unicode/bytestrie.h",
+ "unicode/bytestriebuilder.h",
+ "unicode/caniter.h",
++ "unicode/casemap.h",
++ "unicode/char16ptr.h",
+ "unicode/chariter.h",
+ "unicode/dbbi.h",
+ "unicode/docmain.h",
+ "unicode/dtintrv.h",
++ "unicode/edits.h",
+ "unicode/enumset.h",
+ "unicode/errorcode.h",
+ "unicode/filteredbrk.h",
+@@ -163,6 +162,7 @@ shim_headers("icuuc_shim") {
+ "unicode/idna.h",
+ "unicode/listformatter.h",
+ "unicode/localpointer.h",
++ "unicode/locdspnm.h",
+ "unicode/locid.h",
+ "unicode/messagepattern.h",
+ "unicode/normalizer2.h",
+@@ -176,12 +176,14 @@ shim_headers("icuuc_shim") {
+ "unicode/rep.h",
+ "unicode/resbund.h",
+ "unicode/schriter.h",
++ "unicode/simpleformatter.h",
+ "unicode/std_string.h",
+ "unicode/strenum.h",
+ "unicode/stringpiece.h",
+ "unicode/stringtriebuilder.h",
+ "unicode/symtable.h",
+ "unicode/ubidi.h",
++ "unicode/ubiditransform.h",
+ "unicode/ubrk.h",
+ "unicode/ucasemap.h",
+ "unicode/ucat.h",
+@@ -195,10 +197,13 @@ shim_headers("icuuc_shim") {
+ "unicode/ucnv_err.h",
+ "unicode/ucnvsel.h",
+ "unicode/uconfig.h",
++ "unicode/ucurr.h",
+ "unicode/udata.h",
++ "unicode/udisplaycontext.h",
+ "unicode/uenum.h",
+ "unicode/uidna.h",
+ "unicode/uiter.h",
++ "unicode/uldnames.h",
+ "unicode/ulistformatter.h",
+ "unicode/uloc.h",
+ "unicode/umachine.h",
+--
+2.14.3
+
diff --git a/dev-util/electron/files/chromium-v8-icu-59-r0.patch b/dev-util/electron/files/chromium-v8-icu-59-r0.patch
new file mode 100644
index 000000000000..d963db9db93b
--- /dev/null
+++ b/dev-util/electron/files/chromium-v8-icu-59-r0.patch
@@ -0,0 +1,83 @@
+From fd5b3e755df541b44128caed625215017ef59989 Mon Sep 17 00:00:00 2001
+From: jshin <jshin@chromium.org>
+Date: Thu, 9 Mar 2017 12:01:15 -0800
+Subject: [PATCH] Prepare for ICU's switch to char16_t
+
+ICU's UChar was uint16_t (non-Win) or wchar_t (Windows). It's switching
+to char16_t in both C/C++ API. It needs some changes. Fortunately,
+v8 needs only a couple of changes because v8 has been using
+reinterpret_cast in many places calling ICU API.
+
+This change was confirmed to work fine with ICU-59-to-be.
+
+BUG=v8:6062
+TEST=trybot
+
+Review-Url: https://codereview.chromium.org/2738503008
+Cr-Commit-Position: refs/heads/master@{#43707}
+---
+ src/i18n.cc | 12 +++++++++++-
+ src/runtime/runtime-i18n.cc | 10 ++++++----
+ 2 files changed, 17 insertions(+), 5 deletions(-)
+
+diff --git a/v8/src/i18n.cc b/v8/src/i18n.cc
+index d2245ef34a9..7c22871ff5e 100644
+--- a/v8/src/i18n.cc
++++ b/v8/src/i18n.cc
+@@ -30,8 +30,13 @@
+ #include "unicode/ucol.h"
+ #include "unicode/ucurr.h"
+ #include "unicode/unum.h"
++#include "unicode/uvernum.h"
+ #include "unicode/uversion.h"
+
++#if U_ICU_VERSION_MAJOR_NUM >= 59
++#include "unicode/char16ptr.h"
++#endif
++
+ namespace v8 {
+ namespace internal {
+
+@@ -270,8 +275,13 @@ icu::DecimalFormat* CreateICUNumberFormat(
+ }
+
+ UErrorCode status_digits = U_ZERO_ERROR;
++#if U_ICU_VERSION_MAJOR_NUM >= 59
+ uint32_t fraction_digits = ucurr_getDefaultFractionDigits(
+- currency.getTerminatedBuffer(), &status_digits);
++ icu::toUCharPtr(currency.getTerminatedBuffer()), &status_digits);
++#else
++ uint32_t fraction_digits = ucurr_getDefaultFractionDigits(
++ currency.getTerminatedBuffer(), &status_digits);
++#endif
+ if (U_SUCCESS(status_digits)) {
+ number_format->setMinimumFractionDigits(fraction_digits);
+ number_format->setMaximumFractionDigits(fraction_digits);
+diff --git a/v8/src/runtime/runtime-i18n.cc b/v8/src/runtime/runtime-i18n.cc
+index 0b453819146..e89175a37db 100644
+--- a/v8/src/runtime/runtime-i18n.cc
++++ b/v8/src/runtime/runtime-i18n.cc
+@@ -43,6 +43,7 @@
+ #include "unicode/uloc.h"
+ #include "unicode/unistr.h"
+ #include "unicode/unum.h"
++#include "unicode/ustring.h"
+ #include "unicode/uversion.h"
+
+
+@@ -609,10 +610,11 @@ RUNTIME_FUNCTION(Runtime_InternalCompare) {
+ String::FlatContent flat2 = string2->GetFlatContent();
+ std::unique_ptr<uc16[]> sap1;
+ std::unique_ptr<uc16[]> sap2;
+- const UChar* string_val1 = GetUCharBufferFromFlat(flat1, &sap1, length1);
+- const UChar* string_val2 = GetUCharBufferFromFlat(flat2, &sap2, length2);
+- result =
+- collator->compare(string_val1, length1, string_val2, length2, status);
++ icu::UnicodeString string_val1(
++ FALSE, GetUCharBufferFromFlat(flat1, &sap1, length1), length1);
++ icu::UnicodeString string_val2(
++ FALSE, GetUCharBufferFromFlat(flat2, &sap2, length2), length2);
++ result = collator->compare(string_val1, string_val2, status);
+ }
+ if (U_FAILURE(status)) return isolate->ThrowIllegalOperation();
+
diff --git a/dev-util/electron/files/electron-1.6.11-vendor-libchromiumcontent.patch b/dev-util/electron/files/electron-1.6.11-vendor-libchromiumcontent.patch
deleted file mode 100644
index d724e41f1fdb..000000000000
--- a/dev-util/electron/files/electron-1.6.11-vendor-libchromiumcontent.patch
+++ /dev/null
@@ -1,86 +0,0 @@
-From 0a28ad879b544f73f74491ddd58646750335bf1d Mon Sep 17 00:00:00 2001
-From: Elvis Pranskevichus <elvis@magic.io>
-Date: Fri, 28 Apr 2017 17:22:38 -0400
-Subject: [PATCH] Gentoo build fixes
-
----
- chromiumcontent/BUILD.gn | 8 ++------
- chromiumcontent/build_libs.py | 2 +-
- script/create-dist | 4 ----
- script/lib/config.py | 2 +-
- 4 files changed, 4 insertions(+), 12 deletions(-)
-
-diff --git a/chromiumcontent/BUILD.gn b/chromiumcontent/BUILD.gn
-index e4e4166..25be865 100644
---- a/chromiumcontent/BUILD.gn
-+++ b/chromiumcontent/BUILD.gn
-@@ -343,12 +343,8 @@ if (is_electron_build && !is_component_build) {
- }
- }
-
-- static_library("v8") {
-- complete_static_lib = true
-- sources = []
-- if (defined(obj_v8)) {
-- sources += obj_v8
-- }
-+ shared_library("v8") {
-+ deps = [ "//v8:v8", "//v8:v8_libplatform" ]
- }
-
- } else {
-diff --git a/chromiumcontent/build_libs.py b/chromiumcontent/build_libs.py
-index e10f320..716c5f2 100644
---- a/chromiumcontent/build_libs.py
-+++ b/chromiumcontent/build_libs.py
-@@ -82,7 +82,7 @@ with open(args.out, 'w') as out:
- "third_party/usrsctp",
- "third_party/woff2",
- "third_party/zlib",
-- "tools",
-+ "tools/battor_agent",
- "ui",
- "url",
- ])
-diff --git a/script/create-dist b/script/create-dist
-index aec75e5..64c7401 100755
---- a/script/create-dist
-+++ b/script/create-dist
-@@ -45,7 +45,6 @@ COMPONENTS = ['static_library', 'shared_library']
- BINARIES = {
- 'all': [
- 'content_shell.pak',
-- 'icudtl.dat',
- 'natives_blob.bin',
- 'snapshot_blob.bin',
- os.path.join('gen', 'blink', 'public', 'resources', 'blink_image_resources_200_percent.pak'),
-@@ -59,7 +58,6 @@ BINARIES = {
- 'libffmpeg.dylib',
- ],
- 'linux': [
-- 'libffmpeg.so',
- ],
- 'win32': [
- 'd3dcompiler_47.dll',
-@@ -312,8 +310,6 @@ def main():
- copy_generated_sources(target_arch, component)
- copy_locales(target_arch, component)
-
-- copy_ffmpeg(target_arch)
-- copy_sources()
- generate_licenses()
- if not args.no_zip:
- create_zip(create_debug_archive)
-diff --git a/script/lib/config.py b/script/lib/config.py
-index 3455161..195b2a1 100644
---- a/script/lib/config.py
-+++ b/script/lib/config.py
-@@ -4,4 +4,4 @@ import os
-
-
- def get_output_dir(source_root, target_arch, component):
-- return os.path.join(source_root, 'src', 'out-' + target_arch, component)
-+ return os.environ.get('CHROMIUM_BUILD_DIR')
---
-2.13.3
-
diff --git a/dev-util/electron/files/electron-1.6.15-vendor-breakpad.patch b/dev-util/electron/files/electron-1.6.15-vendor-breakpad.patch
new file mode 100644
index 000000000000..15a60c6f1481
--- /dev/null
+++ b/dev-util/electron/files/electron-1.6.15-vendor-breakpad.patch
@@ -0,0 +1,223 @@
+From 6f067da77b786787c6a3c3253198b0516da79904 Mon Sep 17 00:00:00 2001
+From: Elvis Pranskevichus <elvis@magic.io>
+Date: Mon, 27 Nov 2017 17:26:03 -0500
+Subject: [PATCH] glibc-2.26 compatibility fix
+
+---
+ .../linux/dump_writer_common/ucontext_reader.cc | 30 +++++++++++-----------
+ .../linux/dump_writer_common/ucontext_reader.h | 10 ++++----
+ src/client/linux/handler/exception_handler.cc | 10 ++++----
+ src/client/linux/handler/exception_handler.h | 2 +-
+ .../linux/microdump_writer/microdump_writer.cc | 2 +-
+ .../linux/minidump_writer/minidump_writer.cc | 2 +-
+ 6 files changed, 28 insertions(+), 28 deletions(-)
+
+diff --git a/src/client/linux/dump_writer_common/ucontext_reader.cc b/src/client/linux/dump_writer_common/ucontext_reader.cc
+index c80724dd..93b4d9f8 100644
+--- a/src/client/linux/dump_writer_common/ucontext_reader.cc
++++ b/src/client/linux/dump_writer_common/ucontext_reader.cc
+@@ -40,15 +40,15 @@ namespace google_breakpad {
+
+ #if defined(__i386__)
+
+-uintptr_t UContextReader::GetStackPointer(const struct ucontext* uc) {
++uintptr_t UContextReader::GetStackPointer(const ucontext_t* uc) {
+ return uc->uc_mcontext.gregs[REG_ESP];
+ }
+
+-uintptr_t UContextReader::GetInstructionPointer(const struct ucontext* uc) {
++uintptr_t UContextReader::GetInstructionPointer(const ucontext_t* uc) {
+ return uc->uc_mcontext.gregs[REG_EIP];
+ }
+
+-void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext *uc,
++void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext_t *uc,
+ const struct _libc_fpstate* fp) {
+ const greg_t* regs = uc->uc_mcontext.gregs;
+
+@@ -88,15 +88,15 @@ void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext *uc,
+
+ #elif defined(__x86_64)
+
+-uintptr_t UContextReader::GetStackPointer(const struct ucontext* uc) {
++uintptr_t UContextReader::GetStackPointer(const ucontext_t* uc) {
+ return uc->uc_mcontext.gregs[REG_RSP];
+ }
+
+-uintptr_t UContextReader::GetInstructionPointer(const struct ucontext* uc) {
++uintptr_t UContextReader::GetInstructionPointer(const ucontext_t* uc) {
+ return uc->uc_mcontext.gregs[REG_RIP];
+ }
+
+-void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext *uc,
++void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext_t *uc,
+ const struct _libc_fpstate* fpregs) {
+ const greg_t* regs = uc->uc_mcontext.gregs;
+
+@@ -145,15 +145,15 @@ void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext *uc,
+
+ #elif defined(__ARM_EABI__)
+
+-uintptr_t UContextReader::GetStackPointer(const struct ucontext* uc) {
++uintptr_t UContextReader::GetStackPointer(const ucontext_t* uc) {
+ return uc->uc_mcontext.arm_sp;
+ }
+
+-uintptr_t UContextReader::GetInstructionPointer(const struct ucontext* uc) {
++uintptr_t UContextReader::GetInstructionPointer(const ucontext_t* uc) {
+ return uc->uc_mcontext.arm_pc;
+ }
+
+-void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext *uc) {
++void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext_t *uc) {
+ out->context_flags = MD_CONTEXT_ARM_FULL;
+
+ out->iregs[0] = uc->uc_mcontext.arm_r0;
+@@ -184,15 +184,15 @@ void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext *uc) {
+
+ #elif defined(__aarch64__)
+
+-uintptr_t UContextReader::GetStackPointer(const struct ucontext* uc) {
++uintptr_t UContextReader::GetStackPointer(const ucontext_t* uc) {
+ return uc->uc_mcontext.sp;
+ }
+
+-uintptr_t UContextReader::GetInstructionPointer(const struct ucontext* uc) {
++uintptr_t UContextReader::GetInstructionPointer(const ucontext_t* uc) {
+ return uc->uc_mcontext.pc;
+ }
+
+-void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext *uc,
++void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext_t *uc,
+ const struct fpsimd_context* fpregs) {
+ out->context_flags = MD_CONTEXT_ARM64_FULL;
+
+@@ -210,15 +210,15 @@ void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext *uc,
+
+ #elif defined(__mips__)
+
+-uintptr_t UContextReader::GetStackPointer(const struct ucontext* uc) {
++uintptr_t UContextReader::GetStackPointer(const ucontext_t* uc) {
+ return uc->uc_mcontext.gregs[MD_CONTEXT_MIPS_REG_SP];
+ }
+
+-uintptr_t UContextReader::GetInstructionPointer(const struct ucontext* uc) {
++uintptr_t UContextReader::GetInstructionPointer(const ucontext_t* uc) {
+ return uc->uc_mcontext.pc;
+ }
+
+-void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext *uc) {
++void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext_t *uc) {
+ #if _MIPS_SIM == _ABI64
+ out->context_flags = MD_CONTEXT_MIPS64_FULL;
+ #elif _MIPS_SIM == _ABIO32
+diff --git a/src/client/linux/dump_writer_common/ucontext_reader.h b/src/client/linux/dump_writer_common/ucontext_reader.h
+index b6e77b4b..2369a9ad 100644
+--- a/src/client/linux/dump_writer_common/ucontext_reader.h
++++ b/src/client/linux/dump_writer_common/ucontext_reader.h
+@@ -41,21 +41,21 @@ namespace google_breakpad {
+
+ // Wraps platform-dependent implementations of accessors to ucontext structs.
+ struct UContextReader {
+- static uintptr_t GetStackPointer(const struct ucontext* uc);
++ static uintptr_t GetStackPointer(const ucontext_t* uc);
+
+- static uintptr_t GetInstructionPointer(const struct ucontext* uc);
++ static uintptr_t GetInstructionPointer(const ucontext_t* uc);
+
+ // Juggle a arch-specific ucontext into a minidump format
+ // out: the minidump structure
+ // info: the collection of register structures.
+ #if defined(__i386__) || defined(__x86_64)
+- static void FillCPUContext(RawContextCPU *out, const ucontext *uc,
++ static void FillCPUContext(RawContextCPU *out, const ucontext_t *uc,
+ const struct _libc_fpstate* fp);
+ #elif defined(__aarch64__)
+- static void FillCPUContext(RawContextCPU *out, const ucontext *uc,
++ static void FillCPUContext(RawContextCPU *out, const ucontext_t *uc,
+ const struct fpsimd_context* fpregs);
+ #else
+- static void FillCPUContext(RawContextCPU *out, const ucontext *uc);
++ static void FillCPUContext(RawContextCPU *out, const ucontext_t *uc);
+ #endif
+ };
+
+diff --git a/src/client/linux/handler/exception_handler.cc b/src/client/linux/handler/exception_handler.cc
+index 148d61f9..9d53c11e 100644
+--- a/src/client/linux/handler/exception_handler.cc
++++ b/src/client/linux/handler/exception_handler.cc
+@@ -439,9 +439,9 @@ bool ExceptionHandler::HandleSignal(int sig, siginfo_t* info, void* uc) {
+ // Fill in all the holes in the struct to make Valgrind happy.
+ memset(&g_crash_context_, 0, sizeof(g_crash_context_));
+ memcpy(&g_crash_context_.siginfo, info, sizeof(siginfo_t));
+- memcpy(&g_crash_context_.context, uc, sizeof(struct ucontext));
++ memcpy(&g_crash_context_.context, uc, sizeof(ucontext_t));
+ #if defined(__aarch64__)
+- struct ucontext* uc_ptr = (struct ucontext*)uc;
++ ucontext_t* uc_ptr = (ucontext_t*)uc;
+ struct fpsimd_context* fp_ptr =
+ (struct fpsimd_context*)&uc_ptr->uc_mcontext.__reserved;
+ if (fp_ptr->head.magic == FPSIMD_MAGIC) {
+@@ -450,9 +450,9 @@ bool ExceptionHandler::HandleSignal(int sig, siginfo_t* info, void* uc) {
+ }
+ #elif !defined(__ARM_EABI__) && !defined(__mips__)
+ // FP state is not part of user ABI on ARM Linux.
+- // In case of MIPS Linux FP state is already part of struct ucontext
++ // In case of MIPS Linux FP state is already part of ucontext_t
+ // and 'float_state' is not a member of CrashContext.
+- struct ucontext* uc_ptr = (struct ucontext*)uc;
++ ucontext_t* uc_ptr = (ucontext_t*)uc;
+ if (uc_ptr->uc_mcontext.fpregs) {
+ memcpy(&g_crash_context_.float_state, uc_ptr->uc_mcontext.fpregs,
+ sizeof(g_crash_context_.float_state));
+@@ -476,7 +476,7 @@ bool ExceptionHandler::SimulateSignalDelivery(int sig) {
+ // ExceptionHandler::HandleSignal().
+ siginfo.si_code = SI_USER;
+ siginfo.si_pid = getpid();
+- struct ucontext context;
++ ucontext_t context;
+ getcontext(&context);
+ return HandleSignal(sig, &siginfo, &context);
+ }
+diff --git a/src/client/linux/handler/exception_handler.h b/src/client/linux/handler/exception_handler.h
+index 591c3108..846df772 100644
+--- a/src/client/linux/handler/exception_handler.h
++++ b/src/client/linux/handler/exception_handler.h
+@@ -191,7 +191,7 @@ class ExceptionHandler {
+ struct CrashContext {
+ siginfo_t siginfo;
+ pid_t tid; // the crashing thread.
+- struct ucontext context;
++ ucontext_t context;
+ #if !defined(__ARM_EABI__) && !defined(__mips__)
+ // #ifdef this out because FP state is not part of user ABI for Linux ARM.
+ // In case of MIPS Linux FP state is already part of struct
+diff --git a/src/client/linux/microdump_writer/microdump_writer.cc b/src/client/linux/microdump_writer/microdump_writer.cc
+index d459d9ec..759f432e 100644
+--- a/src/client/linux/microdump_writer/microdump_writer.cc
++++ b/src/client/linux/microdump_writer/microdump_writer.cc
+@@ -416,7 +416,7 @@ class MicrodumpWriter {
+
+ void* Alloc(unsigned bytes) { return dumper_->allocator()->Alloc(bytes); }
+
+- const struct ucontext* const ucontext_;
++ const ucontext_t* const ucontext_;
+ #if !defined(__ARM_EABI__) && !defined(__mips__)
+ const google_breakpad::fpstate_t* const float_state_;
+ #endif
+diff --git a/src/client/linux/minidump_writer/minidump_writer.cc b/src/client/linux/minidump_writer/minidump_writer.cc
+index f407caa7..407c1e32 100644
+--- a/src/client/linux/minidump_writer/minidump_writer.cc
++++ b/src/client/linux/minidump_writer/minidump_writer.cc
+@@ -1240,7 +1240,7 @@ class MinidumpWriter {
+ const int fd_; // File descriptor where the minidum should be written.
+ const char* path_; // Path to the file where the minidum should be written.
+
+- const struct ucontext* const ucontext_; // also from the signal handler
++ const ucontext_t* const ucontext_; // also from the signal handler
+ #if !defined(__ARM_EABI__) && !defined(__mips__)
+ const google_breakpad::fpstate_t* const float_state_; // ditto
+ #endif
+--
+2.14.3
+
diff --git a/dev-util/electron/files/electron-1.6.11-vendor-brightray.patch b/dev-util/electron/files/electron-1.6.15-vendor-brightray.patch
index a1a351195d00..6acf412173ec 100644
--- a/dev-util/electron/files/electron-1.6.11-vendor-brightray.patch
+++ b/dev-util/electron/files/electron-1.6.15-vendor-brightray.patch
@@ -1,15 +1,15 @@
-From 610ee2681f9532a13f63edf78aab55b1dcb8abf2 Mon Sep 17 00:00:00 2001
+From 055fb62fc58ef7027b444dd235bc4781effa30d7 Mon Sep 17 00:00:00 2001
From: Elvis Pranskevichus <elvis@magic.io>
-Date: Mon, 8 Feb 2016 15:14:58 -0500
-Subject: [PATCH] brightray build fixes
+Date: Mon, 2 Oct 2017 15:22:51 -0400
+Subject: [PATCH] Gentoo build fixes
---
- brightray.gyp | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++++----
- brightray.gypi | 14 ++-----------
- 2 files changed, 64 insertions(+), 16 deletions(-)
+ brightray.gyp | 93 +++++++++++++++++++++++++++++++++++++++++++++++++++++-----
+ brightray.gypi | 14 ++-------
+ 2 files changed, 88 insertions(+), 19 deletions(-)
diff --git a/brightray.gyp b/brightray.gyp
-index e60d17a..37e5159 100644
+index e60d17a..79e0618 100644
--- a/brightray.gyp
+++ b/brightray.gyp
@@ -1,7 +1,7 @@
@@ -21,52 +21,59 @@ index e60d17a..37e5159 100644
},
'includes': [
'filenames.gypi',
-@@ -9,6 +9,10 @@
+@@ -9,6 +9,11 @@
'targets': [
{
'target_name': 'brightray',
+ 'dependencies': [
+ 'cups',
+ 'gconf',
++ 'icu',
+ ],
'type': 'static_library',
'include_dirs': [
'.',
-@@ -130,18 +134,30 @@
+@@ -130,18 +135,33 @@
}, {
'link_settings': {
'libraries': [
- # Link with ffmpeg.
- '<(libchromiumcontent_dir)/libffmpeg.so',
# Following libraries are required by libchromiumcontent:
++ '-lFLAC',
'-lasound',
++ '-lavcodec',
++ '-lavformat',
++ '-lavutil',
'-lcap',
- '-lcups',
- '-lrt',
+- '-lrt',
++ '-lcrypto',
'-ldl',
- '-lresolv',
+- '-lresolv',
++ '-lexpat',
'-lfontconfig',
'-lfreetype',
- '-lexpat',
-+ '-lre2',
-+ '-ljpeg',
-+ '-lsnappy',
+- '-lexpat',
+ '-lharfbuzz',
++ '-ljpeg',
++ '-lminizip',
+ '-lpng',
-+ '-lxml2',
-+ '-lxslt',
++ '-lre2',
++ '-lresolv',
++ '-lrt',
++ '-lsnappy',
++ '-lssl',
++ '-lvpx',
+ '-lwebp',
+ '-lwebpdemux',
-+ '-lavcodec',
-+ '-lavformat',
-+ '-lavutil',
-+ '-lvpx',
-+ '-lFLAC',
-+ '-lminizip',
++ '-lxml2',
++ '-lxslt',
++ '-lz',
],
},
}],
-@@ -390,5 +406,47 @@
+@@ -390,5 +410,64 @@
}], # OS=="win"
],
},
@@ -112,6 +119,23 @@ index e60d17a..37e5159 100644
+ }],
+ ],
+ },
++ {
++ 'target_name': 'icu',
++ 'type': 'none',
++ 'conditions': [
++ ['use_system_icu==1', {
++ 'direct_dependent_settings': {
++ 'link_settings': {
++ 'libraries': [
++ '-licui18n',
++ '-licuuc',
++ '-licudata',
++ ],
++ },
++ },
++ }],
++ ],
++ },
],
}
diff --git a/brightray.gypi b/brightray.gypi
@@ -159,5 +183,5 @@ index 064ae1a..95d6f14 100644
],
}], # OS=="linux"
--
-2.13.3
+2.14.3
diff --git a/dev-util/electron/files/electron-1.6.15-vendor-libchromiumcontent.patch b/dev-util/electron/files/electron-1.6.15-vendor-libchromiumcontent.patch
new file mode 100644
index 000000000000..9360646ff681
--- /dev/null
+++ b/dev-util/electron/files/electron-1.6.15-vendor-libchromiumcontent.patch
@@ -0,0 +1,202 @@
+From 0352e8df546c58b85e79714f77c616832c8c72ac Mon Sep 17 00:00:00 2001
+From: Elvis Pranskevichus <elvis@magic.io>
+Date: Fri, 28 Apr 2017 17:22:38 -0400
+Subject: [PATCH] Gentoo build fixes
+
+---
+ chromiumcontent/BUILD.gn | 9 +++------
+ chromiumcontent/build_libs.py | 2 +-
+ script/create-dist | 39 ++++++++++++++++++++++++++-------------
+ script/lib/config.py | 2 +-
+ 4 files changed, 31 insertions(+), 21 deletions(-)
+
+diff --git a/chromiumcontent/BUILD.gn b/chromiumcontent/BUILD.gn
+index e4e4166..f88fab3 100644
+--- a/chromiumcontent/BUILD.gn
++++ b/chromiumcontent/BUILD.gn
+@@ -343,12 +343,9 @@ if (is_electron_build && !is_component_build) {
+ }
+ }
+
+- static_library("v8") {
+- complete_static_lib = true
+- sources = []
+- if (defined(obj_v8)) {
+- sources += obj_v8
+- }
++ shared_library("v8") {
++ deps = [ "//v8:v8", "//v8:v8_libplatform" ]
++ ldflags = [ "-Wl,-rpath=\$ORIGIN/" ]
+ }
+
+ } else {
+diff --git a/chromiumcontent/build_libs.py b/chromiumcontent/build_libs.py
+index e10f320..716c5f2 100644
+--- a/chromiumcontent/build_libs.py
++++ b/chromiumcontent/build_libs.py
+@@ -82,7 +82,7 @@ with open(args.out, 'w') as out:
+ "third_party/usrsctp",
+ "third_party/woff2",
+ "third_party/zlib",
+- "tools",
++ "tools/battor_agent",
+ "ui",
+ "url",
+ ])
+diff --git a/script/create-dist b/script/create-dist
+index aec75e5..cf2f62c 100755
+--- a/script/create-dist
++++ b/script/create-dist
+@@ -45,7 +45,6 @@ COMPONENTS = ['static_library', 'shared_library']
+ BINARIES = {
+ 'all': [
+ 'content_shell.pak',
+- 'icudtl.dat',
+ 'natives_blob.bin',
+ 'snapshot_blob.bin',
+ os.path.join('gen', 'blink', 'public', 'resources', 'blink_image_resources_200_percent.pak'),
+@@ -59,7 +58,6 @@ BINARIES = {
+ 'libffmpeg.dylib',
+ ],
+ 'linux': [
+- 'libffmpeg.so',
+ ],
+ 'win32': [
+ 'd3dcompiler_47.dll',
+@@ -308,12 +306,11 @@ def main():
+
+ for component in COMPONENTS:
+ if args.component == 'all' or args.component == component:
+- copy_binaries(target_arch, component, create_debug_archive)
++ copy_binaries(target_arch, component, create_debug_archive,
++ args.system_icu)
+ copy_generated_sources(target_arch, component)
+ copy_locales(target_arch, component)
+
+- copy_ffmpeg(target_arch)
+- copy_sources()
+ generate_licenses()
+ if not args.no_zip:
+ create_zip(create_debug_archive)
+@@ -331,6 +328,8 @@ def parse_args():
+ help='static_library or shared_library or all')
+ parser.add_argument('--no_zip', action='store_true',
+ help='Do not create zip distribution')
++ parser.add_argument('--system-icu', action='store_true', dest='system_icu',
++ help='Use system icu.')
+ return parser.parse_args()
+
+
+@@ -355,15 +354,17 @@ def check_create_debug_archive(target_arch):
+ def copy_with_blacklist(target_arch, src, dest):
+ if os.path.basename(src) in ARCH_BLACKLIST[target_arch]:
+ return
+- shutil.copy2(src, dest)
++ link_or_copy(src, dest)
+
+
+-def copy_binaries(target_arch, component, create_debug_archive):
++def copy_binaries(target_arch, component, create_debug_archive, system_icu):
+ output_dir = get_output_dir(SOURCE_ROOT, target_arch, component)
+ target_dir = os.path.join(MAIN_DIR, component)
+ mkdir_p(target_dir)
+
+ binaries = BINARIES['all'] + BINARIES[TARGET_PLATFORM]
++ if not system_icu:
++ binaries.append('icudtl.dat')
+ if component == 'shared_library':
+ binaries += BINARIES_SHARED_LIBRARY[TARGET_PLATFORM]
+ for binary in binaries:
+@@ -371,7 +372,7 @@ def copy_binaries(target_arch, component, create_debug_archive):
+
+ # Copy all static libraries from chromiumcontent
+ for library in glob.glob(os.path.join(output_dir, 'obj', 'chromiumcontent', '*.' + STATIC_LIBRARY_SUFFIX)):
+- shutil.copy2(library, target_dir)
++ link_or_copy(library, target_dir)
+
+ if component == 'shared_library':
+ match = '*.{0}'.format(SHARED_LIBRARY_SUFFIX)
+@@ -396,7 +397,7 @@ def copy_binaries(target_arch, component, create_debug_archive):
+ for root, _, filenames in os.walk(output_dir):
+ for pdb in filenames:
+ if pdb.endswith('.pdb'):
+- shutil.copy2(os.path.join(root, pdb), target_dir)
++ link_or_copy(os.path.join(root, pdb), target_dir)
+
+ if TARGET_PLATFORM == 'linux':
+ if component == 'shared_library':
+@@ -433,7 +434,7 @@ def copy_binaries(target_arch, component, create_debug_archive):
+
+ ffmpeg_output_dir = get_output_dir(SOURCE_ROOT, target_arch, 'ffmpeg')
+ for binary in binaries:
+- shutil.copy2(os.path.join(ffmpeg_output_dir, binary), target_dir)
++ link_or_copy(os.path.join(ffmpeg_output_dir, binary), target_dir)
+
+
+ def copy_generated_sources(target_arch, component):
+@@ -452,7 +453,7 @@ def copy_locales(target_arch, component):
+ for src_file in glob.glob(os.path.join(src_dir, 'content_strings_*.pak')):
+ filename = os.path.basename(src_file)
+ new_name = re.sub('content_strings_', '', filename)
+- shutil.copy2(src_file, os.path.join(target_dir, new_name))
++ link_or_copy(src_file, os.path.join(target_dir, new_name))
+
+ def copy_sources():
+ for include_path in INCLUDE_DIRS:
+@@ -477,7 +478,7 @@ def copy_ffmpeg(target_arch):
+
+ target_dir = os.path.join(MAIN_DIR, 'ffmpeg')
+ mkdir_p(target_dir)
+- shutil.copy2(os.path.join(output_dir, binary), target_dir)
++ link_or_copy(os.path.join(output_dir, binary), target_dir)
+
+
+
+@@ -494,7 +495,7 @@ def copy_source_file(absolute_path, relative_to, destination):
+ relative_path = os.path.relpath(absolute_path, start=relative_to)
+ final_path = os.path.join(destination, relative_path)
+ mkdir_p(os.path.dirname(final_path))
+- shutil.copy2(absolute_path, final_path)
++ link_or_copy(absolute_path, final_path)
+
+
+ def copy_dir(relative_path, relative_to, destination):
+@@ -531,6 +532,7 @@ def link_binary_to_debug_file(objcopy, binfile, symfile, dirname):
+ def run_strip(target_arch, filename, create_debug_archive):
+ # Static libraries are not stripped because it would remove
+ # all the symbols in it.
++ return
+ if filename.endswith('.a'):
+ return
+
+@@ -620,6 +622,17 @@ def rm_rf(path):
+ raise
+
+
++def link_or_copy(src, dst):
++ if os.path.isfile(src):
++ if os.path.isdir(dst):
++ dst = os.path.join(dst, os.path.basename(src))
++ try:
++ os.link(src, dst)
++ except OSError:
++ shutil.copy2(src, dst)
++ else:
++ shutil.copy2(src, dst)
++
+ def safe_unlink(path):
+ try:
+ os.unlink(path)
+diff --git a/script/lib/config.py b/script/lib/config.py
+index 3455161..195b2a1 100644
+--- a/script/lib/config.py
++++ b/script/lib/config.py
+@@ -4,4 +4,4 @@ import os
+
+
+ def get_output_dir(source_root, target_arch, component):
+- return os.path.join(source_root, 'src', 'out-' + target_arch, component)
++ return os.environ.get('CHROMIUM_BUILD_DIR')
+--
+2.13.6
+
diff --git a/dev-util/electron/files/electron-1.6.11-vendor-node.patch b/dev-util/electron/files/electron-1.6.15-vendor-node.patch
index 2f931771f91a..43e7c098f3bf 100644
--- a/dev-util/electron/files/electron-1.6.11-vendor-node.patch
+++ b/dev-util/electron/files/electron-1.6.15-vendor-node.patch
@@ -1,30 +1,30 @@
-From fc6ba3a74ffa88b22435531d6522d934a52187e5 Mon Sep 17 00:00:00 2001
+From 672445004bafb94ea14cbb89c12c205c731eb288 Mon Sep 17 00:00:00 2001
From: Elvis Pranskevichus <elvis@magic.io>
Date: Wed, 10 Feb 2016 14:45:13 -0500
Subject: [PATCH] Build fixes
---
- lib/internal/bootstrap_node.js | 2 ++
- node.gyp | 9 +++++++++
- src/node_main.cc | 2 ++
- 3 files changed, 13 insertions(+)
+ lib/internal/bootstrap_node.js | 2 ++
+ node.gyp | 14 +++++++++-----
+ src/node_main.cc | 4 ++++
+ 3 files changed, 15 insertions(+), 5 deletions(-)
diff --git a/lib/internal/bootstrap_node.js b/lib/internal/bootstrap_node.js
-index 085ea00fd0..cb49fc87a7 100644
+index aee7261f23..b921843643 100644
--- a/lib/internal/bootstrap_node.js
+++ b/lib/internal/bootstrap_node.js
-@@ -40,7 +40,9 @@
+@@ -39,7 +39,9 @@
setupGlobalConsole();
}
-+ if (!process.env.ELECTRON_NODE_DISABLE_ASAR_SUPPORT) {
++ if (!process.env._ELECTRON_BUILD_NO_ASAR) {
setupAsarSupport();
+ }
const _process = NativeModule.require('internal/process');
diff --git a/node.gyp b/node.gyp
-index 95f24933fc..1434904324 100644
+index c0bc2d7d4c..e5920f6a33 100644
--- a/node.gyp
+++ b/node.gyp
@@ -17,6 +17,7 @@
@@ -35,7 +35,7 @@ index 95f24933fc..1434904324 100644
'node_v8_options%': '',
'node_enable_v8_vtunejit%': 'false',
'node_core_target_name%': 'node',
-@@ -133,6 +134,7 @@
+@@ -146,6 +147,7 @@
],
'include_dirs': [
@@ -43,7 +43,7 @@ index 95f24933fc..1434904324 100644
'src',
'tools/msvs/genfiles',
'deps/uv/src/ares',
-@@ -238,6 +240,13 @@
+@@ -261,6 +263,13 @@
'V8_DEPRECATION_WARNINGS=1',
],
@@ -57,11 +57,23 @@ index 95f24933fc..1434904324 100644
'conditions': [
[ 'node_shared=="false"', {
+@@ -950,11 +959,6 @@
+ }]
+ ]
+ }],
+- [ 'node_use_v8_platform=="true"', {
+- 'dependencies': [
+- 'deps/v8/src/v8.gyp:v8_libplatform',
+- ],
+- }],
+ [ 'node_use_bundled_v8=="true"', {
+ 'dependencies': [
+ 'deps/v8/src/v8.gyp:v8',
diff --git a/src/node_main.cc b/src/node_main.cc
-index 16bda81ae6..fd559ef1c3 100644
+index 16bda81ae6..2eb1d08369 100644
--- a/src/node_main.cc
+++ b/src/node_main.cc
-@@ -50,11 +50,13 @@ int wmain(int argc, wchar_t *wargv[]) {
+@@ -50,11 +50,15 @@ int wmain(int argc, wchar_t *wargv[]) {
}
#else
// UNIX
@@ -71,10 +83,12 @@ index 16bda81ae6..fd559ef1c3 100644
// calls elsewhere in the program (e.g., any logging from V8.)
setvbuf(stdout, nullptr, _IONBF, 0);
setvbuf(stderr, nullptr, _IONBF, 0);
-+ putenv("ELECTRON_NODE_DISABLE_ASAR_SUPPORT=1");
++#ifdef ELECTRON_NODE_BUILD_NO_ASAR
++ setenv("_ELECTRON_BUILD_NO_ASAR", "1", 1);
++#endif
return node::Start(argc, argv);
}
#endif
--
-2.13.3
+2.14.3
diff --git a/dev-util/electron/files/electron-1.6.11.patch b/dev-util/electron/files/electron-1.6.15.patch
index b40d471348ab..9d74753fc6d3 100644
--- a/dev-util/electron/files/electron-1.6.11.patch
+++ b/dev-util/electron/files/electron-1.6.15.patch
@@ -1,25 +1,26 @@
-From b756fa976480791c76e9338a16ee2b0a29265b93 Mon Sep 17 00:00:00 2001
+From 8aa9ca32e88f7b6e66ded532d3110f4e84e99a9b Mon Sep 17 00:00:00 2001
From: Elvis Pranskevichus <elvis@magic.io>
Date: Mon, 8 Feb 2016 15:16:40 -0500
Subject: [PATCH] electron build fixes
---
- common.gypi | 43 ++++++++++++++++++++++-----
- electron.gyp | 74 +++++++++++++++++++++++++++++++++++----------
- toolchain.gypi | 76 +++++++++++++++++++----------------------------
- tools/ar-flags.py | 15 ++++++++++
- tools/atom_source_root.py | 5 ++++
- tools/browserify.py | 24 +++++++++++++++
- tools/get-endianness.py | 4 +++
- tools/js2asar.py | 13 ++++----
- 8 files changed, 179 insertions(+), 75 deletions(-)
+ common.gypi | 70 ++++++++++++++++++++++++++++++++++-----
+ electron.gyp | 70 +++++++++++++++++++++++++++++++--------
+ toolchain.gypi | 76 +++++++++++++++++--------------------------
+ tools/ar-flags.py | 15 +++++++++
+ tools/atom_source_root.py | 5 +++
+ tools/browserify.py | 24 ++++++++++++++
+ tools/get-endianness.py | 4 +++
+ tools/js2asar.py | 13 ++++----
+ tools/list-browserify-deps.py | 3 +-
+ 9 files changed, 204 insertions(+), 76 deletions(-)
create mode 100644 tools/ar-flags.py
create mode 100644 tools/atom_source_root.py
create mode 100644 tools/browserify.py
create mode 100644 tools/get-endianness.py
diff --git a/common.gypi b/common.gypi
-index 7c1bf366a..c441ae04b 100644
+index 7c1bf366a..7892926eb 100644
--- a/common.gypi
+++ b/common.gypi
@@ -2,6 +2,7 @@
@@ -30,8 +31,24 @@ index 7c1bf366a..c441ae04b 100644
],
'variables': {
# Tell crashpad to build as external project.
-@@ -16,26 +17,23 @@
+@@ -11,31 +12,44 @@
+ 'chromeos': 0,
+ # Reflects node's config.gypi.
+ 'component%': 'static_library',
+- 'python': 'python',
++ 'python%': 'python',
+ 'openssl_fips': '',
'openssl_no_asm': 1,
++
++ 'host_arch': '<!(python <(DEPTH)/chromium/v8/gypfiles/detect_v8_host_arch.py)',
++
++ # ICU configuration for Node.
++ # Note: the use of icu-system.gyp does not necessarily
++ # indicate that the system ICU will be used, it merely
++ # disables the use of the version bundled with Node.
++ 'icu_gyp_path': 'tools/icu/icu-system.gyp',
++ 'icu_small': 'false',
++
'use_openssl_def': 0,
'OPENSSL_PRODUCT': 'libopenssl.a',
- 'node_release_urlbase': 'https://atom.io/download/atom-shell',
@@ -43,12 +60,17 @@ index 7c1bf366a..c441ae04b 100644
'node_install_npm': 'false',
'node_prefix': '',
'node_shared': 'true',
-- 'node_shared_cares': 'false',
+ 'node_shared_cares': 'false',
- 'node_shared_http_parser': 'false',
- 'node_shared_libuv': 'false',
- 'node_shared_openssl': 'false',
'node_shared_v8': 'true',
- 'node_shared_zlib': 'false',
++ 'node_shared_http_parser': 'true',
++ # There are ABI-incompatible modifications to libuv
++ 'node_shared_libuv': 'false',
++ 'node_shared_openssl': 'true',
++ 'node_shared_zlib': 'true',
'node_tag': '',
'node_use_dtrace': 'false',
'node_use_etw': 'false',
@@ -62,10 +84,11 @@ index 7c1bf366a..c441ae04b 100644
'node_enable_d8': 'false',
'uv_library': 'static_library',
'uv_parent_path': 'vendor/node/deps/uv',
-@@ -44,10 +42,16 @@
+@@ -44,10 +58,17 @@
'v8_postmortem_support': 'false',
'v8_enable_i18n_support': 'false',
'v8_inspector': 'false',
++ 'v8_host_byteorder': '<!(python <(DEPTH)/tools/get-endianness.py)',
+ 'v8_use_snapshot': 'true',
+ 'v8_use_external_startup_data': 1,
},
@@ -79,7 +102,7 @@ index 7c1bf366a..c441ae04b 100644
['_target_name in ["libuv", "http_parser", "openssl", "openssl-cli", "cares", "node", "zlib"]', {
'msvs_disabled_warnings': [
4003, # not enough actual parameters for macro 'V'
-@@ -128,6 +132,14 @@
+@@ -128,6 +149,20 @@
],
}],
['_target_name=="node"', {
@@ -91,10 +114,27 @@ index 7c1bf366a..c441ae04b 100644
+ 'cflags_cc!': [
+ '-fvisibility-inlines-hidden',
+ ],
++ 'libraries': [
++ '-lz',
++ '-lhttp_parser',
++ '-lcrypto',
++ '-lssl',
++ ],
'include_dirs': [
'<(libchromiumcontent_src_dir)',
'<(libchromiumcontent_src_dir)/third_party/icu/source/common',
-@@ -228,6 +240,21 @@
+@@ -167,7 +202,9 @@
+ '-Wl,--no-whole-archive',
+ ],
+ }, {
+- 'libraries': [ '<@(libchromiumcontent_v8_libraries)' ],
++ 'libraries': [
++ '<@(libchromiumcontent_v8_libraries)',
++ ],
+ }],
+ ],
+ }],
+@@ -228,6 +265,21 @@
}], # OS=="win"
],
}],
@@ -117,7 +157,7 @@ index 7c1bf366a..c441ae04b 100644
'msvs_cygwin_shell': 0, # Strangely setting it to 1 would make building under cygwin fail.
'msvs_disabled_warnings': [
diff --git a/electron.gyp b/electron.gyp
-index b415525b1..4d0185561 100644
+index f82de1e1f..2c398fe75 100644
--- a/electron.gyp
+++ b/electron.gyp
@@ -191,7 +191,7 @@
@@ -129,15 +169,7 @@ index b415525b1..4d0185561 100644
],
}],
],
-@@ -200,7 +200,6 @@
- 'files': [
- '<@(copied_libraries)',
- '<(libchromiumcontent_dir)/locales',
-- '<(libchromiumcontent_dir)/icudtl.dat',
- '<(libchromiumcontent_dir)/blink_image_resources_200_percent.pak',
- '<(libchromiumcontent_dir)/content_resources_200_percent.pak',
- '<(libchromiumcontent_dir)/content_shell.pak',
-@@ -245,15 +244,17 @@
+@@ -244,8 +244,8 @@
'<@(lib_sources)',
],
'include_dirs': [
@@ -146,10 +178,8 @@ index b415525b1..4d0185561 100644
+ '.',
'vendor/brightray',
'vendor/native_mate',
-+ # libicu headers shim.
-+ '<(SHARED_INTERMEDIATE_DIR)/shim_headers/icui18n_shim',
-+ '<(SHARED_INTERMEDIATE_DIR)/shim_headers/icuuc_shim',
- # Include atom_natives.h.
+ # libicu headers shim.
+@@ -255,7 +255,6 @@
'<(SHARED_INTERMEDIATE_DIR)',
# Include directories for uv and node.
'vendor/node/src',
@@ -157,7 +187,7 @@ index b415525b1..4d0185561 100644
'vendor/node/deps/uv/include',
# The `node.h` is using `#include"v8.h"`.
'<(libchromiumcontent_src_dir)/v8/include',
-@@ -342,11 +343,12 @@
+@@ -344,11 +343,12 @@
'<@(lib_sources_nss)',
],
'link_settings': {
@@ -171,7 +201,7 @@ index b415525b1..4d0185561 100644
# Make native module dynamic loading work.
'-rdynamic',
],
-@@ -368,6 +370,9 @@
+@@ -370,6 +370,9 @@
{
'target_name': 'js2asar',
'type': 'none',
@@ -181,7 +211,7 @@ index b415525b1..4d0185561 100644
'actions': [
{
'action_name': 'js2asar',
-@@ -389,6 +394,7 @@
+@@ -391,6 +394,7 @@
'action': [
'python',
'tools/js2asar.py',
@@ -189,7 +219,7 @@ index b415525b1..4d0185561 100644
'<@(_outputs)',
'lib',
'<@(_inputs)',
-@@ -399,6 +405,9 @@
+@@ -401,6 +405,9 @@
{
'target_name': 'app2asar',
'type': 'none',
@@ -199,7 +229,7 @@ index b415525b1..4d0185561 100644
'actions': [
{
'action_name': 'app2asar',
-@@ -420,6 +429,7 @@
+@@ -422,6 +429,7 @@
'action': [
'python',
'tools/js2asar.py',
@@ -207,7 +237,7 @@ index b415525b1..4d0185561 100644
'<@(_outputs)',
'default_app',
'<@(_inputs)',
-@@ -445,6 +455,7 @@
+@@ -447,6 +455,7 @@
'dependencies': [
# depend on this target to ensure the '<(js2c_input_dir)' is created
'atom_js2c_copy',
@@ -215,7 +245,7 @@ index b415525b1..4d0185561 100644
],
'variables': {
'sandbox_args': [
-@@ -474,11 +485,9 @@
+@@ -476,11 +485,9 @@
'<(js2c_input_dir)/preload_bundle.js',
],
'action': [
@@ -230,7 +260,7 @@ index b415525b1..4d0185561 100644
'<@(sandbox_args)',
'-o',
'<@(_outputs)',
-@@ -493,12 +502,11 @@
+@@ -495,12 +502,11 @@
'<(js2c_input_dir)/isolated_bundle.js',
],
'action': [
@@ -247,7 +277,7 @@ index b415525b1..4d0185561 100644
'-o',
'<@(_outputs)',
],
-@@ -533,6 +541,42 @@
+@@ -535,6 +541,42 @@
}
],
}, # target atom_js2c
@@ -507,6 +537,20 @@ index adad1751e..ca7686893 100755
def safe_mkdir(path):
+diff --git a/tools/list-browserify-deps.py b/tools/list-browserify-deps.py
+index c25007d2a..bbd921bc6 100755
+--- a/tools/list-browserify-deps.py
++++ b/tools/list-browserify-deps.py
+@@ -9,7 +9,8 @@ BROWSERIFY = os.path.join(SOURCE_ROOT, 'node_modules', '.bin', 'browserify')
+ if sys.platform == 'win32':
+ BROWSERIFY += '.cmd'
+
+-deps = subprocess.check_output([BROWSERIFY, '--list'] + sys.argv[1:])
++deps = subprocess.check_output([BROWSERIFY, '--list'] + sys.argv[1:],
++ universal_newlines=True)
+ for dep in deps.split('\n'):
+ if dep:
+ dep = os.path.relpath(dep, SOURCE_ROOT)
--
-2.14.1
+2.14.3
diff --git a/dev-util/electron/files/electron-system-icu-r0.patch b/dev-util/electron/files/electron-system-icu-r0.patch
new file mode 100644
index 000000000000..859e351c9060
--- /dev/null
+++ b/dev-util/electron/files/electron-system-icu-r0.patch
@@ -0,0 +1,34 @@
+From 065c936e74d629b51f5258fb3b58899bd5857b53 Mon Sep 17 00:00:00 2001
+From: Elvis Pranskevichus <elvis@magic.io>
+Date: Sun, 29 Oct 2017 16:38:40 -0400
+Subject: [PATCH] system-icu support
+
+---
+ electron.gyp | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/electron.gyp b/electron.gyp
+index 43f3ffb51..2c398fe75 100644
+--- a/electron.gyp
++++ b/electron.gyp
+@@ -200,7 +200,6 @@
+ 'files': [
+ '<@(copied_libraries)',
+ '<(libchromiumcontent_dir)/locales',
+- '<(libchromiumcontent_dir)/icudtl.dat',
+ '<(libchromiumcontent_dir)/blink_image_resources_200_percent.pak',
+ '<(libchromiumcontent_dir)/content_resources_200_percent.pak',
+ '<(libchromiumcontent_dir)/content_shell.pak',
+@@ -249,6 +248,9 @@
+ '.',
+ 'vendor/brightray',
+ 'vendor/native_mate',
++ # libicu headers shim.
++ '<(SHARED_INTERMEDIATE_DIR)/shim_headers/icui18n_shim',
++ '<(SHARED_INTERMEDIATE_DIR)/shim_headers/icuuc_shim',
+ # Include atom_natives.h.
+ '<(SHARED_INTERMEDIATE_DIR)',
+ # Include directories for uv and node.
+--
+2.14.3
+