Compare commits
301
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
98fe8b0ccb | ||
|
|
519030e688 | ||
|
|
b9531d8e11 | ||
|
|
7605f4b0f8 | ||
|
|
ab0e18135f | ||
|
|
e883ac54e9 | ||
|
|
9cb65e8a77 | ||
|
|
3a3152d54b | ||
|
|
f174801b64 | ||
|
|
3caceeb539 | ||
|
|
216189e6f7 | ||
|
|
bbae11cdd9 | ||
|
|
917447df6e | ||
|
|
244c8ef1f7 | ||
|
|
e1b6493747 | ||
|
|
4e225fc7d1 | ||
|
|
683b1bedea | ||
|
|
11519ee6d2 | ||
|
|
8a343284d9 | ||
|
|
5a34fb5e1d | ||
|
|
16c8dff724 | ||
|
|
3595b9eecf | ||
|
|
594cbca6d1 | ||
|
|
a4ba260904 | ||
|
|
4a8c186eea | ||
|
|
8ff6e8c8a2 | ||
|
|
3652cd0f99 | ||
|
|
b738ccc61b | ||
|
|
1c3a9a40e5 | ||
|
|
0a33733505 | ||
|
|
691878e20f | ||
|
|
bf1fa93b91 | ||
|
|
0ac7481d2e | ||
|
|
168bb31e4f | ||
|
|
ca04b37910 | ||
|
|
f3b26f64fc | ||
|
|
99d23484bb | ||
|
|
376bc050a6 | ||
|
|
9258382b0d | ||
|
|
b6a703907e | ||
|
|
da42871b0e | ||
|
|
c55433ee03 | ||
|
|
d0a2389b43 | ||
|
|
796a14e116 | ||
|
|
ba6e4753b7 | ||
|
|
6d3d69f644 | ||
|
|
fce3132fe8 | ||
|
|
a7da3cf52b | ||
|
|
f5316668a3 | ||
|
|
dc687dbc0b | ||
|
|
216aa2cada | ||
|
|
9d96ad90dd | ||
|
|
b064c95231 | ||
|
|
11eb1f57f4 | ||
|
|
052cb18fff | ||
|
|
d306fe61c5 | ||
|
|
7859a0d693 | ||
|
|
c5d9e1f973 | ||
|
|
2e12bda342 | ||
|
|
9755cd617d | ||
|
|
abaf4d9fb4 | ||
|
|
ae6f407177 | ||
|
|
2a44476795 | ||
|
|
755cf4c7d0 | ||
|
|
47f26a67f4 | ||
|
|
e8aa76713a | ||
|
|
e6ffc4bdb7 | ||
|
|
90bbe7536d | ||
|
|
140750e4e8 | ||
|
|
f2e089d51b | ||
|
|
e1d0ac30ac | ||
|
|
9e8adc25a4 | ||
|
|
7f66e8946a | ||
|
|
c75b8ec714 | ||
|
|
4250d93166 | ||
|
|
37250226d5 | ||
|
|
802a4cfefe | ||
|
|
5641a6d574 | ||
|
|
88d2480356 | ||
|
|
fcb4b997d0 | ||
|
|
79964767f5 | ||
|
|
a4a8d082a3 | ||
|
|
adce88de95 | ||
|
|
974d6ca889 | ||
|
|
e08a4ad1c8 | ||
|
|
39dac57259 | ||
|
|
c2d9ab62f3 | ||
|
|
b9e692af05 | ||
|
|
871e57fdd6 | ||
|
|
03530de64f | ||
|
|
4730da5b27 | ||
|
|
3cb245b749 | ||
|
|
9f5529d1e7 | ||
|
|
26c888208a | ||
|
|
9a52b3b852 | ||
|
|
96afb5250d | ||
|
|
b93afb1ba7 | ||
|
|
277f2116b6 | ||
|
|
d270404436 | ||
|
|
3bec218684 | ||
|
|
6daff43b61 | ||
|
|
eedf9f5ebf | ||
|
|
049dae86d2 | ||
|
|
65ba3cac58 | ||
|
|
1b8788aecb | ||
|
|
747632bd64 | ||
|
|
02327fa745 | ||
|
|
b470422d5a | ||
|
|
449d530a30 | ||
|
|
8bd941d4e3 | ||
|
|
7172fc72a3 | ||
|
|
b977981df6 | ||
|
|
9dc65422ba | ||
|
|
45e8e98031 | ||
|
|
965232ab2f | ||
|
|
980ca14602 | ||
|
|
02519e8575 | ||
|
|
e003547dc5 | ||
|
|
56f8375338 | ||
|
|
2407845ec1 | ||
|
|
3f09b298b0 | ||
|
|
c27830f35c | ||
|
|
99bad1726e | ||
|
|
d86349716a | ||
|
|
64a7c9e2d2 | ||
|
|
514ff21cba | ||
|
|
edb5796d58 | ||
|
|
c23e3b25f8 | ||
|
|
e360caa1a2 | ||
|
|
9eeaeff77b | ||
|
|
a435374873 | ||
|
|
04cfc091da | ||
|
|
b23e7b61c6 | ||
|
|
69b4e77751 | ||
|
|
5657b5c53b | ||
|
|
1037746d00 | ||
|
|
a060401264 | ||
|
|
4e26fc1844 | ||
|
|
2645f9b944 | ||
|
|
88ce149033 | ||
|
|
09655ad6d8 | ||
|
|
4fd0b98c2c | ||
|
|
894b33e53a | ||
|
|
236d425993 | ||
|
|
899e14e945 | ||
|
|
03fda9f0f3 | ||
|
|
3aae828871 | ||
|
|
e7514afc7c | ||
|
|
4adf0d09f7 | ||
|
|
22d0b88e37 | ||
|
|
f7388678bd | ||
|
|
b45f5c435e | ||
|
|
3c73c0805c | ||
|
|
db93b005f5 | ||
|
|
d2aaa74f31 | ||
|
|
702cf42544 | ||
|
|
79a9dc2479 | ||
|
|
ddcc3deddd | ||
|
|
f3b148844a | ||
|
|
51d5d162b7 | ||
|
|
94494805da | ||
|
|
5c7109182c | ||
|
|
68e873ada7 | ||
|
|
a5b05528fe | ||
|
|
ce88d82f4a | ||
|
|
61d3aa9be2 | ||
|
|
a078d9f976 | ||
|
|
3ed2b7a7cc | ||
|
|
9816a810e6 | ||
|
|
9a8068ea3f | ||
|
|
dcd9bbb717 | ||
|
|
ecc0a40688 | ||
|
|
8f40737fc7 | ||
|
|
e7841ab5d7 | ||
|
|
dba09fa5c4 | ||
|
|
afe2b7fa5a | ||
|
|
acaec3f389 | ||
|
|
d2083edba2 | ||
|
|
1ebcc1d7e5 | ||
|
|
cbb61ab832 | ||
|
|
cf288a1847 | ||
|
|
0d1eea2ebf | ||
|
|
af69cb07db | ||
|
|
dc4695406f | ||
|
|
c22a493144 | ||
|
|
d20ca24a07 | ||
|
|
b2ca17a298 | ||
|
|
eb70e6e3d0 | ||
|
|
32ead79529 | ||
|
|
3e59235162 | ||
|
|
7494866cb5 | ||
|
|
19bf63b0ee | ||
|
|
8b539ec9e7 | ||
|
|
ba0011606d | ||
|
|
ec2daa8dc9 | ||
|
|
44c169c9be | ||
|
|
57383be95d | ||
|
|
6ef03f136b | ||
|
|
d6bcaa6491 | ||
|
|
92edec6f58 | ||
|
|
2dea4edfd7 | ||
|
|
54cb1b965e | ||
|
|
a6d1dd183d | ||
|
|
da15aa0fdf | ||
|
|
867737dd4b | ||
|
|
36fc5f674e | ||
|
|
7b30664f59 | ||
|
|
ef71f96a8d | ||
|
|
2b99226680 | ||
|
|
2794f0c48c | ||
|
|
2f23073a3a | ||
|
|
496fbaf738 | ||
|
|
85621ee9b3 | ||
|
|
ee6595e6de | ||
|
|
201be4d8fc | ||
|
|
9e586a1d0e | ||
|
|
009c9dd2f8 | ||
|
|
6407f1abd4 | ||
|
|
28f0155307 | ||
|
|
11ede87242 | ||
|
|
3630fec559 | ||
|
|
d062e7311c | ||
|
|
0313ac74fd | ||
|
|
9612c64265 | ||
|
|
c5d570792d | ||
|
|
10c4e73e56 | ||
|
|
c9fd86cb78 | ||
|
|
550d634ff5 | ||
|
|
bbee80fa1c | ||
|
|
8ffe533b3d | ||
|
|
9670bdb685 | ||
|
|
8fa80e2c8d | ||
|
|
a377d1ecd4 | ||
|
|
1ebbb0af03 | ||
|
|
29b13d3523 | ||
|
|
76476ed75b | ||
|
|
84fc500ff2 | ||
|
|
2560dd2514 | ||
|
|
0e2b0db4d7 | ||
|
|
c4f65de9b2 | ||
|
|
e3148b0a25 | ||
|
|
fe6730c219 | ||
|
|
2e44ddb15e | ||
|
|
da74d1f3f3 | ||
|
|
91be118376 | ||
|
|
2258e09d59 | ||
|
|
30ec922d7e | ||
|
|
1000488a5b | ||
|
|
ffe75592e3 | ||
|
|
0084e71953 | ||
|
|
dbeceecde2 | ||
|
|
9fc28c55c3 | ||
|
|
113a825c1f | ||
|
|
419abfb09f | ||
|
|
4e58dab0a1 | ||
|
|
9e42d9ea2f | ||
|
|
377f54f3fe | ||
|
|
62f39d829d | ||
|
|
28971524e4 | ||
|
|
be37269123 | ||
|
|
8acff5cdbe | ||
|
|
11a4ab0982 | ||
|
|
8c41fcd240 | ||
|
|
27f4e60be8 | ||
|
|
aae1baabe9 | ||
|
|
f620afc446 | ||
|
|
456f4a5891 | ||
|
|
84d99e2996 | ||
|
|
e29301f5d0 | ||
|
|
369ad75fc8 | ||
|
|
37e3135bc5 | ||
|
|
259bd2e977 | ||
|
|
0ebdc99757 | ||
|
|
68d3bc54fb | ||
|
|
2109f36dd4 | ||
|
|
58f10adc97 | ||
|
|
05c68a17a0 | ||
|
|
f78958a020 | ||
|
|
bcd6c96aec | ||
|
|
73289f5389 | ||
|
|
4acc0d58cb | ||
|
|
a1c9dd468d | ||
|
|
0a5acb852a | ||
|
|
c8bbebe59d | ||
|
|
fddc35e438 | ||
|
|
7e4efa4e1f | ||
|
|
84b5515a8d | ||
|
|
6b7fa183dd | ||
|
|
a43d59bcbf | ||
|
|
ac6896b599 | ||
|
|
171053d0b2 | ||
|
|
efd88ee999 | ||
|
|
9a74d53315 | ||
|
|
e2a478072a | ||
|
|
cb06cac81d | ||
|
|
c3d92cd338 | ||
|
|
8ae2267eac | ||
|
|
563dc95cdb | ||
|
|
7e59ac9036 | ||
|
|
f1e40aaa5b | ||
|
|
068372c618 |
No files matched your search
@@ -47,6 +47,12 @@ ifndef MOZ_PROFILE_USE
|
||||
# We need to explicitly put BUILD_BACKEND_FILES here otherwise the rule in
|
||||
# rules.mk doesn't run early enough.
|
||||
$(TIERS) binaries:: CLOBBER $(configure_dir)/configure config.status $(BUILD_BACKEND_FILES)
|
||||
|
||||
# While our mozbuild backend has some kind of crazy install_manfests junk to
|
||||
# try and make this not have to happen, we actually want dist/bin to be
|
||||
# completely removed regardless.
|
||||
default alldep all::
|
||||
@$(RM) -r $(DIST)/bin
|
||||
ifndef JS_STANDALONE
|
||||
ifdef COMPILE_ENVIRONMENT
|
||||
$(TIERS) binaries:: $(topsrcdir)/js/src/configure js/src/config.status
|
||||
|
||||
@@ -34,3 +34,6 @@ and other community members.
|
||||
If you fork this repository to perform your own work on it, please consider offering
|
||||
improvement patches upstream to its origin to mutually improve the platform and build
|
||||
a future for XUL.
|
||||
|
||||
## Looking for Pale Moon and Basilisk?
|
||||
As of [`Issue #969`](https://github.com/MoonchildProductions/UXP/issues/969), release versions `28.9.0` and `2020.03.04` respectively, they have been split off into their own dedicated repositories located at [`MoonchildProductions/Pale-Moon`](https://github.com/MoonchildProductions/Pale-Moon) and [`MoonchildProductions/Basilisk`](https://github.com/MoonchildProductions/Basilisk).
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
# Security Policy
|
||||
|
||||
## What is or is not a vulnerability?
|
||||
|
||||
In general, vulnerabilities are those bugs that can actually be exploited to perform malicious tasks.
|
||||
Most _crashes_ are not security vulnerabilities. Although important to fix, they don't inherently cause a problem for the
|
||||
browser's security.
|
||||
|
||||
What should be considered vulnerabilities or security hazards by default:
|
||||
- Use-after-free crashes, since those can potentially be used for remote code execution;
|
||||
- Spoofing issues in the UI;
|
||||
- File security issues, like out-of-bounds access to arbitrary files or locations;
|
||||
- Type confusion issues;
|
||||
- Bypass of security measures like CSP or the various mechanisms around HTTPS.
|
||||
|
||||
Generally not security vulnerabilities:
|
||||
- Null dereferencing crashes;
|
||||
- Malware extensions (but please do report those on the forum in the extensions board!);
|
||||
- Denial-of-service (AKA "evil trap sites")
|
||||
- Browser hangs
|
||||
- Issues with non-standard manual configuration (either at build time or by manipulating about:config directly)
|
||||
|
||||
## Reporting a Vulnerability
|
||||
|
||||
If you find an issue in UXP or the applications it builds on that could impact the security or safety of users please **do not**
|
||||
make an issue on GitHub about it. GitHub does not support restricted viewability for security sensitive bugs.
|
||||
|
||||
If you want to report a security-sensitive issue then please go to the [forum](https://forum.palemoon.org) and report the issue
|
||||
via a **private message** to **Moonchild** (the founder and prime responsible for security issues).
|
||||
The forum's private message system is fully secure since your visits are encrypted and private messages are not available to anyone
|
||||
except the recipient (not even moderators!).
|
||||
|
||||
You will be informed via private message if the vulnerability report is accepted or declined, with reasoning.
|
||||
Security updates occur regularly and are given priority over most other development tasks. In general, they can be solved
|
||||
relatively quickly and will be included in the next point release (third digit if not rolled into a more major one).
|
||||
|
||||
@@ -175,23 +175,17 @@ HTMLTableCellAccessible::Table() const
|
||||
uint32_t
|
||||
HTMLTableCellAccessible::ColIdx() const
|
||||
{
|
||||
nsITableCellLayout* cellLayout = GetCellLayout();
|
||||
NS_ENSURE_TRUE(cellLayout, 0);
|
||||
|
||||
int32_t colIdx = 0;
|
||||
cellLayout->GetColIndex(colIdx);
|
||||
return colIdx > 0 ? static_cast<uint32_t>(colIdx) : 0;
|
||||
nsTableCellFrame* cellFrame = GetCellFrame();
|
||||
NS_ENSURE_TRUE(cellFrame, 0);
|
||||
return cellFrame->ColIndex();
|
||||
}
|
||||
|
||||
uint32_t
|
||||
HTMLTableCellAccessible::RowIdx() const
|
||||
{
|
||||
nsITableCellLayout* cellLayout = GetCellLayout();
|
||||
NS_ENSURE_TRUE(cellLayout, 0);
|
||||
|
||||
int32_t rowIdx = 0;
|
||||
cellLayout->GetRowIndex(rowIdx);
|
||||
return rowIdx > 0 ? static_cast<uint32_t>(rowIdx) : 0;
|
||||
nsTableCellFrame* cellFrame = GetCellFrame();
|
||||
NS_ENSURE_TRUE(cellFrame, 0);
|
||||
return cellFrame->RowIndex();
|
||||
}
|
||||
|
||||
uint32_t
|
||||
@@ -285,6 +279,12 @@ HTMLTableCellAccessible::GetCellLayout() const
|
||||
return do_QueryFrame(mContent->GetPrimaryFrame());
|
||||
}
|
||||
|
||||
nsTableCellFrame*
|
||||
HTMLTableCellAccessible::GetCellFrame() const
|
||||
{
|
||||
return do_QueryFrame(mContent->GetPrimaryFrame());
|
||||
}
|
||||
|
||||
nsresult
|
||||
HTMLTableCellAccessible::GetCellIndexes(int32_t& aRowIdx, int32_t& aColIdx) const
|
||||
{
|
||||
@@ -520,11 +520,9 @@ HTMLTableAccessible::SelectedCellCount()
|
||||
if (!cellFrame || !cellFrame->IsSelected())
|
||||
continue;
|
||||
|
||||
int32_t startRow = -1, startCol = -1;
|
||||
cellFrame->GetRowIndex(startRow);
|
||||
cellFrame->GetColIndex(startCol);
|
||||
if (startRow >= 0 && (uint32_t)startRow == rowIdx &&
|
||||
startCol >= 0 && (uint32_t)startCol == colIdx)
|
||||
uint32_t startRow = cellFrame->RowIndex();
|
||||
uint32_t startCol = cellFrame->ColIndex();
|
||||
if (startRow == rowIdx && startCol == colIdx)
|
||||
count++;
|
||||
}
|
||||
}
|
||||
@@ -570,11 +568,9 @@ HTMLTableAccessible::SelectedCells(nsTArray<Accessible*>* aCells)
|
||||
if (!cellFrame || !cellFrame->IsSelected())
|
||||
continue;
|
||||
|
||||
int32_t startCol = -1, startRow = -1;
|
||||
cellFrame->GetRowIndex(startRow);
|
||||
cellFrame->GetColIndex(startCol);
|
||||
if ((startRow >= 0 && (uint32_t)startRow != rowIdx) ||
|
||||
(startCol >= 0 && (uint32_t)startCol != colIdx))
|
||||
uint32_t startRow = cellFrame->RowIndex();
|
||||
uint32_t startCol = cellFrame->ColIndex();
|
||||
if (startRow != rowIdx || startCol != colIdx)
|
||||
continue;
|
||||
|
||||
Accessible* cell = mDoc->GetAccessible(cellFrame->GetContent());
|
||||
@@ -597,11 +593,9 @@ HTMLTableAccessible::SelectedCellIndices(nsTArray<uint32_t>* aCells)
|
||||
if (!cellFrame || !cellFrame->IsSelected())
|
||||
continue;
|
||||
|
||||
int32_t startRow = -1, startCol = -1;
|
||||
cellFrame->GetColIndex(startCol);
|
||||
cellFrame->GetRowIndex(startRow);
|
||||
if (startRow >= 0 && (uint32_t)startRow == rowIdx &&
|
||||
startCol >= 0 && (uint32_t)startCol == colIdx)
|
||||
uint32_t startCol = cellFrame->ColIndex();
|
||||
uint32_t startRow = cellFrame->RowIndex();
|
||||
if (startRow == rowIdx && startCol == colIdx)
|
||||
aCells->AppendElement(CellIndexAt(rowIdx, colIdx));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include "TableCellAccessible.h"
|
||||
|
||||
class nsITableCellLayout;
|
||||
class nsTableCellFrame;
|
||||
|
||||
namespace mozilla {
|
||||
namespace a11y {
|
||||
@@ -53,6 +54,11 @@ protected:
|
||||
*/
|
||||
nsITableCellLayout* GetCellLayout() const;
|
||||
|
||||
/**
|
||||
* Return the table cell frame.
|
||||
*/
|
||||
nsTableCellFrame* GetCellFrame() const;
|
||||
|
||||
/**
|
||||
* Return row and column indices of the cell.
|
||||
*/
|
||||
|
||||
Vendored
+15
-5
@@ -381,11 +381,14 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
||||
i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
|
||||
eval $set_cc_for_build
|
||||
SUN_ARCH=i386
|
||||
# If there is a compiler, see if it is configured for 64-bit objects.
|
||||
# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
|
||||
# This test works for both compilers.
|
||||
if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
|
||||
if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
|
||||
_ISAINFO=`isainfo -k 2>/dev/null`
|
||||
if [ "$_ISAINFO" = "amd64" ]; then
|
||||
SUN_ARCH=x86_64
|
||||
elif [ "$CC_FOR_BUILD" != no_compiler_found ]; then
|
||||
# If there is a compiler, see if it is configured for 64-bit objects.
|
||||
# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
|
||||
# This test works for both compilers.
|
||||
if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
|
||||
(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
|
||||
grep IS_64BIT_ARCH >/dev/null
|
||||
then
|
||||
@@ -842,6 +845,13 @@ EOF
|
||||
i*:CYGWIN*:*)
|
||||
echo ${UNAME_MACHINE}-pc-cygwin
|
||||
exit ;;
|
||||
*:MINGW32_NT*:*)
|
||||
if [ "$PLATFORM" = "X64" ]; then
|
||||
echo x86_64-pc-mingw32
|
||||
else
|
||||
echo ${UNAME_MACHINE}-pc-mingw32
|
||||
fi
|
||||
exit ;;
|
||||
*:MINGW64*:*)
|
||||
echo ${UNAME_MACHINE}-pc-mingw64
|
||||
exit ;;
|
||||
|
||||
+2
-15
@@ -8,19 +8,6 @@ dnl ICU library, as well as a few other things.
|
||||
AC_DEFUN([MOZ_CONFIG_ICU], [
|
||||
|
||||
ICU_LIB_NAMES=
|
||||
MOZ_SYSTEM_ICU=
|
||||
MOZ_ARG_WITH_BOOL(system-icu,
|
||||
[ --with-system-icu
|
||||
Use system ICU (located with pkgconfig)],
|
||||
MOZ_SYSTEM_ICU=1)
|
||||
|
||||
if test -n "$MOZ_SYSTEM_ICU"; then
|
||||
PKG_CHECK_MODULES(MOZ_ICU, icu-i18n >= 58.1)
|
||||
CFLAGS="$CFLAGS $MOZ_ICU_CFLAGS"
|
||||
CXXFLAGS="$CXXFLAGS $MOZ_ICU_CFLAGS"
|
||||
fi
|
||||
|
||||
AC_SUBST(MOZ_SYSTEM_ICU)
|
||||
|
||||
dnl We always use ICU.
|
||||
USE_ICU=1
|
||||
@@ -51,7 +38,7 @@ if test -n "$USE_ICU"; then
|
||||
dnl We also don't do it on Windows because sometimes the file goes
|
||||
dnl missing -- possibly due to overzealous antivirus software? --
|
||||
dnl which prevents the browser from starting up :(
|
||||
if test -z "$JS_STANDALONE" -a -z "$MOZ_SYSTEM_ICU" -a "$OS_TARGET" != WINNT -a "$MOZ_WIDGET_TOOLKIT" != "android"; then
|
||||
if test -z "$JS_STANDALONE" -a "$OS_TARGET" != WINNT -a "$MOZ_WIDGET_TOOLKIT" != "android"; then
|
||||
MOZ_ICU_DATA_ARCHIVE=1
|
||||
else
|
||||
MOZ_ICU_DATA_ARCHIVE=
|
||||
@@ -64,7 +51,7 @@ AC_SUBST(USE_ICU)
|
||||
AC_SUBST(ICU_DATA_FILE)
|
||||
AC_SUBST(MOZ_ICU_DATA_ARCHIVE)
|
||||
|
||||
if test -n "$USE_ICU" -a -z "$MOZ_SYSTEM_ICU"; then
|
||||
if test -n "$USE_ICU"; then
|
||||
if test -z "$YASM" -a -z "$GNU_AS" -a "$COMPILE_ENVIRONMENT"; then
|
||||
AC_MSG_ERROR([Building ICU requires either yasm or a GNU assembler. If you do not have either of those available for this platform you must use --without-intl-api])
|
||||
fi
|
||||
|
||||
@@ -42,15 +42,6 @@ if test "$MOZ_BUILD_APP" != js || test -n "$JS_STANDALONE"; then
|
||||
_IS_OUTER_CONFIGURE=1
|
||||
fi
|
||||
|
||||
MOZ_ARG_WITH_BOOL(system-nspr,
|
||||
[ --with-system-nspr Use an NSPR that is already built and installed.
|
||||
Use the 'nspr-config' script in the current path,
|
||||
or look for the script in the directories given with
|
||||
--with-nspr-exec-prefix or --with-nspr-prefix.
|
||||
(Those flags are only checked if you specify
|
||||
--with-system-nspr.)],
|
||||
_USE_SYSTEM_NSPR=1 )
|
||||
|
||||
JS_POSIX_NSPR=unset
|
||||
ifdef([CONFIGURING_JS],[
|
||||
if test -n "$JS_STANDALONE"; then
|
||||
@@ -71,7 +62,6 @@ ifdef([CONFIGURING_JS],[
|
||||
])
|
||||
|
||||
dnl Pass at most one of
|
||||
dnl --with-system-nspr
|
||||
dnl --with-nspr-cflags/libs
|
||||
dnl --enable-nspr-build
|
||||
dnl --enable-posix-nspr-emulation
|
||||
@@ -79,10 +69,6 @@ dnl --enable-posix-nspr-emulation
|
||||
AC_MSG_CHECKING([NSPR selection])
|
||||
nspr_opts=
|
||||
which_nspr=default
|
||||
if test -n "$_USE_SYSTEM_NSPR"; then
|
||||
nspr_opts="x$nspr_opts"
|
||||
which_nspr="system"
|
||||
fi
|
||||
if test -n "$NSPR_CFLAGS" -o -n "$NSPR_LIBS"; then
|
||||
nspr_opts="x$nspr_opts"
|
||||
which_nspr="command-line"
|
||||
@@ -136,11 +122,7 @@ fi
|
||||
# anything itself.
|
||||
if test -n "$_IS_OUTER_CONFIGURE"; then
|
||||
|
||||
if test -n "$_USE_SYSTEM_NSPR"; then
|
||||
AM_PATH_NSPR($NSPR_MINVER, [MOZ_SYSTEM_NSPR=1], [AC_MSG_ERROR([you do not have NSPR installed or your version is older than $NSPR_MINVER.])])
|
||||
fi
|
||||
|
||||
if test -n "$MOZ_SYSTEM_NSPR" -o -n "$NSPR_CFLAGS" -o -n "$NSPR_LIBS"; then
|
||||
if test -n "$NSPR_CFLAGS" -o -n "$NSPR_LIBS"; then
|
||||
_SAVE_CFLAGS=$CFLAGS
|
||||
CFLAGS="$CFLAGS $NSPR_CFLAGS"
|
||||
AC_TRY_COMPILE([#include "prtypes.h"],
|
||||
@@ -178,19 +160,7 @@ AC_SUBST(NSPR_INCLUDE_DIR)
|
||||
AC_SUBST(NSPR_LIB_DIR)
|
||||
|
||||
PKGCONF_REQUIRES_PRIVATE="Requires.private: nspr"
|
||||
if test -n "$MOZ_SYSTEM_NSPR"; then
|
||||
_SAVE_CFLAGS=$CFLAGS
|
||||
CFLAGS="$CFLAGS $NSPR_CFLAGS"
|
||||
AC_TRY_COMPILE([#include "prlog.h"],
|
||||
[#ifndef PR_STATIC_ASSERT
|
||||
#error PR_STATIC_ASSERT not defined
|
||||
#endif],
|
||||
,
|
||||
AC_MSG_ERROR([system NSPR does not support PR_STATIC_ASSERT]))
|
||||
CFLAGS=$_SAVE_CFLAGS
|
||||
# piggy back on $MOZ_SYSTEM_NSPR to set a variable for the nspr check for js.pc
|
||||
PKGCONF_REQUIRES_PRIVATE="Requires.private: nspr >= $NSPR_MINVER"
|
||||
elif test -n "$JS_POSIX_NSPR"; then
|
||||
if test -n "$JS_POSIX_NSPR"; then
|
||||
PKGCONF_REQUIRES_PRIVATE=
|
||||
fi
|
||||
AC_SUBST([PKGCONF_REQUIRES_PRIVATE])
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
# Define indicating that this build is prior to one of the early betas. To be
|
||||
# unset mid-way through the beta cycle.
|
||||
EARLY_BETA_OR_EARLIER=
|
||||
@@ -33,14 +33,9 @@ if ('MOZ_OFFICIAL_BRANDING' in listConfig) or (strBrandingDirectory.endswith("br
|
||||
# Applies to Pale Moon and Basilisk
|
||||
if ('MC_BASILISK' in listConfig) or ('MC_PALEMOON' in listConfig):
|
||||
listViolations += [
|
||||
'MOZ_SYSTEM_NSS',
|
||||
'MOZ_SYSTEM_NSPR',
|
||||
'MOZ_SYSTEM_JPEG',
|
||||
'MOZ_SYSTEM_ZLIB',
|
||||
'MOZ_SYSTEM_BZ2',
|
||||
'MOZ_SYSTEM_PNG',
|
||||
'MOZ_SYSTEM_LIBVPX',
|
||||
'MOZ_SYSTEM_SQLITE',
|
||||
'MOZ_SYSTEM_JEMALLOC'
|
||||
]
|
||||
|
||||
|
||||
@@ -610,7 +610,7 @@ imply_option('--enable-project', application)
|
||||
def default_project(build_env, help):
|
||||
if build_env.topobjdir.endswith('/js/src'):
|
||||
return 'js'
|
||||
return 'browser'
|
||||
return 'application/xulrunner'
|
||||
|
||||
option('--enable-project', nargs=1, default=default_project,
|
||||
help='Project to build')
|
||||
@@ -618,28 +618,22 @@ option('--enable-project', nargs=1, default=default_project,
|
||||
option('--with-external-source-dir', env='EXTERNAL_SOURCE_DIR', nargs=1,
|
||||
help='External directory containing additional build files')
|
||||
|
||||
@depends('--enable-project', '--with-external-source-dir',
|
||||
check_build_environment, '--help')
|
||||
@depends('--enable-project', '--with-external-source-dir', check_build_environment, '--help')
|
||||
@imports(_from='os.path', _import='exists')
|
||||
def include_project_configure(project, external_source_dir, build_env, help):
|
||||
if not project:
|
||||
die('--enable-project is required.')
|
||||
|
||||
base_dir = build_env.topsrcdir
|
||||
|
||||
if external_source_dir:
|
||||
base_dir = os.path.join(base_dir, external_source_dir[0])
|
||||
|
||||
|
||||
build_app = project[0]
|
||||
|
||||
if not external_source_dir and build_app not in ('xulrunner', 'js'):
|
||||
die('Cannot find project %s', build_app)
|
||||
|
||||
path_project_src_dir_root = os.path.join(base_dir, build_app, 'moz.configure')
|
||||
|
||||
if exists(path_project_src_dir_root):
|
||||
return path_project_src_dir_root
|
||||
else:
|
||||
die('Cannot find project %s', build_app)
|
||||
return os.path.join(build_env.topsrcdir, 'toolkit', 'moz.configure')
|
||||
|
||||
@depends('--with-external-source-dir')
|
||||
def external_source_dir(value):
|
||||
@@ -649,12 +643,29 @@ def external_source_dir(value):
|
||||
set_config('EXTERNAL_SOURCE_DIR', external_source_dir)
|
||||
add_old_configure_assignment('EXTERNAL_SOURCE_DIR', external_source_dir)
|
||||
|
||||
@depends('--enable-project', '--with-external-source-dir', check_build_environment, '--help')
|
||||
@imports(_from='os.path', _import='exists')
|
||||
def build_project(project, external_source_dir, build_env, help):
|
||||
if not project:
|
||||
die('--enable-project is required.')
|
||||
|
||||
base_dir = build_env.topsrcdir
|
||||
|
||||
if external_source_dir:
|
||||
base_dir = os.path.join(base_dir, external_source_dir[0])
|
||||
|
||||
build_app = project[0]
|
||||
|
||||
if not external_source_dir and build_app not in ('xulrunner', 'js'):
|
||||
die('Cannot find project %s', build_app)
|
||||
|
||||
build_app_abspath = os.path.join(base_dir, build_app)
|
||||
|
||||
if exists(build_app_abspath):
|
||||
return os.path.relpath(build_app_abspath, build_env.topsrcdir)
|
||||
else:
|
||||
die('Cannot find project %s', build_app)
|
||||
|
||||
@depends(include_project_configure, check_build_environment, '--help')
|
||||
def build_project(include_project_configure, build_env, help):
|
||||
ret = os.path.dirname(os.path.relpath(include_project_configure,
|
||||
build_env.topsrcdir))
|
||||
return ret
|
||||
|
||||
set_config('MOZ_BUILD_APP', build_project)
|
||||
set_define('MOZ_BUILD_APP', build_project)
|
||||
|
||||
@@ -157,6 +157,7 @@ def old_configure_options(*options):
|
||||
'--enable-accessibility',
|
||||
'--enable-address-sanitizer',
|
||||
'--enable-alsa',
|
||||
'--enable-av1',
|
||||
'--enable-b2g-bt',
|
||||
'--enable-b2g-camera',
|
||||
'--enable-b2g-ril',
|
||||
@@ -166,6 +167,7 @@ def old_configure_options(*options):
|
||||
'--enable-cookies',
|
||||
'--enable-cpp-rtti',
|
||||
'--enable-crashreporter',
|
||||
'--enable-dbm',
|
||||
'--enable-dbus',
|
||||
'--enable-debug-js-modules',
|
||||
'--enable-jetpack',
|
||||
@@ -222,6 +224,7 @@ def old_configure_options(*options):
|
||||
'--enable-release',
|
||||
'--enable-safe-browsing',
|
||||
'--enable-sandbox',
|
||||
'--enable-security-sqlstore',
|
||||
'--enable-signmar',
|
||||
'--enable-simulator',
|
||||
'--enable-small-chunk-size',
|
||||
@@ -233,7 +236,6 @@ def old_configure_options(*options):
|
||||
'--enable-system-cairo',
|
||||
'--enable-system-extension-dirs',
|
||||
'--enable-system-pixman',
|
||||
'--enable-system-sqlite',
|
||||
'--enable-tasktracer',
|
||||
'--enable-tests',
|
||||
'--enable-thread-sanitizer',
|
||||
@@ -287,13 +289,7 @@ def old_configure_options(*options):
|
||||
'--with-sixgill',
|
||||
'--with-soft-float',
|
||||
'--with-system-bz2',
|
||||
'--with-system-icu',
|
||||
'--with-system-jpeg',
|
||||
'--with-system-libevent',
|
||||
'--with-system-libvpx',
|
||||
'--with-system-nspr',
|
||||
'--with-system-nss',
|
||||
'--with-system-png',
|
||||
'--with-system-zlib',
|
||||
'--with-thumb',
|
||||
'--with-thumb-interwork',
|
||||
|
||||
@@ -16,11 +16,6 @@ ac_add_options --enable-crashreporter
|
||||
|
||||
ac_add_options --enable-release
|
||||
|
||||
# Disable checking that add-ons are signed by the trusted root
|
||||
MOZ_ADDON_SIGNING=${MOZ_ADDON_SIGNING-0}
|
||||
# Disable enforcing that add-ons are signed by the trusted root
|
||||
MOZ_REQUIRE_SIGNING=${MOZ_REQUIRE_SIGNING-0}
|
||||
|
||||
ac_add_options --enable-js-shell
|
||||
|
||||
. "$topsrcdir/build/mozconfig.automation"
|
||||
@@ -0,0 +1,72 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
from __future__ import print_function
|
||||
import os, sys
|
||||
|
||||
if not len(sys.argv) is 2 or not os.path.exists(sys.argv[1]):
|
||||
print("\nYou did not supply a valid path to check.")
|
||||
exit(1)
|
||||
else:
|
||||
print("\nChecking for un-preprocessed files...", end = ' ')
|
||||
DIST_PATH = sys.argv[1]
|
||||
|
||||
PP_FILE_TYPES = (
|
||||
'.css',
|
||||
'.dtd',
|
||||
'.html',
|
||||
'.js',
|
||||
'.jsm',
|
||||
'.xhtml',
|
||||
'.xml',
|
||||
'.xul',
|
||||
'.manifest',
|
||||
'.properties',
|
||||
'.rdf'
|
||||
)
|
||||
|
||||
PP_SPECIAL_TYPES = ('.css')
|
||||
|
||||
PP_DIRECTIVES = [
|
||||
'define',
|
||||
'if',
|
||||
'ifdef',
|
||||
'ifndef',
|
||||
'elif',
|
||||
'elifdef',
|
||||
'endif',
|
||||
'error',
|
||||
'expand',
|
||||
'filter',
|
||||
'include',
|
||||
'literal',
|
||||
'undef',
|
||||
'unfilter'
|
||||
]
|
||||
|
||||
PP_FILES = []
|
||||
PP_BAD_FILES = []
|
||||
|
||||
for root, directories, filenames in os.walk(DIST_PATH):
|
||||
for filename in filenames:
|
||||
if filename.endswith(PP_FILE_TYPES):
|
||||
PP_FILES += [ os.path.join(root, filename).replace(os.sep, '/') ]
|
||||
|
||||
for file in PP_FILES:
|
||||
with open(file) as fp:
|
||||
marker = '%' if file.endswith(PP_SPECIAL_TYPES) else '#'
|
||||
directives = tuple(marker + directive for directive in PP_DIRECTIVES)
|
||||
for line in fp:
|
||||
if line.startswith(directives):
|
||||
PP_BAD_FILES += [ file.replace(DIST_PATH + '/', '') ]
|
||||
fp.close()
|
||||
|
||||
PP_BAD_FILES = list(dict.fromkeys(PP_BAD_FILES))
|
||||
|
||||
print('Done!')
|
||||
|
||||
if len(PP_BAD_FILES) > 0:
|
||||
print("\nWARNING: The following {0} file(s) in {1} may require preprocessing:\n".format(len(PP_BAD_FILES), DIST_PATH))
|
||||
for file in PP_BAD_FILES:
|
||||
print(file)
|
||||
|
||||
exit(0)
|
||||
@@ -44,10 +44,7 @@ export:: $(export-preqs)
|
||||
-DMOZ_SYSTEM_HUNSPELL=$(MOZ_SYSTEM_HUNSPELL) \
|
||||
-DMOZ_SYSTEM_BZ2=$(MOZ_SYSTEM_BZ2) \
|
||||
-DMOZ_SYSTEM_ZLIB=$(MOZ_SYSTEM_ZLIB) \
|
||||
-DMOZ_SYSTEM_PNG=$(MOZ_SYSTEM_PNG) \
|
||||
-DMOZ_SYSTEM_JPEG=$(MOZ_SYSTEM_JPEG) \
|
||||
-DMOZ_SYSTEM_LIBVPX=$(MOZ_SYSTEM_LIBVPX) \
|
||||
-DMOZ_SYSTEM_ICU=$(MOZ_SYSTEM_ICU) \
|
||||
$(srcdir)/system-headers $(srcdir)/stl-headers | $(PERL) $(topsrcdir)/nsprpub/config/make-system-wrappers.pl system_wrappers
|
||||
$(INSTALL) system_wrappers $(DIST)
|
||||
|
||||
|
||||
Vendored
+10
-12
@@ -6,16 +6,14 @@
|
||||
|
||||
Library('icu')
|
||||
|
||||
if CONFIG['MOZ_SYSTEM_ICU']:
|
||||
OS_LIBS += CONFIG['MOZ_ICU_LIBS']
|
||||
DIRS += [
|
||||
'common',
|
||||
'data',
|
||||
'i18n',
|
||||
]
|
||||
|
||||
if CONFIG['MOZ_ICU_DATA_ARCHIVE']:
|
||||
DIRS += ['stubdata']
|
||||
USE_LIBS += ['icustubdata']
|
||||
else:
|
||||
DIRS += [
|
||||
'common',
|
||||
'data',
|
||||
'i18n',
|
||||
]
|
||||
if CONFIG['MOZ_ICU_DATA_ARCHIVE']:
|
||||
DIRS += ['stubdata']
|
||||
USE_LIBS += ['icustubdata']
|
||||
else:
|
||||
USE_LIBS += ['icudata']
|
||||
USE_LIBS += ['icudata']
|
||||
Vendored
+4
-8
@@ -6,10 +6,8 @@
|
||||
|
||||
external_dirs = []
|
||||
|
||||
DIRS += [
|
||||
'lgpllibs',
|
||||
'sqlite',
|
||||
]
|
||||
DIRS += ['lgpllibs']
|
||||
|
||||
if not CONFIG['MOZ_SYSTEM_JPEG']:
|
||||
external_dirs += ['media/libjpeg']
|
||||
|
||||
@@ -30,14 +28,12 @@ if CONFIG['MOZ_TREMOR']:
|
||||
if CONFIG['MOZ_WEBM_ENCODER']:
|
||||
external_dirs += ['media/libmkv']
|
||||
|
||||
if not CONFIG['MOZ_SYSTEM_LIBVPX']:
|
||||
external_dirs += ['media/libvpx']
|
||||
external_dirs += ['media/libvpx']
|
||||
|
||||
if CONFIG['MOZ_AV1']:
|
||||
external_dirs += ['media/libaom']
|
||||
|
||||
if not CONFIG['MOZ_SYSTEM_PNG']:
|
||||
external_dirs += ['media/libpng']
|
||||
external_dirs += ['media/libpng']
|
||||
|
||||
external_dirs += ['media/libwebp']
|
||||
|
||||
|
||||
Vendored
+1
-10
@@ -3,8 +3,6 @@
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
ifndef MOZ_SYSTEM_NSS
|
||||
|
||||
CC_WRAPPER =
|
||||
CXX_WRAPPER =
|
||||
|
||||
@@ -121,15 +119,9 @@ DEFAULT_GMAKE_FLAGS += NSS_ENABLE_TLS_1_3=1
|
||||
ifeq ($(OS_ARCH)_$(GNU_CC),WINNT_1)
|
||||
DEFAULT_GMAKE_FLAGS += OS_DLLFLAGS='-static-libgcc' NSPR31_LIB_PREFIX=lib
|
||||
endif
|
||||
ifndef MOZ_SYSTEM_SQLITE
|
||||
ifdef MOZ_FOLD_LIBS
|
||||
DEFAULT_GMAKE_FLAGS += SQLITE_LIB_NAME=nss3
|
||||
else
|
||||
DEFAULT_GMAKE_FLAGS += SQLITE_LIB_NAME=mozsqlite3
|
||||
DEFAULT_GMAKE_FLAGS += SQLITE_LIB_DIR=$(ABS_DIST)/../config/external/sqlite
|
||||
endif # MOZ_FOLD_LIBS
|
||||
DEFAULT_GMAKE_FLAGS += SQLITE_LIB_DIR=$(ABS_DIST)/../db/sqlite3/src
|
||||
DEFAULT_GMAKE_FLAGS += SQLITE_INCLUDE_DIR=$(ABS_DIST)/include
|
||||
endif
|
||||
ifdef NSS_DISABLE_DBM
|
||||
DEFAULT_GMAKE_FLAGS += NSS_DISABLE_DBM=1
|
||||
endif
|
||||
@@ -475,4 +467,3 @@ endif # MOZ_FOLD_LIBS
|
||||
# security/nss/lib/ckfw/builtins. See bug #836220.
|
||||
libs-nss/lib$(if $(MOZ_FOLD_LIBS),/ckfw): $(call mkdir_deps,$(DEPTH)/security/nss/lib/ckfw/builtins)
|
||||
|
||||
endif
|
||||
Vendored
+8
-11
@@ -6,14 +6,11 @@
|
||||
|
||||
Library('crmf')
|
||||
|
||||
if CONFIG['MOZ_SYSTEM_NSS']:
|
||||
OS_LIBS += [l for l in CONFIG['NSS_LIBS'] if l.startswith('-L')]
|
||||
else:
|
||||
USE_LIBS += [
|
||||
# The dependency on nss is not real, but is required to force the
|
||||
# parent directory being built before this one. This has no
|
||||
# practical effect on linkage, since the only thing linking crmf
|
||||
# will need nss anyways.
|
||||
'nss',
|
||||
'static:/security/nss/lib/crmf/crmf',
|
||||
]
|
||||
USE_LIBS += [
|
||||
# The dependency on nss is not real, but is required to force the
|
||||
# parent directory being built before this one. This has no
|
||||
# practical effect on linkage, since the only thing linking crmf
|
||||
# will need nss anyways.
|
||||
'nss',
|
||||
'static:/security/nss/lib/crmf/crmf',
|
||||
]
|
||||
Vendored
+3
-5
@@ -6,10 +6,7 @@
|
||||
|
||||
DIRS += ['crmf']
|
||||
|
||||
if CONFIG['MOZ_SYSTEM_NSS']:
|
||||
Library('nss')
|
||||
OS_LIBS += CONFIG['NSS_LIBS']
|
||||
elif CONFIG['MOZ_FOLD_LIBS']:
|
||||
if CONFIG['MOZ_FOLD_LIBS']:
|
||||
GeckoSharedLibrary('nss', linkage=None)
|
||||
# TODO: The library name can be changed when bug 845217 is fixed.
|
||||
SHARED_LIBRARY_NAME = 'nss3'
|
||||
@@ -32,9 +29,10 @@ else:
|
||||
'/security/nss/lib/smime/smime3',
|
||||
'/security/nss/lib/ssl/ssl3',
|
||||
'/security/nss/lib/util/nssutil3',
|
||||
'sqlite',
|
||||
]
|
||||
|
||||
USE_LIBS += ['sqlite']
|
||||
|
||||
# XXX: We should fix these warnings.
|
||||
ALLOW_COMPILER_WARNINGS = True
|
||||
|
||||
|
||||
Vendored
-1
@@ -13,7 +13,6 @@
|
||||
PR_*
|
||||
PL_*
|
||||
#endif
|
||||
#include ../../../db/sqlite3/src/sqlite.symbols
|
||||
ATOB_AsciiToData
|
||||
ATOB_AsciiToData_Util
|
||||
ATOB_ConvertAsciiToItem
|
||||
|
||||
Vendored
-22
@@ -1,22 +0,0 @@
|
||||
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
|
||||
# vim: set filetype=python:
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
if CONFIG['MOZ_SYSTEM_SQLITE']:
|
||||
Library('sqlite')
|
||||
OS_LIBS += CONFIG['SQLITE_LIBS']
|
||||
else:
|
||||
DIRS += ['../../../db/sqlite3/src']
|
||||
if CONFIG['MOZ_FOLD_LIBS']:
|
||||
Library('sqlite')
|
||||
# When folding libraries, sqlite is actually in the nss library.
|
||||
USE_LIBS += [
|
||||
'nss',
|
||||
]
|
||||
else:
|
||||
SharedLibrary('sqlite')
|
||||
SHARED_LIBRARY_NAME = 'mozsqlite3'
|
||||
|
||||
SYMBOLS_FILE = '/db/sqlite3/src/sqlite.symbols'
|
||||
@@ -29,9 +29,6 @@ if CONFIG['HOST_OS_ARCH'] != 'WINNT':
|
||||
# while the program here is in C.
|
||||
HostProgram('nsinstall_real', c_only=True)
|
||||
|
||||
if CONFIG['MOZ_SYSTEM_ICU']:
|
||||
DEFINES['MOZ_SYSTEM_ICU'] = True
|
||||
|
||||
PYTHON_UNIT_TESTS += [
|
||||
'tests/test_mozbuild_reading.py',
|
||||
'tests/unit-expandlibs.py',
|
||||
|
||||
+1
-1
@@ -172,7 +172,7 @@ ifeq ($(MOZ_REPLACE_MALLOC_LINKAGE),dummy library)
|
||||
mozglue/build/target memory/replace/logalloc/replay/target: memory/replace/dummy/target
|
||||
endif
|
||||
endif
|
||||
ifeq (,$(MOZ_SYSTEM_NSPR)$(MOZ_SYSTEM_NSS)$(MOZ_FOLD_LIBS))
|
||||
ifeq (,$(MOZ_FOLD_LIBS))
|
||||
config/external/nss/target: config/external/nspr/pr/target config/external/nspr/ds/target config/external/nspr/libc/target
|
||||
endif
|
||||
# Most things are built during compile (target/host), but some things happen during export
|
||||
|
||||
@@ -1253,9 +1253,6 @@ soundtouch/SoundTouchFactory.h
|
||||
#if MOZ_LIBAV_FFT==1
|
||||
libavcodec/avfft.h
|
||||
#endif
|
||||
#if MOZ_SYSTEM_PNG==1
|
||||
png.h
|
||||
#endif
|
||||
#if MOZ_SYSTEM_ZLIB==1
|
||||
zlib.h
|
||||
#endif
|
||||
@@ -1291,15 +1288,6 @@ QtSparql/qsparqlresult.h
|
||||
#if MOZ_TREE_PIXMAN!=1
|
||||
pixman.h
|
||||
#endif
|
||||
#if MOZ_SYSTEM_LIBVPX==1
|
||||
vpx/svc_context.h
|
||||
vpx/vpx_codec.h
|
||||
vpx/vpx_decoder.h
|
||||
vpx/vpx_encoder.h
|
||||
vpx/vp8cx.h
|
||||
vpx/vp8dx.h
|
||||
vpx_mem/vpx_mem.h
|
||||
#endif
|
||||
gst/gst.h
|
||||
gst/app/gstappsink.h
|
||||
gst/app/gstappsrc.h
|
||||
@@ -1312,22 +1300,6 @@ kvm.h
|
||||
spawn.h
|
||||
err.h
|
||||
xlocale.h
|
||||
#ifdef MOZ_SYSTEM_ICU
|
||||
unicode/locid.h
|
||||
unicode/numsys.h
|
||||
unicode/timezone.h
|
||||
unicode/ucal.h
|
||||
unicode/uchar.h
|
||||
unicode/uclean.h
|
||||
unicode/ucol.h
|
||||
unicode/udat.h
|
||||
unicode/udatpg.h
|
||||
unicode/uenum.h
|
||||
unicode/unorm.h
|
||||
unicode/unum.h
|
||||
unicode/ustring.h
|
||||
unicode/utypes.h
|
||||
#endif
|
||||
libutil.h
|
||||
unwind.h
|
||||
fenv.h
|
||||
@@ -93,7 +93,7 @@ if (!defined($official)) {$official="";}
|
||||
if (!defined($milestone)) {$milestone="";}
|
||||
if (!defined($module)) {$module="";}
|
||||
if (!defined($binary)) {$binary="";}
|
||||
if (!defined($displayname)) {$displayname="Mozilla";}
|
||||
if (!defined($displayname)) {$displayname="UXP";}
|
||||
if (!defined($appversion)) {$appversion=$milestone;}
|
||||
if (!defined($depth)) {$depth=".";}
|
||||
if (!defined($rcinclude)) {$rcinclude="";}
|
||||
@@ -234,10 +234,10 @@ for ($j = 1; $j < 4; $j++)
|
||||
}
|
||||
my $winappversion = "$appver[0],$appver[1],$appver[2],$appver[3]";
|
||||
|
||||
my $copyright = "License: MPL 2";
|
||||
my $company = "Mozilla Foundation";
|
||||
my $trademarks = "Mozilla";
|
||||
my $productname = $displayname;
|
||||
my $copyright = "License: MPL 2.0";
|
||||
my $company = "Moonchild Productions";
|
||||
my $trademarks = "Moonchild";
|
||||
my $productname = "UXP";
|
||||
|
||||
|
||||
if (defined($override_comment)){$override_comment =~ s/\@MOZ_APP_DISPLAYNAME\@/$displayname/g; $comment=$override_comment;}
|
||||
|
||||
+5
-6
@@ -3,9 +3,8 @@
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
if not CONFIG['NSS_DISABLE_DBM'] and CONFIG['MOZ_MORK']:
|
||||
DIRS += [
|
||||
'public',
|
||||
'src',
|
||||
'build',
|
||||
]
|
||||
DIRS += [
|
||||
'public',
|
||||
'src',
|
||||
'build',
|
||||
]
|
||||
@@ -1,11 +0,0 @@
|
||||
# vim: set filetype=python:
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
if not CONFIG['NSS_DISABLE_DBM'] and CONFIG['MOZ_MORK']:
|
||||
DIRS += [
|
||||
'mork/public',
|
||||
'mork/src',
|
||||
'mork/build',
|
||||
]
|
||||
+12
-23
@@ -3,25 +3,18 @@
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
NO_VISIBILITY_FLAGS = True
|
||||
|
||||
EXPORTS += [
|
||||
'sqlite3.h',
|
||||
]
|
||||
NO_VISIBILITY_FLAGS = True
|
||||
|
||||
# We allow warnings for third-party code that can be updated from upstream.
|
||||
ALLOW_COMPILER_WARNINGS = True
|
||||
|
||||
if CONFIG['MOZ_FOLD_LIBS']:
|
||||
# When folding libraries, sqlite is actually in the nss library.
|
||||
FINAL_LIBRARY = 'nss'
|
||||
else:
|
||||
# The final library is in config/external/sqlite
|
||||
FINAL_LIBRARY = 'sqlite'
|
||||
GeckoSharedLibrary('sqlite', linkage=None, mozglue='library')
|
||||
SHARED_LIBRARY_NAME = 'mozsqlite3'
|
||||
SYMBOLS_FILE = 'sqlite.symbols'
|
||||
|
||||
SOURCES += [
|
||||
'sqlite3.c',
|
||||
]
|
||||
EXPORTS += ['sqlite3.h']
|
||||
SOURCES += ['sqlite3.c']
|
||||
|
||||
# -DSQLITE_SECURE_DELETE=1 will cause SQLITE to 0-fill delete data so we
|
||||
# don't have to vacuum to make sure the data is not visible in the file.
|
||||
@@ -34,8 +27,11 @@ SOURCES += [
|
||||
# hidden preference. If that preference is missing or invalid then this value
|
||||
# will be used.
|
||||
# Note: Be sure to update the configure.in checks when these change!
|
||||
for var in ('SQLITE_SECURE_DELETE', 'SQLITE_THREADSAFE', 'SQLITE_CORE',
|
||||
'SQLITE_ENABLE_FTS3', 'SQLITE_ENABLE_UNLOCK_NOTIFY',
|
||||
for var in ('SQLITE_SECURE_DELETE',
|
||||
'SQLITE_THREADSAFE',
|
||||
'SQLITE_CORE',
|
||||
'SQLITE_ENABLE_FTS3',
|
||||
'SQLITE_ENABLE_UNLOCK_NOTIFY',
|
||||
'SQLITE_ENABLE_DBSTAT_VTAB'):
|
||||
DEFINES[var] = 1
|
||||
|
||||
@@ -67,10 +63,6 @@ if CONFIG['MOZ_DEBUG']:
|
||||
DEFINES['SQLITE_DEBUG'] = 1
|
||||
DEFINES['SQLITE_ENABLE_API_ARMOR'] = True
|
||||
|
||||
if CONFIG['OS_TARGET'] == 'Android':
|
||||
# default to user readable only to fit Android security model
|
||||
DEFINES['SQLITE_DEFAULT_FILE_PERMISSIONS'] = '0600'
|
||||
|
||||
# Force using malloc_usable_size when building with jemalloc because _msize
|
||||
# causes assertions on Win64. See bug 719579.
|
||||
if CONFIG['OS_ARCH'] == 'WINNT' and CONFIG['MOZ_MEMORY']:
|
||||
@@ -86,10 +78,7 @@ DEFINES['SQLITE_OMIT_DECLTYPE'] = True
|
||||
# performance and doesn't suffer from a full separate tmp partition.
|
||||
# Exclude 32bit platforms due to address space fragmentation issues.
|
||||
# System Sqlite is managed through a PRAGMA instead.
|
||||
if CONFIG['OS_TARGET'] == 'Android':
|
||||
# On Android there's no tmp partition, so always use a MEMORY temp store.
|
||||
DEFINES['SQLITE_TEMP_STORE'] = 3
|
||||
elif CONFIG['HAVE_64BIT_BUILD']:
|
||||
if CONFIG['HAVE_64BIT_BUILD']:
|
||||
# On 64bit platforms default to a MEMORY temp store for performance.
|
||||
DEFINES['SQLITE_TEMP_STORE'] = 2
|
||||
|
||||
|
||||
@@ -9828,7 +9828,7 @@ var Debugger =
|
||||
var host = httpActivity.hostname;
|
||||
|
||||
info.hsts = sss.isSecureHost(sss.HEADER_HSTS, host, flags);
|
||||
info.hpkp = sss.isSecureHost(sss.HEADER_HPKP, host, flags);
|
||||
info.hpkp = false;
|
||||
} else {
|
||||
DevToolsUtils.reportException("NetworkHelper.parseSecurityInfo", "Could not get HSTS/HPKP status as hostname is not available.");
|
||||
info.hsts = false;
|
||||
|
||||
@@ -58,9 +58,21 @@ const Curl = {
|
||||
* A cURL command.
|
||||
*/
|
||||
generateCommand: function (data) {
|
||||
let utils = CurlUtils;
|
||||
const utils = CurlUtils;
|
||||
|
||||
let command = ["curl"];
|
||||
|
||||
// Make sure to use the following helpers to sanitize arguments before execution.
|
||||
const addParam = value => {
|
||||
const safe = /^[a-zA-Z-]+$/.test(value) ? value : escapeString(value);
|
||||
command.push(safe);
|
||||
};
|
||||
|
||||
const addPostData = value => {
|
||||
const safe = /^[a-zA-Z-]+$/.test(value) ? value : escapeString(value);
|
||||
postData.push(safe);
|
||||
};
|
||||
|
||||
let ignoredHeaders = new Set();
|
||||
|
||||
// The cURL command is expected to run on the same platform that Firefox runs
|
||||
@@ -69,7 +81,7 @@ const Curl = {
|
||||
utils.escapeStringWin : utils.escapeStringPosix;
|
||||
|
||||
// Add URL.
|
||||
command.push(escapeString(data.url));
|
||||
addParam(data.url);
|
||||
|
||||
let postDataText = null;
|
||||
let multipartRequest = utils.isMultipartRequest(data);
|
||||
@@ -79,15 +91,15 @@ const Curl = {
|
||||
if (utils.isUrlEncodedRequest(data) ||
|
||||
["PUT", "POST", "PATCH"].includes(data.method)) {
|
||||
postDataText = data.postDataText;
|
||||
postData.push("--data");
|
||||
postData.push(escapeString(utils.writePostDataTextParams(postDataText)));
|
||||
addPostData("--data");
|
||||
addPostData(utils.writePostDataTextParams(postDataText));
|
||||
ignoredHeaders.add("content-length");
|
||||
} else if (multipartRequest) {
|
||||
postDataText = data.postDataText;
|
||||
postData.push("--data-binary");
|
||||
addPostData("--data-binary");
|
||||
let boundary = utils.getMultipartBoundary(data);
|
||||
let text = utils.removeBinaryDataFromMultipartText(postDataText, boundary);
|
||||
postData.push(escapeString(text));
|
||||
addPostData(text);
|
||||
ignoredHeaders.add("content-length");
|
||||
}
|
||||
|
||||
@@ -95,15 +107,15 @@ const Curl = {
|
||||
// For GET and POST requests this is not necessary as GET is the
|
||||
// default. If --data or --binary is added POST is the default.
|
||||
if (!(data.method == "GET" || data.method == "POST")) {
|
||||
command.push("-X");
|
||||
command.push(data.method);
|
||||
addParam("-X");
|
||||
addParam(data.method);
|
||||
}
|
||||
|
||||
// Add -I (HEAD)
|
||||
// For servers that supports HEAD.
|
||||
// This will fetch the header of a document only.
|
||||
if (data.method == "HEAD") {
|
||||
command.push("-I");
|
||||
addParam("-I");
|
||||
}
|
||||
|
||||
// Add http version.
|
||||
@@ -114,7 +126,7 @@ const Curl = {
|
||||
// data.httpVersion are HTTP/1.0, HTTP/1.1 and HTTP/2.0
|
||||
// So in case of HTTP/2.0 (which should ideally be HTTP/2) we are using
|
||||
// only major version, and full version in other cases
|
||||
command.push("--http" + (version == "2.0" ? version.split(".")[0] : version));
|
||||
addParam("--http" + (version == "2.0" ? version.split(".")[0] : version));
|
||||
}
|
||||
|
||||
// Add request headers.
|
||||
@@ -126,14 +138,14 @@ const Curl = {
|
||||
for (let i = 0; i < headers.length; i++) {
|
||||
let header = headers[i];
|
||||
if (header.name.toLowerCase() === "accept-encoding") {
|
||||
command.push("--compressed");
|
||||
addParam("--compressed");
|
||||
continue;
|
||||
}
|
||||
if (ignoredHeaders.has(header.name.toLowerCase())) {
|
||||
continue;
|
||||
}
|
||||
command.push("-H");
|
||||
command.push(escapeString(header.name + ": " + header.value));
|
||||
addParam("-H");
|
||||
addParam(header.name + ": " + header.value);
|
||||
}
|
||||
|
||||
// Add post data.
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
|
||||
a {
|
||||
-moz-user-focus: normal;
|
||||
-moz-user-input: enabled;
|
||||
cursor: pointer;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
+5
-11
@@ -4,20 +4,14 @@
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
DIRS += [
|
||||
'server',
|
||||
'shared',
|
||||
]
|
||||
|
||||
if CONFIG['MOZ_DEVTOOLS']:
|
||||
DIRS += ['client']
|
||||
|
||||
if CONFIG['MOZ_DEVTOOLS_SERVER']:
|
||||
DIRS += [
|
||||
'server',
|
||||
'shared',
|
||||
]
|
||||
else:
|
||||
DIRS += [
|
||||
'shared/heapsnapshot',
|
||||
'shared/jsinspector',
|
||||
]
|
||||
|
||||
# /browser uses DIST_SUBDIR. We opt-in to this treatment when building
|
||||
# DevTools for the browser to keep the root omni.ja slim for use by external XUL
|
||||
# apps. Mulet also uses this since it includes /browser.
|
||||
|
||||
@@ -1440,8 +1440,6 @@ exports.CSS_PROPERTIES = {
|
||||
"supports": [],
|
||||
"values": [
|
||||
"auto",
|
||||
"disabled",
|
||||
"enabled",
|
||||
"inherit",
|
||||
"initial",
|
||||
"none",
|
||||
|
||||
@@ -4,60 +4,12 @@
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
with Files('**'):
|
||||
BUG_COMPONENT = ('Firefox', 'Developer Tools: Memory')
|
||||
|
||||
if CONFIG['ENABLE_TESTS']:
|
||||
DIRS += ['tests/gtest']
|
||||
|
||||
XPCSHELL_TESTS_MANIFESTS += [ 'tests/unit/xpcshell.ini' ]
|
||||
MOCHITEST_MANIFESTS += [ 'tests/mochitest/mochitest.ini' ]
|
||||
MOCHITEST_CHROME_MANIFESTS += [ 'tests/mochitest/chrome.ini' ]
|
||||
|
||||
EXPORTS.mozilla.devtools += [
|
||||
'AutoMemMap.h',
|
||||
'CoreDump.pb.h',
|
||||
'DeserializedNode.h',
|
||||
'DominatorTree.h',
|
||||
'FileDescriptorOutputStream.h',
|
||||
'HeapSnapshot.h',
|
||||
'HeapSnapshotTempFileHelperChild.h',
|
||||
'HeapSnapshotTempFileHelperParent.h',
|
||||
'ZeroCopyNSIOutputStream.h',
|
||||
]
|
||||
|
||||
IPDL_SOURCES += [
|
||||
'PHeapSnapshotTempFileHelper.ipdl',
|
||||
]
|
||||
|
||||
include('/ipc/chromium/chromium-config.mozbuild')
|
||||
|
||||
SOURCES += [
|
||||
'AutoMemMap.cpp',
|
||||
'CoreDump.pb.cc',
|
||||
'DeserializedNode.cpp',
|
||||
'DominatorTree.cpp',
|
||||
'FileDescriptorOutputStream.cpp',
|
||||
'HeapSnapshot.cpp',
|
||||
'HeapSnapshotTempFileHelperParent.cpp',
|
||||
'ZeroCopyNSIOutputStream.cpp',
|
||||
]
|
||||
|
||||
# Disable RTTI in google protocol buffer
|
||||
DEFINES['GOOGLE_PROTOBUF_NO_RTTI'] = True
|
||||
|
||||
FINAL_LIBRARY = 'xul'
|
||||
|
||||
if CONFIG['MOZ_DEVTOOLS_SERVER']:
|
||||
DevToolsModules(
|
||||
'census-tree-node.js',
|
||||
'CensusUtils.js',
|
||||
'DominatorTreeNode.js',
|
||||
'HeapAnalysesClient.js',
|
||||
'HeapAnalysesWorker.js',
|
||||
'HeapSnapshotFileUtils.js',
|
||||
'shortest-paths.js',
|
||||
)
|
||||
|
||||
if CONFIG['GNU_CXX']:
|
||||
CXXFLAGS += ['-Wno-error=shadow']
|
||||
DevToolsModules(
|
||||
'census-tree-node.js',
|
||||
'CensusUtils.js',
|
||||
'DominatorTreeNode.js',
|
||||
'HeapAnalysesClient.js',
|
||||
'HeapAnalysesWorker.js',
|
||||
'HeapSnapshotFileUtils.js',
|
||||
'shortest-paths.js',
|
||||
)
|
||||
@@ -17,7 +17,6 @@ DIRS += [
|
||||
'heapsnapshot',
|
||||
'inspector',
|
||||
'jsbeautify',
|
||||
'jsinspector',
|
||||
'layout',
|
||||
'locales',
|
||||
'node-properties',
|
||||
|
||||
@@ -668,7 +668,8 @@ var NetworkHelper = {
|
||||
let host = httpActivity.hostname;
|
||||
|
||||
info.hsts = sss.isSecureHost(sss.HEADER_HSTS, host, flags);
|
||||
info.hpkp = sss.isSecureHost(sss.HEADER_HPKP, host, flags);
|
||||
// HPKP is no longer supported.
|
||||
info.hpkp = false;
|
||||
} else {
|
||||
DevToolsUtils.reportException("NetworkHelper.parseSecurityInfo",
|
||||
"Could not get HSTS/HPKP status as hostname is not available.");
|
||||
|
||||
+248
-12
@@ -1,4 +1,4 @@
|
||||
# UXP Coding Style Guide
|
||||
# UXP Coding Style Guide
|
||||
While our source tree is currently in a number of different Coding Styles and the general rule applies to adhere to style of surrounding code when you are making changes, it is our goal to unify the style of our source tree and making it adhere to a single style.
|
||||
This document describes the preferred style for new source code files and the preferred style to convert existing files to.
|
||||
|
||||
@@ -11,9 +11,9 @@ Our own managed and maintained code should adhere to this guide where possible o
|
||||
## General formatting rules
|
||||
The following formatting rules apply to all code:
|
||||
- Always use spaces for indentation, never use tabs!
|
||||
- Put a space between a keyword and parenthesis, e.g. `if (`.
|
||||
- Put a space between a keyword and parenthesis, e.g. `if (`. Do _not_ put a space between a function/type-assignment name and its parenthesis, e.g. `function(somevar)` or `int32_t(somevar)`.
|
||||
- Put a space between variables and operators, e.g. `a == b`.
|
||||
- Put a space after a comma or semicolon in variable lists, e.g. `function (a, b, c)` or `for (i = 1; i < 10; i++)`.
|
||||
- Put a space after a comma or semicolon in variable lists, e.g. `function(a, b, c)` or `for (i = 1; i < 10; i++)`.
|
||||
- Indentation of scopes is 2 spaces.
|
||||
- Indentation of long lines is variable-aligned or expression-aligned (see "long line wrapping")
|
||||
- Conditional defines are always placed on column 1. This is also true for nested defines.
|
||||
@@ -126,7 +126,7 @@ switch (variable) {
|
||||
code_for_1;
|
||||
code_for_1;
|
||||
break;
|
||||
case value2:
|
||||
case value2: // Comment describing 2 (alternative)
|
||||
code_for_2;
|
||||
code_for_2;
|
||||
// fallthrough
|
||||
@@ -225,15 +225,251 @@ somelongvariable = somelongexpression ?
|
||||
|
||||
## JavaScript
|
||||
Applies to `*.js` and `*.jsm`.
|
||||
### General formatting guidelines
|
||||
- Place function signatures on the same line as js object identifiers, and do not use named function syntax in that case:
|
||||
```JavaScript
|
||||
var myObject = {
|
||||
myIdentifier: function(var1, var2) {
|
||||
...
|
||||
},
|
||||
myIdentifier2: function() {
|
||||
...
|
||||
}
|
||||
}
|
||||
```
|
||||
- Variable initializers should be placed on the variable declaration line if needed.
|
||||
```JavaScript
|
||||
var fwdCommand = document.getElementById("Browser:Forward");
|
||||
```
|
||||
```JavaScript
|
||||
var myObject = {
|
||||
myVariable: null,
|
||||
myString: "Something"
|
||||
}
|
||||
```
|
||||
- Avoid placing executed code on the expression line. Preferably brace executed code.
|
||||
|
||||
WRONG:
|
||||
```JavaScript
|
||||
if (a == b) do_something();
|
||||
if (a == b) { do_something(); }
|
||||
```
|
||||
DISCOURAGED:
|
||||
```JavaScript
|
||||
if (a == b)
|
||||
do_something();
|
||||
```
|
||||
CORRECT:
|
||||
```JavaScript
|
||||
if (a == b) {
|
||||
do_something();
|
||||
}
|
||||
```
|
||||
- Format in-lined variable functions as if you would format normal functions with the exception of closure: break with the opening brace, followed by code, and closing brace on its own line, followed immediately by any other variables passed in-line.
|
||||
```JavaScript
|
||||
appMenuButton.addEventListener("mousedown", function(event) {
|
||||
if (event.button == 0) {
|
||||
appMenuOpening = new Date();
|
||||
}
|
||||
}, false);
|
||||
```
|
||||
- Don't use a space between `{` `}` braces in empty js objects, `{` `}` braces in empty function scopes, or `[` `]` brackets in empty arrays.
|
||||
|
||||
### Flow control
|
||||
Flow control expressions should follow the following guidelines:
|
||||
- Scopes have their opening braces on the expression line
|
||||
- Scopes have their closing braces on a separate line, indent-aligned with the flow control expression
|
||||
- Any alternative flow control paths are generally started with an expression on the closing brace line. The logic behind this is that you should keep the flow control level visually the same for the executed code blocks with no breaks (a closing brace on its own line means "done").
|
||||
- Case statements are indented by 2 on a new line with the case expression on its own line.
|
||||
- Flow control default scopes are always placed at the bottom.
|
||||
|
||||
#### if..else
|
||||
`if..else` statements example:
|
||||
```JavaScript
|
||||
if (something == somethingelse) {
|
||||
true_case_code here;
|
||||
} else {
|
||||
false_case_code here;
|
||||
}
|
||||
|
||||
if (case1) {
|
||||
case1_code here;
|
||||
} else if (case2) {
|
||||
case2_code here;
|
||||
} else {
|
||||
other_case_code here;
|
||||
}
|
||||
|
||||
if (case1) {
|
||||
case1_code here;
|
||||
} else {
|
||||
if (case2) {
|
||||
case2_code here;
|
||||
}
|
||||
case2_and_other_code here;
|
||||
}
|
||||
```
|
||||
#### for
|
||||
`for` loop example:
|
||||
```JavaScript
|
||||
for (let i = 1; i < max; i++) {
|
||||
loop_code here;
|
||||
}
|
||||
|
||||
for (let i = 0;; i++) {
|
||||
do_something_with(i);
|
||||
if (i > max) break;
|
||||
...
|
||||
}
|
||||
```
|
||||
#### while
|
||||
`while` loop example:
|
||||
```JavaScript
|
||||
while (something == true) {
|
||||
loop_code here;
|
||||
}
|
||||
|
||||
do {
|
||||
execute_me_at_least_once();
|
||||
...
|
||||
} while (something == true);
|
||||
```
|
||||
#### switch..case
|
||||
`switch..case` flow control example:
|
||||
```JavaScript
|
||||
switch (variable) {
|
||||
case value1:
|
||||
// Comment describing 1
|
||||
code_for_1;
|
||||
code_for_1;
|
||||
break;
|
||||
case value2: // Comment describing 2 (alternative)
|
||||
code_for_2;
|
||||
code_for_2;
|
||||
// fallthrough
|
||||
case value3:
|
||||
case value4:
|
||||
code_for_3_and_4;
|
||||
break;
|
||||
default:
|
||||
code_for_default;
|
||||
code_for_default;
|
||||
}
|
||||
```
|
||||
Alternatively (braced):
|
||||
```JavaScript
|
||||
switch (variable) {
|
||||
case value1: {
|
||||
// Comment describing 1
|
||||
code_for_1;
|
||||
code_for_1;
|
||||
break;
|
||||
}
|
||||
case value2: {
|
||||
code_for_2;
|
||||
code_for_2;
|
||||
// fallthrough
|
||||
}
|
||||
case value3:
|
||||
case value4: {
|
||||
code_for_3_and_4;
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
code_for_default;
|
||||
code_for_default;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### try..catch
|
||||
- When using `try..catch` blocks, the use of optional catch binding is discouraged. Please always include the error variable.
|
||||
|
||||
`try..catch` flow control examples:
|
||||
```JavaScript
|
||||
try {
|
||||
do_something();
|
||||
} catch(e) {
|
||||
handle_error(e);
|
||||
} finally {
|
||||
always();
|
||||
}
|
||||
|
||||
try {
|
||||
do_something();
|
||||
} catch(e) {}
|
||||
|
||||
try {
|
||||
do_something();
|
||||
} finally {
|
||||
always();
|
||||
}
|
||||
```
|
||||
DISCOURAGED
|
||||
```JavaScript
|
||||
try {
|
||||
do_something();
|
||||
} catch {
|
||||
// No error processing
|
||||
do_something_else();
|
||||
}
|
||||
```
|
||||
|
||||
### Long line wrapping
|
||||
If statements on a single line become overly long, they should be split into multiple lines:
|
||||
- Binary operators (including ternary) must be left on their original lines if the line break happens around the operator. The second line should start in the same column as the start of the expression in the first line.
|
||||
- Lists of variables (e.g. when calling or declaring a function) should be split at the wrapping column.
|
||||
- Long OOP calls should be split at the period with the period on the start of the new line, indented to the column of the first object, filling to the wrapping column where possible, including additional terms.
|
||||
- When breaking assignments/operations/logic, break right after the operator (`=`, `+`, `&&`, `||`, etc.)
|
||||
- **Don't break too rigorously**; short additions should be kept on the same line to keep things legible - use common sense and context for flexibility.
|
||||
|
||||
WRONG:
|
||||
```JavaScript
|
||||
somelongobjectname.somelongfunction(
|
||||
var1, var2, var3, var4, var5);
|
||||
|
||||
if (somelongvariable == somelongothervariable
|
||||
|| somelongvariable2 == somelongothervariable2) {
|
||||
|
||||
somelongvariable = somelongexpression ? somevalue1
|
||||
: somevalue2;
|
||||
|
||||
var iShouldntBeUsingThisLongOfAVarName
|
||||
= someValueToAdd + someValueToAdd + someValueToAdd
|
||||
+ someValueToAdd;
|
||||
|
||||
Cu.import("resource:///modules/DownloadsCommon.jsm", {}).
|
||||
DownloadsCommon.initializeAllDataLinks();
|
||||
```
|
||||
CORRECT:
|
||||
```JavaScript
|
||||
somelongobjectname.somelongfunction(var1, var2, var3,
|
||||
var4, var5);
|
||||
|
||||
if (somelongvariable == somelongothervariable ||
|
||||
somelongvariable2 == somelongothervariable2) {
|
||||
|
||||
somelongvariable = somelongexpression ?
|
||||
somevalue1 :
|
||||
somevalue2;
|
||||
|
||||
var iShouldntBeUsingThisLongOfAVarName =
|
||||
someValueToAdd + someValueToAdd + someValueToAdd +
|
||||
someValueToAdd;
|
||||
|
||||
Cu.import("resource:///modules/DownloadsCommon.jsm", {})
|
||||
.DownloadsCommon.initializeAllDataLinks();
|
||||
|
||||
let sessionStartup = Cc["@mozilla.org/browser/sessionstartup;1"]
|
||||
.getService(Ci.nsISessionStartup);
|
||||
```
|
||||
|
||||
## XUL and other XML-derivatives
|
||||
Applies to `*.xul`, `*.html`, `*.xhtml`.
|
||||
TODO
|
||||
## IDL
|
||||
Applies to `*.idl`, `*.xpidl` and `*.webidl`.
|
||||
|
||||
<!--stackedit_data:
|
||||
eyJoaXN0b3J5IjpbMjUzODYzMzMsMjg5MjUwODIsLTQzMjMzNz
|
||||
ExMSw4MzQ2MjYwNDksLTE5MDMyNzE5OTYsLTEwMTIwMjc3ODMs
|
||||
LTE4MzgzODM5MDIsODA5MjEzNTEyLC01Mzg0MjM4MDAsMzgyNj
|
||||
I3NDYzLDIwODYwMjIwODUsLTE1MjU5MjE2MjIsLTY1OTMzMTA0
|
||||
MCwtNzQwOTE5MDQ1LDE4Njc1NTQxNDJdfQ==
|
||||
-->
|
||||
TODO
|
||||
## Python-esque
|
||||
Applies to `*.py`, `mozbuild` etc.
|
||||
TODO
|
||||
@@ -119,12 +119,10 @@ static RedirEntry kRedirMap[] = {
|
||||
nsIAboutModule::URI_MUST_LOAD_IN_CHILD |
|
||||
nsIAboutModule::ALLOW_SCRIPT
|
||||
},
|
||||
#ifndef ANDROID
|
||||
{
|
||||
"profiles", "chrome://global/content/aboutProfiles.xhtml",
|
||||
nsIAboutModule::ALLOW_SCRIPT
|
||||
},
|
||||
#endif
|
||||
// about:srcdoc is unresolvable by specification. It is included here
|
||||
// because the security manager would disallow srcdoc iframes otherwise.
|
||||
{
|
||||
|
||||
@@ -860,6 +860,12 @@ nsDocShell::~nsDocShell()
|
||||
shPrivate->SetRootDocShell(nullptr);
|
||||
}
|
||||
|
||||
if (mContentViewer) {
|
||||
mContentViewer->Close(nullptr);
|
||||
mContentViewer->Destroy();
|
||||
mContentViewer = nullptr;
|
||||
}
|
||||
|
||||
if (--gDocShellCount == 0) {
|
||||
NS_IF_RELEASE(sURIFixup);
|
||||
}
|
||||
@@ -4943,13 +4949,11 @@ nsDocShell::DisplayLoadError(nsresult aError, nsIURI* aURI,
|
||||
if (errorClass == nsINSSErrorsService::ERROR_CLASS_BAD_CERT) {
|
||||
error.AssignLiteral("nssBadCert");
|
||||
|
||||
// If this is an HTTP Strict Transport Security host or a pinned host
|
||||
// and the certificate is bad, don't allow overrides (RFC 6797 section
|
||||
// 12.1, HPKP draft spec section 2.6).
|
||||
// If this is an HTTP Strict Transport Security host, don't allow
|
||||
// overrides (RFC 6797 section 12.1).
|
||||
uint32_t flags =
|
||||
UsePrivateBrowsing() ? nsISocketProvider::NO_PERMANENT_STORAGE : 0;
|
||||
bool isStsHost = false;
|
||||
bool isPinnedHost = false;
|
||||
if (XRE_IsParentProcess()) {
|
||||
nsCOMPtr<nsISiteSecurityService> sss =
|
||||
do_GetService(NS_SSSERVICE_CONTRACTID, &rv);
|
||||
@@ -4957,9 +4961,6 @@ nsDocShell::DisplayLoadError(nsresult aError, nsIURI* aURI,
|
||||
rv = sss->IsSecureURI(nsISiteSecurityService::HEADER_HSTS, aURI,
|
||||
flags, nullptr, &isStsHost);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
rv = sss->IsSecureURI(nsISiteSecurityService::HEADER_HPKP, aURI,
|
||||
flags, nullptr, &isPinnedHost);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
} else {
|
||||
mozilla::dom::ContentChild* cc =
|
||||
mozilla::dom::ContentChild::GetSingleton();
|
||||
@@ -4967,8 +4968,6 @@ nsDocShell::DisplayLoadError(nsresult aError, nsIURI* aURI,
|
||||
SerializeURI(aURI, uri);
|
||||
cc->SendIsSecureURI(nsISiteSecurityService::HEADER_HSTS, uri, flags,
|
||||
&isStsHost);
|
||||
cc->SendIsSecureURI(nsISiteSecurityService::HEADER_HPKP, uri, flags,
|
||||
&isPinnedHost);
|
||||
}
|
||||
|
||||
if (Preferences::GetBool(
|
||||
@@ -4976,11 +4975,9 @@ nsDocShell::DisplayLoadError(nsresult aError, nsIURI* aURI,
|
||||
cssClass.AssignLiteral("expertBadCert");
|
||||
}
|
||||
|
||||
// HSTS/pinning takes precedence over the expert bad cert pref. We
|
||||
// HSTS takes precedence over the expert bad cert pref. We
|
||||
// never want to show the "Add Exception" button for these sites.
|
||||
// In the future we should differentiate between an HSTS host and a
|
||||
// pinned host and display a more informative message to the user.
|
||||
if (isStsHost || isPinnedHost) {
|
||||
if (isStsHost) {
|
||||
cssClass.AssignLiteral("badStsCert");
|
||||
}
|
||||
|
||||
|
||||
@@ -25,10 +25,6 @@
|
||||
#ifdef MOZ_ENABLE_DBUS
|
||||
#include "nsDBusHandlerApp.h"
|
||||
#endif
|
||||
#if defined(MOZ_WIDGET_ANDROID)
|
||||
#include "nsExternalSharingAppService.h"
|
||||
#include "nsExternalURLHandlerService.h"
|
||||
#endif
|
||||
|
||||
// session history
|
||||
#include "nsSHEntry.h"
|
||||
@@ -85,10 +81,6 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(PlatformLocalHandlerApp_t)
|
||||
#ifdef MOZ_ENABLE_DBUS
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsDBusHandlerApp)
|
||||
#endif
|
||||
#if defined(MOZ_WIDGET_ANDROID)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsExternalSharingAppService)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsExternalURLHandlerService)
|
||||
#endif
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(ContentHandlerService, Init)
|
||||
|
||||
// session history
|
||||
@@ -114,10 +106,6 @@ NS_DEFINE_NAMED_CID(NS_LOCALHANDLERAPP_CID);
|
||||
#ifdef MOZ_ENABLE_DBUS
|
||||
NS_DEFINE_NAMED_CID(NS_DBUSHANDLERAPP_CID);
|
||||
#endif
|
||||
#if defined(MOZ_WIDGET_ANDROID)
|
||||
NS_DEFINE_NAMED_CID(NS_EXTERNALSHARINGAPPSERVICE_CID);
|
||||
NS_DEFINE_NAMED_CID(NS_EXTERNALURLHANDLERSERVICE_CID);
|
||||
#endif
|
||||
NS_DEFINE_NAMED_CID(NS_SHENTRY_CID);
|
||||
NS_DEFINE_NAMED_CID(NS_SHTRANSACTION_CID);
|
||||
NS_DEFINE_NAMED_CID(NS_SHISTORY_CID);
|
||||
@@ -142,10 +130,6 @@ const mozilla::Module::CIDEntry kDocShellCIDs[] = {
|
||||
{ &kNS_LOCALHANDLERAPP_CID, false, nullptr, PlatformLocalHandlerApp_tConstructor },
|
||||
#ifdef MOZ_ENABLE_DBUS
|
||||
{ &kNS_DBUSHANDLERAPP_CID, false, nullptr, nsDBusHandlerAppConstructor },
|
||||
#endif
|
||||
#if defined(MOZ_WIDGET_ANDROID)
|
||||
{ &kNS_EXTERNALSHARINGAPPSERVICE_CID, false, nullptr, nsExternalSharingAppServiceConstructor },
|
||||
{ &kNS_EXTERNALURLHANDLERSERVICE_CID, false, nullptr, nsExternalURLHandlerServiceConstructor },
|
||||
#endif
|
||||
{ &kNS_SHENTRY_CID, false, nullptr, nsSHEntryConstructor },
|
||||
{ &kNS_SHTRANSACTION_CID, false, nullptr, nsSHTransactionConstructor },
|
||||
@@ -183,9 +167,7 @@ const mozilla::Module::ContractIDEntry kDocShellContracts[] = {
|
||||
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "performance", &kNS_ABOUT_REDIRECTOR_MODULE_CID },
|
||||
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "plugins", &kNS_ABOUT_REDIRECTOR_MODULE_CID },
|
||||
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "serviceworkers", &kNS_ABOUT_REDIRECTOR_MODULE_CID },
|
||||
#ifndef ANDROID
|
||||
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "profiles", &kNS_ABOUT_REDIRECTOR_MODULE_CID },
|
||||
#endif
|
||||
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "srcdoc", &kNS_ABOUT_REDIRECTOR_MODULE_CID },
|
||||
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "support", &kNS_ABOUT_REDIRECTOR_MODULE_CID },
|
||||
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "telemetry", &kNS_ABOUT_REDIRECTOR_MODULE_CID },
|
||||
@@ -205,10 +187,6 @@ const mozilla::Module::ContractIDEntry kDocShellContracts[] = {
|
||||
{ NS_LOCALHANDLERAPP_CONTRACTID, &kNS_LOCALHANDLERAPP_CID },
|
||||
#ifdef MOZ_ENABLE_DBUS
|
||||
{ NS_DBUSHANDLERAPP_CONTRACTID, &kNS_DBUSHANDLERAPP_CID },
|
||||
#endif
|
||||
#if defined(MOZ_WIDGET_ANDROID)
|
||||
{ NS_EXTERNALSHARINGAPPSERVICE_CONTRACTID, &kNS_EXTERNALSHARINGAPPSERVICE_CID },
|
||||
{ NS_EXTERNALURLHANDLERSERVICE_CONTRACTID, &kNS_EXTERNALURLHANDLERSERVICE_CID },
|
||||
#endif
|
||||
{ NS_SHENTRY_CONTRACTID, &kNS_SHENTRY_CID },
|
||||
{ NS_SHTRANSACTION_CONTRACTID, &kNS_SHTRANSACTION_CID },
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
#ifndef mozilla_AnimationComparator_h
|
||||
#define mozilla_AnimationComparator_h
|
||||
|
||||
#include "mozilla/dom/Animation.h"
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
// Although this file is called AnimationComparator, we don't actually
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
#include "mozilla/dom/AnimationEffectReadOnly.h"
|
||||
#include "mozilla/dom/AnimationEffectReadOnlyBinding.h"
|
||||
#include "mozilla/dom/Animation.h"
|
||||
#include "mozilla/AnimationUtils.h"
|
||||
#include "mozilla/FloatingPoint.h"
|
||||
|
||||
|
||||
@@ -9,6 +9,9 @@
|
||||
|
||||
#include <initializer_list>
|
||||
|
||||
#include "mozilla/Maybe.h"
|
||||
#include "nsTArray.h"
|
||||
|
||||
class nsXPIDLString;
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include "mozilla/dom/CSSPseudoElement.h"
|
||||
#include "mozilla/dom/CSSPseudoElementBinding.h"
|
||||
#include "mozilla/dom/Element.h"
|
||||
#include "mozilla/dom/KeyframeEffectBinding.h" // for ElementOrCSSPseudoElement class
|
||||
#include "mozilla/AnimationComparator.h"
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include "mozilla/dom/AnimationEffectTiming.h"
|
||||
#include "mozilla/dom/KeyframeEffectBinding.h"
|
||||
#include "mozilla/KeyframeUtils.h"
|
||||
#include "nsContentUtils.h"
|
||||
#include "nsDOMMutationObserver.h" // For nsAutoAnimationMutationBatch
|
||||
#include "nsIScriptError.h"
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
#include "mozilla/dom/KeyframeEffectReadOnly.h"
|
||||
|
||||
#include "mozilla/dom/Animation.h"
|
||||
#include "mozilla/dom/KeyframeAnimationOptionsBinding.h"
|
||||
// For UnrestrictedDoubleOrKeyframeAnimationOptions;
|
||||
#include "mozilla/dom/CSSPseudoElement.h"
|
||||
@@ -25,6 +26,7 @@
|
||||
#include "nsCSSPseudoElements.h" // For CSSPseudoElementType
|
||||
#include "nsIPresShell.h"
|
||||
#include "nsIScriptError.h"
|
||||
#include "nsRefreshDriver.h"
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
|
||||
@@ -37,6 +37,11 @@ EXPORTS.mozilla += [
|
||||
]
|
||||
|
||||
UNIFIED_SOURCES += [
|
||||
'KeyframeEffect.cpp',
|
||||
'KeyframeEffectReadOnly.cpp',
|
||||
]
|
||||
|
||||
SOURCES += [
|
||||
'Animation.cpp',
|
||||
'AnimationEffectReadOnly.cpp',
|
||||
'AnimationEffectTiming.cpp',
|
||||
@@ -50,9 +55,7 @@ UNIFIED_SOURCES += [
|
||||
'DocumentTimeline.cpp',
|
||||
'EffectCompositor.cpp',
|
||||
'EffectSet.cpp',
|
||||
'KeyframeEffect.cpp',
|
||||
'KeyframeEffectParams.cpp',
|
||||
'KeyframeEffectReadOnly.cpp',
|
||||
'KeyframeUtils.cpp',
|
||||
'PendingAnimationTracker.cpp',
|
||||
'TimingParams.cpp',
|
||||
|
||||
@@ -8,10 +8,12 @@
|
||||
|
||||
#include "mozilla/EventDispatcher.h"
|
||||
#include "mozilla/dom/ArchiveRequestBinding.h"
|
||||
#include "mozilla/dom/File.h"
|
||||
#include "mozilla/dom/ScriptSettings.h"
|
||||
#include "nsContentUtils.h"
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::dom;
|
||||
|
||||
USING_ARCHIVEREADER_NAMESPACE
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "mozilla/dom/File.h"
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::dom;
|
||||
USING_ARCHIVEREADER_NAMESPACE
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ EXPORTS.mozilla.dom.archivereader += [
|
||||
'ArchiveZipFile.h',
|
||||
]
|
||||
|
||||
UNIFIED_SOURCES += [
|
||||
SOURCES += [
|
||||
'ArchiveEvent.cpp',
|
||||
'ArchiveReader.cpp',
|
||||
'ArchiveRequest.cpp',
|
||||
|
||||
@@ -16,14 +16,12 @@ EXPORTS += [
|
||||
'AudioChannelService.h',
|
||||
]
|
||||
|
||||
UNIFIED_SOURCES += [
|
||||
SOURCES += [
|
||||
'AudioChannelAgent.cpp',
|
||||
'AudioChannelService.cpp',
|
||||
]
|
||||
|
||||
LOCAL_INCLUDES += [
|
||||
'/dom/base/',
|
||||
]
|
||||
LOCAL_INCLUDES += ['/dom/base/']
|
||||
|
||||
include('/ipc/chromium/chromium-config.mozbuild')
|
||||
|
||||
|
||||
@@ -8,6 +8,9 @@
|
||||
#define mozilla_dom_BlobSet_h
|
||||
|
||||
#include "mozilla/RefPtr.h"
|
||||
#include "jsfriendapi.h"
|
||||
#include "nsString.h"
|
||||
#include "nsTArray.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
#ifndef CORSMode_h_
|
||||
#define CORSMode_h_
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
enum CORSMode : uint8_t {
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
#include "mozilla/Base64.h"
|
||||
#include "mozilla/BasePrincipal.h"
|
||||
#include "jsfriendapi.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#include "mozilla/dom/BindingDeclarations.h"
|
||||
#include "mozilla/dom/ChromeUtilsBinding.h"
|
||||
#include "mozilla/dom/ThreadSafeChromeUtilsBinding.h"
|
||||
#include "mozilla/dom/UnionTypes.h"
|
||||
#include "mozilla/ErrorResult.h"
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
@@ -7,8 +7,11 @@
|
||||
#include "mozilla/dom/CustomElementRegistry.h"
|
||||
|
||||
#include "mozilla/dom/CustomElementRegistryBinding.h"
|
||||
#include "mozilla/dom/Element.h"
|
||||
#include "mozilla/dom/HTMLElementBinding.h"
|
||||
#include "mozilla/dom/WebComponentsBinding.h"
|
||||
#include "mozilla/dom/Promise.h"
|
||||
#include "nsContentUtils.h"
|
||||
#include "nsIParserService.h"
|
||||
#include "jsapi.h"
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include "mozilla/StaticPtr.h"
|
||||
#include "mozilla/ClearOnShutdown.h"
|
||||
#include "nsIDocShell.h"
|
||||
#include "nsNetCID.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#ifndef DocGroup_h
|
||||
#define DocGroup_h
|
||||
|
||||
#include "nsIDocument.h"
|
||||
#include "nsISupports.h"
|
||||
#include "nsISupportsImpl.h"
|
||||
#include "nsIPrincipal.h"
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
#ifndef GroupedSHistory_h
|
||||
#define GroupedSHistory_h
|
||||
|
||||
#include "nsCOMArray.h"
|
||||
#include "nsCycleCollectionParticipant.h" // NS_DECL_CYCLE_*
|
||||
#include "nsIFrameLoader.h"
|
||||
#include "nsIGroupedSHistory.h"
|
||||
#include "nsIPartialSHistory.h"
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
* animating */
|
||||
|
||||
#include "ImageTracker.h"
|
||||
#include "mozilla/Preferences.h"
|
||||
#include "nsAppRunner.h" // for XRE_IsContentProcess
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#ifndef mozilla_dom_ImageTracker
|
||||
#define mozilla_dom_ImageTracker
|
||||
|
||||
#include "imgIRequest.h"
|
||||
#include "nsDataHashtable.h"
|
||||
#include "nsHashKeys.h"
|
||||
|
||||
|
||||
@@ -7,6 +7,9 @@
|
||||
#ifndef mozilla_dom_MutableBlobStorage_h
|
||||
#define mozilla_dom_MutableBlobStorage_h
|
||||
|
||||
#include "nsCycleCollectionParticipant.h"
|
||||
#include "nsThreadUtils.h"
|
||||
#include "nsProxyRelease.h"
|
||||
#include "mozilla/RefPtr.h"
|
||||
#include "prio.h"
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
|
||||
#include "MutableBlobStreamListener.h"
|
||||
#include "MutableBlobStorage.h"
|
||||
#include "nsIInputStream.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
@@ -37,10 +37,7 @@
|
||||
#include "mozilla/dom/PowerManager.h"
|
||||
#include "mozilla/dom/WakeLock.h"
|
||||
#include "mozilla/dom/power/PowerManagerService.h"
|
||||
#include "mozilla/dom/FlyWebPublishedServer.h"
|
||||
#include "mozilla/dom/FlyWebService.h"
|
||||
#include "mozilla/dom/Permissions.h"
|
||||
#include "mozilla/dom/Presentation.h"
|
||||
#include "mozilla/dom/ServiceWorkerContainer.h"
|
||||
#include "mozilla/dom/StorageManager.h"
|
||||
#include "mozilla/dom/TCPSocket.h"
|
||||
@@ -67,8 +64,6 @@
|
||||
#include "nsIAppsService.h"
|
||||
#include "mozIApplication.h"
|
||||
#include "WidgetUtils.h"
|
||||
#include "nsIPresentationService.h"
|
||||
|
||||
#include "mozilla/dom/MediaDevices.h"
|
||||
#include "MediaManager.h"
|
||||
|
||||
@@ -218,7 +213,6 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(Navigator)
|
||||
#ifdef MOZ_EME
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mMediaKeySystemAccessManager)
|
||||
#endif
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mPresentation)
|
||||
#ifdef MOZ_GAMEPAD
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mGamepadServiceTest)
|
||||
#endif
|
||||
@@ -284,10 +278,6 @@ Navigator::Invalidate()
|
||||
mTimeManager = nullptr;
|
||||
}
|
||||
|
||||
if (mPresentation) {
|
||||
mPresentation = nullptr;
|
||||
}
|
||||
|
||||
mServiceWorkerContainer = nullptr;
|
||||
|
||||
#ifdef MOZ_EME
|
||||
@@ -1364,41 +1354,6 @@ Navigator::GetBattery(ErrorResult& aRv)
|
||||
return mBatteryPromise;
|
||||
}
|
||||
|
||||
already_AddRefed<Promise>
|
||||
Navigator::PublishServer(const nsAString& aName,
|
||||
const FlyWebPublishOptions& aOptions,
|
||||
ErrorResult& aRv)
|
||||
{
|
||||
RefPtr<FlyWebService> service = FlyWebService::GetOrCreate();
|
||||
if (!service) {
|
||||
aRv.Throw(NS_ERROR_FAILURE);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
RefPtr<FlyWebPublishPromise> mozPromise =
|
||||
service->PublishServer(aName, aOptions, mWindow);
|
||||
MOZ_ASSERT(mozPromise);
|
||||
|
||||
nsCOMPtr<nsIGlobalObject> global = do_QueryInterface(mWindow);
|
||||
ErrorResult result;
|
||||
RefPtr<Promise> domPromise = Promise::Create(global, result);
|
||||
if (result.Failed()) {
|
||||
aRv.Throw(NS_ERROR_FAILURE);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
mozPromise->Then(AbstractThread::MainThread(),
|
||||
__func__,
|
||||
[domPromise] (FlyWebPublishedServer* aServer) {
|
||||
domPromise->MaybeResolve(aServer);
|
||||
},
|
||||
[domPromise] (nsresult aStatus) {
|
||||
domPromise->MaybeReject(aStatus);
|
||||
});
|
||||
|
||||
return domPromise.forget();
|
||||
}
|
||||
|
||||
PowerManager*
|
||||
Navigator::GetMozPower(ErrorResult& aRv)
|
||||
{
|
||||
@@ -1931,19 +1886,5 @@ Navigator::RequestMediaKeySystemAccess(const nsAString& aKeySystem,
|
||||
}
|
||||
#endif
|
||||
|
||||
Presentation*
|
||||
Navigator::GetPresentation(ErrorResult& aRv)
|
||||
{
|
||||
if (!mPresentation) {
|
||||
if (!mWindow) {
|
||||
aRv.Throw(NS_ERROR_UNEXPECTED);
|
||||
return nullptr;
|
||||
}
|
||||
mPresentation = Presentation::Create(mWindow);
|
||||
}
|
||||
|
||||
return mPresentation;
|
||||
}
|
||||
|
||||
} // namespace dom
|
||||
} // namespace mozilla
|
||||
@@ -39,8 +39,6 @@ class WakeLock;
|
||||
class ArrayBufferViewOrBlobOrStringOrFormData;
|
||||
class ServiceWorkerContainer;
|
||||
class DOMRequest;
|
||||
struct FlyWebPublishOptions;
|
||||
struct FlyWebFilter;
|
||||
} // namespace dom
|
||||
} // namespace mozilla
|
||||
|
||||
@@ -74,7 +72,6 @@ class Connection;
|
||||
} // namespace network
|
||||
|
||||
class PowerManager;
|
||||
class Presentation;
|
||||
class LegacyMozTCPSocket;
|
||||
class StorageManager;
|
||||
|
||||
@@ -141,9 +138,6 @@ public:
|
||||
Geolocation* GetGeolocation(ErrorResult& aRv);
|
||||
Promise* GetBattery(ErrorResult& aRv);
|
||||
|
||||
already_AddRefed<Promise> PublishServer(const nsAString& aName,
|
||||
const FlyWebPublishOptions& aOptions,
|
||||
ErrorResult& aRv);
|
||||
static void AppName(nsAString& aAppName, bool aUsePrefOverriddenValue);
|
||||
|
||||
static nsresult GetPlatform(nsAString& aPlatform,
|
||||
@@ -210,8 +204,6 @@ public:
|
||||
system::AudioChannelManager* GetMozAudioChannelManager(ErrorResult& aRv);
|
||||
#endif // MOZ_AUDIO_CHANNEL_MANAGER
|
||||
|
||||
Presentation* GetPresentation(ErrorResult& aRv);
|
||||
|
||||
bool SendBeacon(const nsAString& aUrl,
|
||||
const Nullable<ArrayBufferViewOrBlobOrStringOrFormData>& aData,
|
||||
ErrorResult& aRv);
|
||||
@@ -288,7 +280,6 @@ private:
|
||||
RefPtr<time::TimeManager> mTimeManager;
|
||||
RefPtr<ServiceWorkerContainer> mServiceWorkerContainer;
|
||||
nsCOMPtr<nsPIDOMWindowInner> mWindow;
|
||||
RefPtr<Presentation> mPresentation;
|
||||
#ifdef MOZ_GAMEPAD
|
||||
RefPtr<GamepadServiceTest> mGamepadServiceTest;
|
||||
#endif
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
|
||||
#include "mozilla/ArrayUtils.h"
|
||||
#include "mozilla/Likely.h"
|
||||
#include "mozilla/Unused.h"
|
||||
|
||||
#include "nsNodeInfoManager.h"
|
||||
#include "nsCOMPtr.h"
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#define mozilla_dom_Pose_h
|
||||
|
||||
#include "nsWrapperCache.h"
|
||||
#include "mozilla/ErrorResult.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
@@ -7,10 +7,12 @@
|
||||
#ifndef TabGroup_h
|
||||
#define TabGroup_h
|
||||
|
||||
#include "nsIDocument.h"
|
||||
#include "nsISupports.h"
|
||||
#include "nsISupportsImpl.h"
|
||||
#include "nsIPrincipal.h"
|
||||
#include "nsTHashtable.h"
|
||||
#include "nsHashKeys.h"
|
||||
#include "nsString.h"
|
||||
|
||||
#include "mozilla/RefPtr.h"
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#include "nsIChannel.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsIHttpChannelInternal.h"
|
||||
#include "nsPIDOMWindow.h"
|
||||
#include "nsIDOMWindow.h"
|
||||
#include "nsILoadContext.h"
|
||||
#include "nsIPrincipal.h"
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "TimeoutHandler.h"
|
||||
#include "nsJSUtils.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
@@ -7,9 +7,11 @@
|
||||
#ifndef mozilla_dom_timeout_handler_h
|
||||
#define mozilla_dom_timeout_handler_h
|
||||
|
||||
#include "nsCycleCollectionParticipant.h" // NS_DECL_CYCLE_*
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsISupports.h"
|
||||
#include "nsITimeoutHandler.h"
|
||||
#include "nsString.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
#ifndef TimerClamping_h___
|
||||
#define TimerClamping_h___
|
||||
|
||||
#include <math.h>
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
class TimerClamping
|
||||
|
||||
+2
-2
@@ -225,7 +225,7 @@ EXPORTS.mozilla.dom += [
|
||||
'WindowOrientationObserver.h',
|
||||
]
|
||||
|
||||
UNIFIED_SOURCES += [
|
||||
SOURCES += [
|
||||
'AnonymousContent.cpp',
|
||||
'Attr.cpp',
|
||||
'BarProps.cpp',
|
||||
@@ -376,7 +376,7 @@ UNIFIED_SOURCES += [
|
||||
]
|
||||
|
||||
if CONFIG['MOZ_WEBRTC']:
|
||||
UNIFIED_SOURCES += [
|
||||
SOURCES += [
|
||||
'nsDOMDataChannel.cpp',
|
||||
]
|
||||
|
||||
|
||||
@@ -1526,6 +1526,40 @@ nsAttrValue::ParseIntWithFallback(const nsAString& aString, int32_t aDefault,
|
||||
SetIntValueAndType(val, eInteger, nonStrict ? &aString : nullptr);
|
||||
}
|
||||
|
||||
void
|
||||
nsAttrValue::ParseClampedNonNegativeInt(const nsAString& aString,
|
||||
int32_t aDefault, int32_t aMin,
|
||||
int32_t aMax)
|
||||
{
|
||||
ResetIfSet();
|
||||
|
||||
nsContentUtils::ParseHTMLIntegerResultFlags result;
|
||||
int32_t val = nsContentUtils::ParseHTMLInteger(aString, &result);
|
||||
bool nonStrict = (result & nsContentUtils::eParseHTMLInteger_IsPercent) ||
|
||||
(result & nsContentUtils::eParseHTMLInteger_NonStandard) ||
|
||||
(result & nsContentUtils::eParseHTMLInteger_DidNotConsumeAllInput);
|
||||
|
||||
if (result & nsContentUtils::eParseHTMLInteger_ErrorOverflow) {
|
||||
if (result & nsContentUtils::eParseHTMLInteger_Negative) {
|
||||
val = aDefault;
|
||||
} else {
|
||||
val = aMax;
|
||||
}
|
||||
nonStrict = true;
|
||||
} else if ((result & nsContentUtils::eParseHTMLInteger_Error) || val < 0) {
|
||||
val = aDefault;
|
||||
nonStrict = true;
|
||||
} else if (val < aMin) {
|
||||
val = aMin;
|
||||
nonStrict = true;
|
||||
} else if (val > aMax) {
|
||||
val = aMax;
|
||||
nonStrict = true;
|
||||
}
|
||||
|
||||
SetIntValueAndType(val, eInteger, nonStrict ? &aString : nullptr);
|
||||
}
|
||||
|
||||
bool
|
||||
nsAttrValue::ParseNonNegativeIntValue(const nsAString& aString)
|
||||
{
|
||||
|
||||
@@ -362,6 +362,19 @@ public:
|
||||
*/
|
||||
bool ParseNonNegativeIntValue(const nsAString& aString);
|
||||
|
||||
/**
|
||||
* Parse a string value into a clamped non-negative integer.
|
||||
* This method follows the rules for parsing non-negative integer from:
|
||||
* https://html.spec.whatwg.org/multipage/infrastructure.html#clamped-to-the-range
|
||||
*
|
||||
* @param aString the string to parse
|
||||
* @param aDefault value to return for negative or invalid values
|
||||
* @param aMin minimum value
|
||||
* @param aMax maximum value
|
||||
*/
|
||||
void ParseClampedNonNegativeInt(const nsAString& aString, int32_t aDefault,
|
||||
int32_t aMin, int32_t aMax);
|
||||
|
||||
/**
|
||||
* Parse a string value into a positive integer.
|
||||
* This method follows the rules for parsing non-negative integer from:
|
||||
|
||||
@@ -1080,6 +1080,7 @@ nsContentUtils::ParseHTMLInteger(const nsAString& aValue,
|
||||
int sign = 1;
|
||||
if (*iter == char16_t('-')) {
|
||||
sign = -1;
|
||||
result |= eParseHTMLInteger_Negative;
|
||||
++iter;
|
||||
} else if (*iter == char16_t('+')) {
|
||||
result |= eParseHTMLInteger_NonStandard;
|
||||
|
||||
@@ -444,7 +444,9 @@ public:
|
||||
// Set if one or more error flags were set.
|
||||
eParseHTMLInteger_Error = 1 << 3,
|
||||
eParseHTMLInteger_ErrorNoValue = 1 << 4,
|
||||
eParseHTMLInteger_ErrorOverflow = 1 << 5
|
||||
eParseHTMLInteger_ErrorOverflow = 1 << 5,
|
||||
// Use this flag to detect the difference between overflow and underflow
|
||||
eParseHTMLInteger_Negative = 1 << 6,
|
||||
};
|
||||
static int32_t ParseHTMLInteger(const nsAString& aValue,
|
||||
ParseHTMLIntegerResultFlags *aResult);
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include "nsDOMMutationObserver.h"
|
||||
|
||||
#include "mozilla/AnimationTarget.h"
|
||||
#include "mozilla/CycleCollectedJSContext.h"
|
||||
#include "mozilla/Maybe.h"
|
||||
#include "mozilla/OwningNonNull.h"
|
||||
|
||||
@@ -29,6 +30,9 @@ using mozilla::dom::TreeOrderComparator;
|
||||
using mozilla::dom::Animation;
|
||||
using mozilla::dom::Element;
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::dom;
|
||||
|
||||
AutoTArray<RefPtr<nsDOMMutationObserver>, 4>*
|
||||
nsDOMMutationObserver::sScheduledMutationObservers = nullptr;
|
||||
|
||||
|
||||
@@ -166,7 +166,6 @@
|
||||
#include "mozilla/dom/HTMLIFrameElement.h"
|
||||
#include "mozilla/dom/HTMLImageElement.h"
|
||||
#include "mozilla/dom/MediaSource.h"
|
||||
#include "mozilla/dom/FlyWebService.h"
|
||||
|
||||
#include "mozAutoDocUpdate.h"
|
||||
#include "nsGlobalWindow.h"
|
||||
@@ -8369,13 +8368,6 @@ nsDocument::CanSavePresentation(nsIRequest *aNewRequest)
|
||||
return false;
|
||||
}
|
||||
|
||||
// Don't save presentation if there are active FlyWeb connections or FlyWeb
|
||||
// servers.
|
||||
FlyWebService* flyWebService = FlyWebService::GetExisting();
|
||||
if (flyWebService && flyWebService->HasConnectionOrServer(win->WindowID())) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (mSubDocuments) {
|
||||
for (auto iter = mSubDocuments->Iter(); !iter.Done(); iter.Next()) {
|
||||
auto entry = static_cast<SubDocMapEntry*>(iter.Get());
|
||||
|
||||
@@ -1261,6 +1261,15 @@ nsFocusManager::SetFocusInner(nsIContent* aNewContent, int32_t aFlags,
|
||||
isElementInActiveWindow = (mActiveWindow && newRootWindow == mActiveWindow);
|
||||
}
|
||||
|
||||
// Exit fullscreen if a website focuses another window
|
||||
if (!isElementInActiveWindow && aFlags & FLAG_RAISE) {
|
||||
if (nsIDocument* doc = mActiveWindow ? mActiveWindow->GetDoc() : nullptr) {
|
||||
if (doc && doc->GetFullscreenElement()) {
|
||||
nsIDocument::AsyncExitFullscreen(doc);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Exit fullscreen if we're focusing a windowed plugin on a non-MacOSX
|
||||
// system. We don't control event dispatch to windowed plugins on non-MacOSX,
|
||||
// so we can't display the "Press ESC to leave fullscreen mode" warning on
|
||||
|
||||
@@ -57,6 +57,7 @@
|
||||
#include "mozilla/dom/ErrorEvent.h"
|
||||
#include "nsAXPCNativeCallContext.h"
|
||||
#include "mozilla/CycleCollectedJSContext.h"
|
||||
#include "mozilla/Telemetry.h"
|
||||
|
||||
#include "nsJSPrincipals.h"
|
||||
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
#include "mozilla/dom/Element.h"
|
||||
#include "mozilla/dom/ScriptSettings.h"
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::dom;
|
||||
|
||||
bool
|
||||
|
||||
@@ -1144,7 +1144,7 @@ nsScriptLoader::InstantiateModuleTree(nsModuleLoadRequest* aRequest)
|
||||
|
||||
nsModuleScript* ms = aRequest->mModuleScript;
|
||||
MOZ_ASSERT(ms);
|
||||
if (!ms->ModuleRecord()) {
|
||||
if (!ms || !ms->ModuleRecord()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -53,11 +53,6 @@ DOMInterfaces = {
|
||||
'concrete': False
|
||||
},
|
||||
|
||||
'AddonManagerPermissions': {
|
||||
'wrapperCache': False,
|
||||
'concrete': False
|
||||
},
|
||||
|
||||
'AnimationEffectReadOnly': {
|
||||
'concrete': False
|
||||
},
|
||||
@@ -340,14 +335,6 @@ DOMInterfaces = {
|
||||
'wrapperCache': False,
|
||||
},
|
||||
|
||||
'FlyWebFetchEvent': {
|
||||
'headerFile': 'FlyWebServerEvents.h',
|
||||
},
|
||||
|
||||
'FlyWebWebSocketEvent': {
|
||||
'headerFile': 'FlyWebServerEvents.h',
|
||||
},
|
||||
|
||||
'FontFaceSet': {
|
||||
'implicitJSContext': [ 'load' ],
|
||||
},
|
||||
|
||||
@@ -1109,6 +1109,12 @@ class CGHeaders(CGWrapper):
|
||||
# Now find all the things we'll need as arguments because we
|
||||
# need to wrap or unwrap them.
|
||||
bindingHeaders = set()
|
||||
|
||||
# KeyframeAnimationOptions.webidl is doing something VERY screwy and
|
||||
# Unified Building really sucks so directly include this
|
||||
if prefix == "KeyframeAnimationOptionsBinding":
|
||||
bindingHeaders.add("mozilla/dom/PrimitiveConversions.h")
|
||||
|
||||
declareIncludes = set(declareIncludes)
|
||||
|
||||
def addHeadersForType((t, dictionary)):
|
||||
|
||||
@@ -16,6 +16,7 @@ def generateLine(propName, extendedAttrs):
|
||||
return " [%s] attribute DOMString %s;\n" % (", ".join(extendedAttrs),
|
||||
propName)
|
||||
def generate(output, idlFilename, preprocessorHeader):
|
||||
print(idlFilename)
|
||||
cpp = list(buildconfig.substs['CPP'])
|
||||
cpp += shellutil.split(buildconfig.substs['ACDEFINES'])
|
||||
cpp.append(preprocessorHeader)
|
||||
|
||||
@@ -4,8 +4,12 @@
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "jswrapper.h"
|
||||
#include "WebIDLGlobalNameHash.h"
|
||||
#include "js/GCAPI.h"
|
||||
#include "XrayWrapper.h"
|
||||
#include "XPCWrapper.h"
|
||||
#include "mozilla/dom/Selection.h"
|
||||
#include "mozilla/HashFunctions.h"
|
||||
#include "mozilla/Maybe.h"
|
||||
#include "mozilla/dom/DOMJSProxyHandler.h"
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#define mozilla_dom_WebIDLGlobalNameHash_h__
|
||||
|
||||
#include "js/RootingAPI.h"
|
||||
#include "nsString.h"
|
||||
#include "nsTArray.h"
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
@@ -89,7 +89,7 @@ LOCAL_INCLUDES += [
|
||||
'/media/webrtc/signaling/src/peerconnection',
|
||||
]
|
||||
|
||||
UNIFIED_SOURCES += [
|
||||
SOURCES += [
|
||||
'BindingUtils.cpp',
|
||||
'CallbackInterface.cpp',
|
||||
'CallbackObject.cpp',
|
||||
|
||||
@@ -269,6 +269,7 @@ class WebIDLCodegenManager(LoggingMixin):
|
||||
# Generate bindings from .webidl files.
|
||||
for filename in sorted(changed_inputs):
|
||||
basename = mozpath.basename(filename)
|
||||
print basename
|
||||
result.inputs.add(filename)
|
||||
written, deps = self._generate_build_files_for_webidl(filename)
|
||||
result.created |= written[0]
|
||||
|
||||
@@ -14,8 +14,13 @@
|
||||
#include "jsapi.h"
|
||||
#include "js/RootingAPI.h"
|
||||
|
||||
#include "jswrapper.h"
|
||||
#include "nsCOMArray.h"
|
||||
#include "nsContentUtils.h"
|
||||
#include "nsCycleCollectionParticipant.h"
|
||||
#include "nsIScriptError.h"
|
||||
#include "nsString.h"
|
||||
#include "nsStringFwd.h"
|
||||
|
||||
class nsScriptErrorNote final : public nsIScriptErrorNote {
|
||||
public:
|
||||
|
||||
@@ -22,7 +22,7 @@ using namespace mozilla::dom;
|
||||
namespace {
|
||||
|
||||
static nsCString
|
||||
FormatStackString(JSContext* cx, HandleObject aStack) {
|
||||
FormatStackString(JSContext* cx, JS::HandleObject aStack) {
|
||||
JS::RootedString formattedStack(cx);
|
||||
|
||||
if (!JS::BuildStackString(cx, aStack, &formattedStack)) {
|
||||
@@ -111,7 +111,7 @@ nsScriptErrorWithStack::ToString(nsACString& /*UTF8*/ aResult)
|
||||
}
|
||||
|
||||
JSContext* cx = jsapi.cx();
|
||||
RootedObject stack(cx, mStack);
|
||||
JS::RootedObject stack(cx, mStack);
|
||||
nsCString stackString = FormatStackString(cx, stack);
|
||||
nsCString combined = message + NS_LITERAL_CSTRING("\n") + stackString;
|
||||
aResult.Assign(combined);
|
||||
|
||||
@@ -8,20 +8,16 @@ EXPORTS.mozilla.dom += [
|
||||
'BroadcastChannel.h',
|
||||
]
|
||||
|
||||
UNIFIED_SOURCES += [
|
||||
SOURCES += [
|
||||
'BroadcastChannel.cpp',
|
||||
'BroadcastChannelChild.cpp',
|
||||
'BroadcastChannelParent.cpp',
|
||||
'BroadcastChannelService.cpp',
|
||||
]
|
||||
|
||||
IPDL_SOURCES += [
|
||||
'PBroadcastChannel.ipdl',
|
||||
]
|
||||
IPDL_SOURCES += ['PBroadcastChannel.ipdl']
|
||||
|
||||
LOCAL_INCLUDES += [
|
||||
'../workers',
|
||||
]
|
||||
LOCAL_INCLUDES += ['../workers']
|
||||
|
||||
MOCHITEST_MANIFESTS += ['tests/mochitest.ini']
|
||||
BROWSER_CHROME_MANIFESTS += ['tests/browser.ini']
|
||||
|
||||
Vendored
+1
@@ -12,6 +12,7 @@
|
||||
#include "mozilla/dom/cache/SavedTypes.h"
|
||||
#include "mozilla/ipc/FileDescriptorSetParent.h"
|
||||
#include "mozilla/ipc/InputStreamUtils.h"
|
||||
#include "mozilla/ipc/IPCStreamUtils.h"
|
||||
#include "mozilla/ipc/SendStream.h"
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
Vendored
+3
@@ -7,6 +7,7 @@
|
||||
#include "mozilla/dom/cache/CacheStorage.h"
|
||||
|
||||
#include "mozilla/Unused.h"
|
||||
#include "mozilla/dom/CacheBinding.h"
|
||||
#include "mozilla/dom/CacheStorageBinding.h"
|
||||
#include "mozilla/dom/Promise.h"
|
||||
#include "mozilla/dom/Response.h"
|
||||
@@ -29,6 +30,8 @@
|
||||
#include "nsURLParsers.h"
|
||||
#include "WorkerPrivate.h"
|
||||
|
||||
using namespace mozilla::dom;
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
namespace cache {
|
||||
|
||||
+1
@@ -11,6 +11,7 @@
|
||||
#include "mozilla/dom/cache/CacheTypes.h"
|
||||
#include "mozilla/dom/cache/ReadStream.h"
|
||||
#include "mozilla/ipc/FileDescriptorSetChild.h"
|
||||
#include "mozilla/ipc/IPCStreamUtils.h"
|
||||
#include "mozilla/ipc/PBackgroundChild.h"
|
||||
#include "mozilla/ipc/PFileDescriptorSetChild.h"
|
||||
#include "nsISupportsImpl.h"
|
||||
|
||||
+2
@@ -11,6 +11,7 @@
|
||||
#include "mozilla/dom/cache/ReadStream.h"
|
||||
#include "mozilla/dom/cache/StreamList.h"
|
||||
#include "mozilla/ipc/FileDescriptorSetParent.h"
|
||||
#include "mozilla/ipc/IPCStreamUtils.h"
|
||||
#include "mozilla/ipc/PBackgroundParent.h"
|
||||
#include "mozilla/ipc/PFileDescriptorSetParent.h"
|
||||
#include "nsISupportsImpl.h"
|
||||
@@ -20,6 +21,7 @@ namespace dom {
|
||||
namespace cache {
|
||||
|
||||
using mozilla::dom::OptionalFileDescriptorSet;
|
||||
using mozilla::ipc::AutoIPCStream;
|
||||
using mozilla::ipc::FileDescriptor;
|
||||
using mozilla::ipc::FileDescriptorSetParent;
|
||||
using mozilla::ipc::PFileDescriptorSetParent;
|
||||
|
||||
Vendored
+3
@@ -12,9 +12,12 @@
|
||||
#include "nsID.h"
|
||||
#include "nsIInputStream.h"
|
||||
#include "nsISupportsImpl.h"
|
||||
#include "mozilla/ErrorResult.h"
|
||||
#include "mozilla/RefPtr.h"
|
||||
#include "nsTArrayForwardDeclare.h"
|
||||
|
||||
using namespace mozilla;
|
||||
|
||||
namespace mozilla {
|
||||
namespace ipc {
|
||||
class AutoIPCStream;
|
||||
|
||||
Vendored
+1
@@ -14,6 +14,7 @@
|
||||
#include "mozilla/dom/cache/CacheTypes.h"
|
||||
#include "mozilla/dom/cache/ReadStream.h"
|
||||
#include "mozilla/ipc/BackgroundChild.h"
|
||||
#include "mozilla/ipc/IPCStreamUtils.h"
|
||||
#include "mozilla/ipc/PBackgroundChild.h"
|
||||
#include "mozilla/ipc/PFileDescriptorSetChild.h"
|
||||
#include "mozilla/ipc/InputStreamUtils.h"
|
||||
|
||||
Loaded 100 of 4889 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user