93 Commits

Author SHA1 Message Date
ManchildProductions 28cd9f3df7 Update UXP to version from palemoon-29.4.1-source.tar.xz 2021-09-17 14:43:35 -04:00
Moonchild 738448aa0d [no issue] Replace PurpleBlock with SegmentedVector to reduce indirect memory
accesses when calling suspect

Improves overall memory performance.
Also prerequisite for further work on #1677.
2021-07-23 15:29:24 +00:00
Moonchild 1fe9c19305 Issue #1751 - Remove Mac code behind MOZ_WIDGET_TOOLKIT == 'cocoa' 2021-06-21 17:52:42 +00:00
Moonchild c921ad59d5 Issue #1772 - Stop using legacy code page conversion for file paths on Linux.
OS.File already only supports UTF-8 paths on non-Windows systems, so this change
makes our different ways of accessing file paths consistent with each other.
This should prevent unexpected crashes in glibc that expect UTF-8.

This resolves #1772.
2021-05-14 12:25:57 +00:00
Moonchild 1bf0734a72 Issue #1751 -- Remove XP_MACOSX conditionals and support files from /xpcom 2021-05-03 11:35:41 +00:00
Moonchild 3d671e4275 Issue #1751 -- Remove XP_DARWIN 2021-05-02 07:10:18 +00:00
Moonchild 56da7e2747 Issue #1751 -- Remove XP_IOS 2021-05-01 07:15:13 +00:00
Brian Smith b1ac886a98 Issue #1690 - Part 1: Fix MacOS version detection above 10.15.
Changes based on Mozilla bug 1616404 but supporting back to 10.7.
2020-11-23 08:18:34 -06:00
Moonchild 887fface56 [xpcom] Don't use realloc for shrinking nsTArrays when allowRealloc is false.
The original patch handled the grow case but not the shrink case. When the
current and new allocation sizes are in different size classes, jemalloc's
realloc will move the allocation when shrinking, not just truncate the existing
one.

Based on work by Jon Coppeard.
2020-11-19 17:48:59 +00:00
David Major bd061ac043 [xpcom] Fix GetWindowsFolder storage 2020-11-18 22:21:22 +00:00
Moonchild 4a42352e64 Issue #1656 - Part 8: Devtools and misc. 2020-09-24 08:10:23 +00:00
Moonchild d5a2c45aad Issue #1656 - Part 6: Clean up the build files 2020-09-23 15:52:00 +00:00
Moonchild 7523b9ea04 Issue #1656 - Part 4: Manual cleanup 2020-09-23 15:37:46 +00:00
Moonchild 18ea98f7a9 Issue #1656 - Part 4: Tackle *.idl, *.css, *.ipdlh, *.webidl, *.cc 2020-09-23 15:24:52 +00:00
Moonchild a680bdc637 Issue #1656 - Part 1: Nuke most vim config lines in the tree.
Since these are just interpreted comments, there's 0 impact on actual code.
This removes all lines that match /* vim: set(.*)tw=80: */ with S&R -- there are
a few others scattered around which will be removed manually in a second part.
2020-09-23 13:55:00 +00:00
Gaming4JC 766ceb5d92 Issue #618 - Clear the module map - Debug Followup
An assertion was added to dom/script/ScriptLoader.cpp but fails to compile on debug builds due it not being included in the namespace.

Ref: BZ 1529203
2020-09-13 19:32:56 -04:00
Andrea Marchesini eb845c094f [xpcom] Make Base64 compatible with ReadSegments() with small buffers. 2020-07-29 10:52:30 +00:00
Jiaxun Yang ec7269ea5c Bug 1394286 - mips64: fix error correction about stackpointer within function _NS_InvokeByIndex
Tag: #1542
2020-05-14 16:31:55 +08:00
Matt A. Tobin 32e8155127 Bug 1372829 - Part 2: mozilla::EditorBase should cache raw pointer of nsISelectionController and nsIDocument with nsWeakPtr
Tag #1375
2020-04-17 05:47:12 -04:00
JMadgwick f7c9359b2a Issue #1471 - Fix building on sparc64 Linux
Correct various pre-processor defines for sparc64 and in mozjemalloc use the JS arm64 allocator on Linux/sparc64.
This corrects build problems opn Linux sparc64 and is in line with bugzilla bug #1275204.
2020-03-09 20:55:13 +00:00
Matt A. Tobin 65b37410ca Revert "Issue #190 - Part 1: Remove XP_IOS conditional code"
This reverts commit 6a3d5769d0.
2020-02-28 18:00:45 -05:00
Matt A. Tobin 6a3d5769d0 Issue #190 - Part 1: Remove XP_IOS conditional code 2020-02-28 17:58:46 -05:00
Matt A. Tobin c895d35a7a Issue #1053 - Remove android support from xpcom/threads/nsThread.cpp
Forgot to save..
2020-02-22 19:04:51 -05:00
Matt A. Tobin 69ed4e4b4e Issue #1053 - Remove android support from XPCOM 2020-02-22 19:03:00 -05:00
Gaming4JC 2077cdb41e Bug 1406922 - Make CycleCollectedJSContext to handle microtasks and make MutationObserver to use them
Tag UXP Issue #1344
2020-01-26 15:50:50 -05:00
Gaming4JC 43a8113072 Bug 1405821 - Move microtask handling to CycleCollectedJSContext
Tag UXP Issue #1344
2020-01-26 15:50:49 -05:00
wolfbeast 0257b657d2 Issue #1319 - Enable promise debugging only in DEBUG builds. 2020-01-14 14:44:13 +01:00
wolfbeast 4a038e2b4b Issue #1319 - Disable MOZ_LOGGING in production builds.
This makes it only enabled in debug builds, instead, where logging
would be most useful.
2020-01-14 13:35:03 +01:00
wolfbeast 6d342dbab9 Issue #1319 - Remove stderr_to_file.
This local-debug function is only useful for Android to work around
issues with logspewing and should never be in production builds anyway.
2020-01-14 13:23:39 +01:00
wolfbeast fb96b43b5f Issue #1322 - Part 1: Remove the DOM Promise guts.
This removes all the parts guarded by SPIDERMONKEY_PROMISE
2019-12-19 01:35:24 +01:00
athenian200 a9dc528a4a Fix nits.
I hope this addresses everything.
2019-10-31 19:35:03 -05:00
athenian200 687a798e6d MoonchildProductions#1251 - Part 27: Fix ifdef style.
This should do it for all the commits to files I changed, but while I'm in here I could probably go ahead and turn ALL the singular if defined statements into ifdef statements by using grep/find on the tree. On the other hand, perhaps we should do that as a separate issue so that this doesn't become a case of scope creep.
2019-10-21 04:53:45 -05:00
athenian200 2f4488521d MoonchildProductions#1251 - Part 23: Allow AMD64 build to work.
https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Build_Instructions/Compiling_32-bit_Firefox_on_a_Linux_64-bit_OS

Setting this up turned out to be easier than I thought it would be. All I had to do was apply these instructions in reverse and add the following to my .mozconfig file:

CC="gcc -m64"
CXX="g++ -m64"
AS="gas --64"
ac_add_options --target=x86_64-pc-solaris2.11
export PKG_CONFIG_PATH=/usr/lib/amd64/pkgconfig
ac_add_options --libdir=/usr/lib/amd64
ac_add_options --x-libraries=/usr/lib/amd64

Most of these changes were fairly trivial, just requiring me to make a few of the changes I made earlier conditional on a 32-bit build. The biggest challenge was figuring out why the JavaScript engine triggered a segfault everytime it tried to allocate memory. But this patch fixes it:

https://github.com/OpenIndiana/oi-userland/blob/oi/hipster/components/web/firefox/patches/patch-js_src_gc_Memory.cpp.patch

Turns out that Solaris on AMD64 handles memory management in a fairly unusual way with a segmented memory model, but it's not that different from what we see on other 64-bit processors. In fact, I saw a SPARC crash for a similar reason, and noticed that it looked just like mine except the numbers in the first segment were reversed. Having played around with hex editors before, I had a feeling I might be dealing with a little-endian version of a big-endian problem, but I didn't expect that knowledge to actually yield an easy solution.

https://bugzilla.mozilla.org/show_bug.cgi?id=577056

https://www.oracle.com/technetwork/server-storage/solaris10/solaris-memory-135224.html

As far as I can tell, this was the last barrier to an AMD64 Solaris build of Pale Moon.
2019-10-21 04:53:44 -05:00
athenian200 575f51a27d Fix a bunch of dumb typos and omissions. 2019-10-21 04:53:43 -05:00
athenian200 4105ebb6ed MoonchildProductions#1251 - Part 4: Core build system changes, lots of libevent/IPC junk.
This is mostly ifdefs, but as you can see, Solaris is actually a lot like Linux. They're both more SysV than BSD at core, and most of the differences have more to do with Solaris not using glibc than anything else.

I still need to audit a lot of these changes and understand why they're needed and what the alternative approaches are. After this patch, most of the core functionality needed to build Solaris is here.
2019-10-21 04:53:39 -05:00
athenian200 64e03d0149 MoonchildProductions#1251 - Part 3: Finally end the long tradition of casting getpid() to int.
https://bugzilla.mozilla.org/show_bug.cgi?id=535106
https://bugzilla.mozilla.org/show_bug.cgi?id=1359841

Like many parts of the busted Solaris support, this one has its origins in the pre-Firefox days. Bug 535106, another Mozilla suite bug. It keeps coming up because the core issue is never addressed, the fact that nsTSubstring doesn't know how to handle pid_t. I think the explicit cast to int is a band-aid they use because they know if they touch that substring header file to make it handle pid_t, they'll probably be asked to fix all the other problems with it. I honestly think it just works by accident on other platforms because it's implicitly cast to signed or unsigned int, even though the POSIX standard says pid_t can be either long or int, and work as either a signed or unsigned integer. Whatever the case may be, it's handled better on Solaris now than it was.

Ironically enough, the main point of having pid_t rather than just having pids be int or something is to hide this little implementation detail so you can just use pid_t for the return type in portable code without having to worry about what it is on a specific platform. The unfortunate way Mozilla implemented string functions turns that on its head and makes the good things about pid_t into liabilities rather than assets.
2019-10-21 04:53:39 -05:00
athenian200 afc187cc3f MoonchildProductions#1251 - Part 1: Restore initial Solaris support, fixed up.
Compared with what Pale Moon had for Solaris originally, this is mostly the same zero point I started patching from, but I've made the following changes here after reviewing all this initial code I never looked at closely before.

1. In package-manifest.in for both Basilisk and Pale Moon, I've made the SPARC code for libfreebl not interefere with the x86 code, use the proper build flags, and also updated it to allow a SPARC64 build which is more likely to be used than the 32-bit SPARC code we had there.

2. See Mozilla bug #832272 and the old rules.mk patch from around Firefox 30 in oracle/solaris-userland. I believe they screwed up NSINSTALL on Solaris when they were trying to streamline the NSS buildsystem, because they started having unexplained issues with it around that time after Firefox 22 that they never properly resolved until Mozilla began building NSS with gyp files. I'm actually not even sure how relevant the thing they broke actually is to Solaris at this point, bug 665509 is so old it predates Firefox itself and goes back to the Mozilla suite days. I believe $(INSTALL) -t was wrong, and they meant $(NSINSTALL) -t because that makes more sense and is closer to what was there originally. It's what they have for WINNT, and it's possible a fix more like that could serve for Solaris as well. Alternatively, we could get rid of all these half-broken Makefiles and start building NSS with gyp files like Mozilla did.

3. I've completely cut out support for the Sun compiler and taken into account the reality that everyone builds Firefox (and therefore its forks) with GCC now on Solaris. This alone helped clean up a lot of the uglier parts of the code.

4. I've updated all remaining SOLARIS build flags to the newer XP_SOLARIS, because the SOLARIS flag is no longer set when building Solaris.

5. I've confirmed the workaround in gtxFontconfigFonts.cpp is no longer necessary. The Solaris people got impatient about implementing a half-baked patch for a fontconfig feature that wasn't ready yet back in 2009, and somehow convinced Mozilla to patch their software to work around it when really they should have just fixed or removed their broken fontconfig patch. The feature they wanted has since been implemented properly, and no version of Solaris still uses the broken patch that required this fix. If anyone had ever properly audited this code, it would have been removed a long time ago.
2019-10-21 04:53:39 -05:00
Nathan Froyd 4266966eee Kill newly-spawned threads if we're shutting down. 2019-09-04 17:55:04 +02:00
wolfbeast 32e6b0f471 Revert "Treat *.jnlp as an executable class file, like *.jar"
Rationale: This was a Mozilla oversight and/or error.
This change has caused harm and is causing users to switch back to
Chrome, Safari or Edge for their WebStart needs.

JNLP is not an executable and should not be treated as such. JNLP should
be treated the same as any (e.g. Word) document and allowed to be opened
with the designated program.
A JNLP file will not cause execution on a system unless it has a valid
signature, and the user explicitly authorizes the launching based on
information provided by the signature. Moreover, there will even be a
check by the Java environment to see if the Java runtime (if there is
one) is current, and prompt the user to update if required.

This reverts commit 21495c5897 and
modifies ApplicationReputation.cpp to keep the list in sync (was a
discrepancy before).
2019-06-28 19:57:38 +02:00
wolfbeast 21495c5897 Treat *.jnlp as an executable class file, like *.jar 2019-05-29 11:53:04 +02:00
Moonchild 1f239f8179 Merge pull request #1121 from win7-7/nsHtml5PortabilitylocalEqualsBuffer-pr
Use memcmp in nsHtml5Portability::localEqualsBuffer
2019-05-25 15:53:41 +00:00
win7-7 733f6b770f use memcmp for nsIAtom Equals to improve performance xpcom/ds
issue #1113 Use memcmp and not slower string Equals in nsHtml5Portability::localEqualsBuffer
2019-05-25 18:02:40 +03:00
wolfbeast 57e5655e8a Avoid some useless ForgetSkippable handling while we're already dealing
with snow-white objects.
2019-05-25 16:08:16 +02:00
win7-7 58ff91d97e remove unnecessary spaces 2019-05-24 14:02:32 +03:00
win7-7 ddff63b2d6 add main thread only cache for nsIAtoms to speed up atomization xpcom/ds
add main thread only cache for nsIAtoms to speed up atomization
2019-05-24 13:58:13 +03:00
wolfbeast bfc9772806 Unhook CR exception handler.
Tag #20
2019-04-01 13:04:33 +02:00
wolfbeast 5d409fdca9 Remove AIX 1st party code OS checks, part 1
Issue #186
2019-03-31 18:43:10 +02:00
wolfbeast 6b968b13d9 Issue #187: Remove solaris 1st party code OS checks. 2019-03-30 20:03:33 +01:00
wolfbeast 25779d371c Issue #187: Remove solaris conditional code. 2019-03-30 19:10:17 +01:00
wolfbeast 34939b2d17 Revert "Guard against re-entrancy in nsStringStream."
This reverts commit 411919cca7.
2019-03-22 14:06:07 +01:00