Граф коммитов

45 Коммитов

Автор SHA1 Сообщение Дата
Henri Sivonen 3edc601325 Bug 1402247 - Use encoding_rs for XPCOM string encoding conversions. r=Nika,erahm,froydnj.
Correctness improvements:

 * UTF errors are handled safely per spec instead of dangerously truncating
   strings.

 * There are fewer converter implementations.

Performance improvements:

 * The old code did exact buffer length math, which meant doing UTF math twice
   on each input string (once for length calculation and another time for
   conversion). Exact length math is more complicated when handling errors
   properly, which the old code didn't do. The new code does UTF math on the
   string content only once (when converting) but risks allocating more than
   once. There are heuristics in place to lower the probability of
   reallocation in cases where the double math avoidance isn't enough of a
   saving to absorb an allocation and memcpy.

 * Previously, in UTF-16 <-> UTF-8 conversions, an ASCII prefix was optimized
   but a single non-ASCII code point pessimized the rest of the string. The
   new code tries to get back on the fast ASCII path.

 * UTF-16 to Latin1 conversion guarantees less about handling of out-of-range
   input to eliminate an operation from the inner loop on x86/x86_64.

 * When assigning to a pre-existing string, the new code tries to reuse the
   old buffer instead of first releasing the old buffer and then allocating a
   new one.

 * When reallocating from the new code, the memcpy covers only the data that
   is part of the logical length of the old string instead of memcpying the
   whole capacity. (For old callers old excess memcpy behavior is preserved
   due to bogus callers. See bug 1472113.)

 * UTF-8 strings in XPConnect that are in the Latin1 range are passed to
   SpiderMonkey as Latin1.

New features:

 * Conversion between UTF-8 and Latin1 is added in order to enable faster
   future interop between Rust code (or otherwise UTF-8-using code) and text
   node and SpiderMonkey code that uses Latin1.

MozReview-Commit-ID: JaJuExfILM9
2018-08-14 14:43:42 +03:00
Aaron Klotz 415cd5e05e Bug 1454745: Skeletal bootstrap process; r=mhowell 2018-04-17 13:48:21 -06:00
Chris Peterson 6955347be6 Bug 1330529 - Part 4: Fold nsSetDllDirectory.h into nsWindowsMain.cpp. r=jimm
nsSetDllDirectory.h consists of just one function definition, SanitizeEnvironmentVariables, which is now only called from nsWindowsMain.cpp. nsSetDllDirectory.h used to define its namesake NS_SetDllDirectory, but the function was removed in bug 699247.

Also remove some #includes that are no longer necessary.

MozReview-Commit-ID: E8OsXycdfO8

--HG--
extra : rebase_source : d9e63a50a782ab1fb0fde24646a777b882860fb9
extra : histedit_source : 63c41846db2bb6a1def03c343e6f336373f1fba6
2018-02-13 00:52:44 -08:00
Chris Peterson 4c4286f348 Bug 1330529 - Part 3: Protect DLL loads in wmain instead of waiting until PluginProcessChild::Init. r=jimm
Removing #define XRE_DONT_PROTECT_DLL_LOAD from plugin-container.cpp and xpcshell.cpp allows the #included nsWindowsWMain.cpp to protect DLL loads much earlier in the plugin process startup.

MozReview-Commit-ID: HbgyfvljvFs

--HG--
extra : rebase_source : dccdabb2e5bee4472d5aef9400a58cb0e397c112
extra : histedit_source : da248fc6fbdf96f30979f3a0396aefcf4bfcd5d9
2018-02-02 22:53:34 -08:00
Masatoshi Kimura a1d349bfab Bug 1426898 - Stop including Char16.h everywhere. r=Waldo
We had to force-include Char16.h to simulate char16_t on older MSVC versions.
But it is no longer the case. We should not rebuild the world whenever we
touch this file.

MozReview-Commit-ID: 1XY7tQD8LoK

--HG--
extra : rebase_source : a08ccfc9b6a4abf90f6f8b97a42079865724c9ec
2017-12-23 00:53:12 +09:00
Marco Castelluccio c34f5eafdb Bug 1403218 - Remove no longer used XRE_DONT_SUPPORT_XPSP2 definition. r=glandium
--HG--
extra : rebase_source : 487c724a6a14a4c9b9ee6c0438eda64b0d3ab9ff
2017-09-26 17:48:26 +02:00
Chris Peterson c434bad38c Bug 1279769 - Remove VS2013 workaround for crash on non-AVX2 processors. r=froydnj 2016-06-26 16:07:44 -07:00
Bob Owen 2447fbb7fa Bug 1035125 Part 1: Back out changeset 1910714b56c6 and associated subsequent changes. r=bsmedberg
The original changeset that is being backed out had comment:
Bug 1023941 - Part 5: Loader hook to redirect the missing import.

The changes made in bug 1023941 were to work around the fact that with VS2013, msvcr120.dll imports kernel32!GetLogicalProcessorInformation, which is not available on Windows XP SP2.
In VS2015, the GetLogicalProcessorInformation requirement has moved into concrt140.dll (concurrency runtime), which we don't use.
So, now that our build infra is building with VS2015, we can remove the hooking and static runtime linking required to get the VS2013 fix to work.

In addition we need to do that to be able us to link the Chromium sandbox code into firefox.exe and get it to build and run with both VS2015 and VS2013.

MozReview-Commit-ID: 1tlXaYJ8dHH

--HG--
extra : rebase_source : 49b216e34fc5c77af96df1f67ee44c46d5368bfe
2016-05-15 16:23:56 +01:00
David Major feedc37548 Bug 1160148: Also block AVX2 in Win7RTM, and move the code to mozglue. r=froydnj
--HG--
extra : rebase_source : b956777750a2fea7dc6f436e8540bec782ce4d2a
2015-05-11 16:12:45 -04:00
David Major b1551721e5 Bug 1160148: Disable CRT use of FMA3 on non-AVX2 processors. r=froydnj 2015-05-06 16:12:09 -04:00
Kartikaya Gupta cd5b55f8d6 Bug 1039866 - Rip out a bunch of metro-only code. r=jimm,gavin,rstrong 2015-04-23 15:10:30 -04:00
Jacek Caban e2095db058 Bug 1102815 - mingw builds assert in WindowsCrtPatch.h. r=glandium
--HG--
extra : rebase_source : d33a9be405982bc08ab6a762b4e5df9c013a3856
2014-11-25 12:43:05 +01:00
David Major f19bceb6be Bug 1080388 - Disable CRT assertions on startup related to XP static linking when MOZ_METRO is defined. r=jimm 2014-10-23 14:28:20 -05:00
David Major 36c74581b8 Bug 1023941 - Part 5: Loader hook to redirect the missing import. r=bsmedberg
--HG--
extra : rebase_source : 7cf2e857f51dcfcc95bb806d49ef13b794f5ba5b
2014-08-28 14:53:38 +12:00
Jacek Caban ae12308871 Bug 944913 - Fixed char16_t/wchar_t mismatch in tollkit/. r=ehsan
--HG--
extra : rebase_source : c33427dd7c1c2db3d2741b8c2e0d1b4a0359a0a4
2013-12-03 16:07:22 +01:00
Birunthan Mohanathas b2658eb131 Bug 784739 - Switch from NULL to nullptr in toolkit/; r=ehsan 2013-10-10 16:36:42 -04:00
Kyle Huey 35610fce7c Bug 792625: Fix xpcshell to accept non-ASCII command line arguments on Windows. r=bsmedberg 2012-09-30 09:45:05 -07:00
Mike Hommey d49d993f19 Bug 658848 - Clean up XRE_WANT_DLL_BLOCKLIST. r=bsmedberg 2012-05-22 08:46:17 +02:00
Gervase Markham 82ff7027aa Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
Masatoshi Kimura 651eabedd7 Bug 699247 - Remove Win2K related code. r=jimm, sr=neil 2012-02-23 08:53:55 -06:00
Ed Morley 91422f00de Backout f1acc52a59da (bug 719983) & 6771bd53e267 (bug 699247) for 30% WinXp Ts regression 2012-02-08 21:04:21 +00:00
Masatoshi Kimura b40c031d6c Bug 699247 - Say goodbye to Win2k related code. r=jimm, sr=neil 2012-02-08 10:00:45 -06:00
Mike Hommey ccfa7894df Bug 552864 part 1 - Move DLL blocklist in XRE, and inline NS_SetDllDirectory and environment sanitization, which now needs to be called manually. r=ehsan,r=bsmedberg 2011-05-22 08:22:27 +02:00
Matt Brubeck e3a9a86a79 Back out 6b23b52e68d6 - e92f98e8a335 (bug 632404, 552864, 658995) because of Tp4 regression. 2011-06-15 09:00:28 -07:00
Mike Hommey f17990f381 Bug 552864 part 1 - Move DLL blocklist in XRE, and inline NS_SetDllDirectory and environment sanitization, which now needs to be called manually. r=ehsan,r=bsmedberg 2011-05-22 08:22:27 +02:00
Taras Glek 21801c8ad8 bug 627591: backout preload in preparation for better one. 2011-05-20 11:32:01 -07:00
Taras Glek 2322d30923 Bug 627591: preload (xul|mozjs).dll on Windows when prefetch is off r=shaver 2011-05-06 12:57:36 -07:00
Ed Morley 1dc65abc0d Bug 652445 - Remove WinCE code (incl Faststart & nsSplashScreenWin) from toolkit; r=dtownsend 2011-04-29 12:38:26 +02:00
Makoto Kato c2c0ea13b6 Bug 604302 - Windows DLL blocklist support for Windows x64. r=vlad 2011-04-25 10:02:07 +09:00
Jacek Caban 1ea488379f Bug 612258 - xulrunner compilation failure after landing bug 603679 r=khuey a=NPOTB 2010-11-15 15:19:57 +00:00
Ehsan Akhgari f401254d50 Bug 603679 - Fix a regression causing the Shockwave plugin to fail to load; r=bsmedberg a=blocking-beta8+ 2010-11-04 14:45:51 -04:00
Ehsan Akhgari 2fdb64b721 Bug 286382 - Don't load DLLs from the current directory; r=bsmedberg a=blocking-betaN+ 2010-09-28 20:33:43 -04:00
Dave Townsend 826e429c31 Backed out bug 286382 to fix bug 584613 2010-08-06 14:06:28 -07:00
Ehsan Akhgari a0d1676ebc Bug 286382 - Don't load DLLs from the current directory; r=vlad
--HG--
extra : rebase_source : 85d7c0c4ced3faa9c797c38620afd5839f06feea
2010-06-29 20:15:11 -04:00
Vladimir Vukicevic afe0a51113 b=524904, add support for generic Windows DLL blocklist; r=shaver 2009-11-03 22:35:20 -08:00
Jim Mathies f90e03b799 back out changeset 41c421f97869 2009-11-04 11:02:59 -06:00
Vladimir Vukicevic dececb8f4e b=524904, add support for generic Windows DLL blocklist; r=shaver 2009-11-03 22:35:20 -08:00
Hiroyuki Ikezoe c31dd2be09 bug 485031 - WinCE Crash on First Startup (or command line environment passing) r=bsmedberg 2009-04-13 11:18:43 -04:00
Brad Lassey eaa8b5de3a bug 465874 - WinCE Environment Variables Have To Be Passed On Command Line r=bsmedberg 2009-02-05 15:50:44 -08:00
reed@reedloden.com b5945e6835 Whitespace fixes 2008-02-10 00:47:09 -08:00
reed@reedloden.com 18d31ccb76 Bug 411826 - "Mingw build error: undefined reference to `WinMain@16'" (Use CommandLineToArgvW) [p=mook.moz+mozbz@gmail.com (Mook) r=bsmedberg a1.9=schrep] 2008-02-10 00:46:13 -08:00
reed@reedloden.com 5a8dd66e26 Bug 413599 - "debug build crashes on exit with memory corruption" [p=a@totic.org (Aleks Totic) r=bsmedberg a1.9=schrep] 2008-02-06 13:53:43 -08:00
benjamin@smedbergs.us a1d42219e2 Bug 410610 - Can't open a local HTML file that has accents (special unicode characters) in its filename, r=luser+Neil 2008-01-07 08:38:12 -08:00
dwitte@stanford.edu 84e6172062 update copy_string() to the single-fragment string world, and optimize write() to not return a value. b=282083, r+sr=jst, a=schrep 2008-01-03 16:07:06 -08:00
benjamin@smedbergs.us fd5b74bf13 Bug 396052 - Firefox fails to start when run from a directory with non-native characters, r=luser sr=neil 2007-12-31 07:15:43 -08:00