Compare commits

..
223 Commits
Author SHA1 Message Date
Moonchild 15335ce39d [devtools] Improve special character escaping for curl 2025-05-29 17:28:44 +02:00
Moonchild 14b03e1f8c No issue - Set device contrast to an acceptable value if OOB.
On Mac and Win+DW, enhanced device contrast can possibly not be set.
This throws Skia for a loop by passing in an OOB scalar to its init.
Work around this by setting an accepted average value that helps
prevent font wash-out while not causing fringing.
2025-05-29 17:28:30 +02:00
Moonchild 0968b94e5c No issue - Force C++ run-time type information on protobuf (uplift)
Protobuf uses `dynamic_cast` on polymorphic types which cannot be
inferred properly at compile-time, which can lead to unexpected behavior.
As a code safety measure, enable C++ RTTI for protobuf.
2025-05-29 17:27:29 +02:00
Moonchild ba6b2258aa No issue - Don't support modulo math space in ExtractLinearSum. (uplift) 2025-05-20 00:56:35 +02:00
Moonchild 1e1715ff11 No issue - Fix promise combinator function state. (uplift) 2025-05-19 22:50:48 +02:00
Brian Smith c93381fa79 No Issue - Fixes for building with LLVM 19 (uplift).
Fix a conflict with libc++ 19 and the old Mozilla (re)alloc macros.
LLVM 18+ does not allow std::char_traits<unsigned char> so avoid it.
https://bugzilla.mozilla.org/show_bug.cgi?id=1849070
Partial NSS upgrade to replace ByteString with a class.
https://bugzilla.mozilla.org/show_bug.cgi?id=1851092
2025-05-07 13:01:33 +02:00
Moonchild 65b0a59757 [devtools] Escape some more characters for copying as cURL on Posix. 2025-04-30 15:01:54 +02:00
Moonchild c785639043 [NSS] Update NSS version to 3.90.7 2025-04-30 15:01:48 +02:00
Moonchild 512c259822 [NSS] Update built-in data 2025-04-30 15:01:42 +02:00
Moonchild 90fea6f0d4 [NSS] Improve locking in nssPKIObject_GetInstances. 2025-04-30 15:01:35 +02:00
Moonchild d892468fd0 Issue #2731 - Fix crashes on unknown BigInt types in JIT (uplift)
This only works around the unknown type crashes but doesn't actually fix
attempts at using 64-bit BigInts in Ion.
Resolves #2731
2025-04-22 15:27:34 +02:00
Moonchild 81ab98b329 Merge branch 'master' into release 2025-04-04 20:37:42 +02:00
Moonchild 3f1cacd3e6 Merge branch 'master' into release 2025-04-03 10:22:24 +02:00
Moonchild 6e41e01a29 No issue - fix some minor link issues in about:rights
Privacy was moved to a subdir. Also replacing http with https because
that is what everyone expects by default.
2025-03-07 15:43:13 +01:00
Moonchild 9ce81488d4 No issue - Update Twemoji font to unicode 15.1.3 2025-03-07 02:06:25 +01:00
Moonchild 25bc2630d9 [js] Disable potentially unsafe attempts at recovering JIT operations. 2025-03-06 20:18:39 +01:00
Moonchild e5b69418a0 No Issue - NULL crash fix in nsExternalResourceMap::PendingLoad::OnDataAvailable
Curiously, we should have had this at our fork point (as it was backported
by Mozilla to 52.5.2) by apparently Tobin's import wasn't actually 52.6.0.
:-/
2025-03-06 20:18:24 +01:00
Shadow 229a69be5f Update js/src/wasm/WasmIonCompile.cpp
Bug 1328639 , wasm , Simplify block-value popping in Ion compilation
2025-03-06 20:18:07 +01:00
Moonchild 7f2561312a [layout] Always reserve 64 bits for frame property value
This ensures frame property values can always be stored even in edge cases
on 32-bit machines (where a void ptr is half the width).
2025-02-18 21:42:59 +01:00
Moonchild 93d11a07f9 Issue #2694 - Improve nested grid layout performance by caching.
This improves performance by caching the grid items' block axis
measurement, avoiding potentially exponential calculations and reflows.
Resolves #2694
2025-02-18 16:57:20 +01:00
Moonchild 8e5e24c4c6 Issue #2693 - Disable CSP reporting by default in the platform.
This is a temporary measure to work around CF OOM situations.
Reporting is desirable normally so webmasters get alerted to CSP issues,
and this should be flipped back on once we can.
2025-02-18 10:13:35 +01:00
Moonchild 517ee6754c [DOM] Honor security.csp.reporting.enabled pref in more places. 2025-02-18 10:13:28 +01:00
Moonchild 47690c287c No issue - avoid potential underflow in StructuredClone.
Prevents potential loop-around if there's bogus internal Map data.
2025-02-18 10:13:19 +01:00
Moonchild 364b95170e Merge branch 'master' into release 2025-02-05 23:36:07 +01:00
Moonchild 407006d673 Merge branch 'master' into release 2025-02-05 18:33:29 +01:00
Moonchild 2d60605cc6 Merge branch 'master' into release
# Conflicts:
#	netwerk/cookie/nsCookieService.cpp
2025-02-03 19:13:42 +01:00
Moonchild 2d1129eb7e [network] Don't try to use non-existing connections. 2025-01-13 20:29:31 +01:00
Moonchild 495b4980e7 [DOM] Convert cleanup of FlushCurrentWord() to a ScopeExit task.
Ensures consistent cleanup even if early exit due to OOM.
2025-01-10 15:55:10 +01:00
Moonchild ad480be112 [DOM] Slightly extend lifetime of data in Structured Clone operations. 2025-01-10 15:54:44 +01:00
Moonchild a06001c022 [network] Verify connection NPN against negotiated NPN. 2025-01-10 15:54:35 +01:00
Moonchild 6cbda74aeb Issue #2670 - Compute baseDomain when cookies are read from the database
baseDomain is used as a key for cookies in a hashmap. For cookie
operations to work properly, the baseDomain generation must be reliable.
This is, however, not the case, because the result can change by updates
to the public suffix list (PSL).

Since the stored baseDomain is not reliable, the value must be recomputed
when the database is read. This causes a minor performance hit but is
needed if we want to keep abreast of PSL changes without clobbering the
cookies database.

Resolves #2670
2024-12-24 22:12:33 +01:00
Moonchild 576fbdf490 Issue #2672 - Follow-up: Remove unused telemetry variable. 2024-12-24 22:12:24 +01:00
Moonchild 52b00c38ea Issue #2672 - Part 4: Prevent db access while rebuilding is underway. 2024-12-24 22:12:15 +01:00
Moonchild 8ec56f459b Issue #2672 - Part 3: Ensure thread lifetimes are in tandem. 2024-12-24 22:12:05 +01:00
Moonchild 5cbe423461 Issue #2672 - Part 2: Auto-close syncConn for edge cases. 2024-12-24 22:11:59 +01:00
Moonchild 369fbba750 Issue #2672 - Part 1: Load nsCookieService OMT and use sync reads.
No more lazy-loading on the main thread, thanks. Everyone needs this.
2024-12-24 22:11:52 +01:00
Martok 8e3c35efc6 Issue #1787 - Follow-up: remove no longer used AppClearDataObserver. 2024-12-24 22:11:37 +01:00
Moonchild b3b852b877 Merge branch 'master' into release 2024-12-04 11:10:21 +01:00
Moonchild d5c6e20e9e Merge branch 'master' into release 2024-12-01 20:52:12 +01:00
Moonchild 89b36775fb Merge branch 'master' into release 2024-11-29 10:21:36 +01:00
Karl Tomlinson df16df5693 Bug 1920800 - Remove oldImages from check for flushed old principal handle
The logic should be equivalent when frame IDs on aImages are contiguously
increasing from IDs on previously set frames.

There are currently no callers passing empty aImages, but the logic in this
case would now be as described in the documentation of
UpdatePrincipalHandleForFrameID():

> We will notify mElement that aPrincipalHandle has been applied when all
> FrameIDs prior to aFrameID have been flushed out.
2024-10-31 11:44:56 +01:00
Moonchild aa1fd576ac Issue #2648 - Inherit the content disposition of the multipart response 2024-10-30 10:54:11 +01:00
Moonchild 2512188ca7 Issue #2648 - Apply CSP to documents sent through multipart/x-mixed-replace 2024-10-30 10:54:04 +01:00
Moonchild 89e88ca6a0 Merge branch 'master' into release 2024-10-02 19:45:47 +02:00
Moonchild 2697dd162f [js xpconnect] Fix error handling in xpc::CreateSandboxObject 2024-09-05 10:13:09 +02:00
Moonchild 53a4179c4a [js] Simplify with-env handling in FetchName 2024-09-05 10:13:01 +02:00
Moonchild a120731ddd [DOM] Stop exposing NotifyPaintEvent to web content.
There's no reason this should be available to the web, as it's an
indicator of browser internals.
2024-09-05 10:12:55 +02:00
Moonchild bda611a41a Revert "Issue #2523 - Part 1 - Import headers from FFmpeg 7.0"
This reverts commit 27bb48deaf.
2024-09-03 13:03:20 +02:00
Moonchild 5a02a4a1a4 Revert "Issue #2523 - Part 2 - Update audio & video decoders to work with FFmpeg 7.0"
This reverts commit 7dbc24a739.
2024-09-03 13:03:12 +02:00
Moonchild e59f358b45 Revert "Issue #2527 - Part 1 - Remove old FFmpeg and LibAV headers"
This reverts commit b970fc412a.
2024-09-03 13:02:55 +02:00
Moonchild 90c9535b39 Revert "Issue #2527 - Part 2 - Remove support for libavcodec < 58"
This reverts commit 738c6a740a.
2024-09-03 13:02:46 +02:00
Moonchild ad778bbfdb Revert "Issue #2527 - Part 3 - Remove additional checks for LibAV"
This reverts commit b0f872c919.
2024-09-03 13:02:31 +02:00
Moonchild 8868552b24 Merge branch 'master' into release 2024-08-09 19:35:34 +02:00
Moonchild 66826eb487 Merge branch 'master' into release 2024-08-09 19:18:02 +02:00
Moonchild 39127b5ee9 Merge branch 'master' into release 2024-08-09 16:18:50 +02:00
Moonchild 80cff816a8 Merge branch 'master' into release 2024-08-09 15:56:36 +02:00
Moonchild e9dda8dafa Merge branch 'master' into release
# Conflicts:
#	security/nss/doc/rst/releases/index.rst
#	security/nss/lib/nss/nss.h
#	security/nss/lib/softoken/softkver.h
#	security/nss/lib/util/nssutil.h
2024-08-07 20:13:00 +02:00
Moonchild 11fc818dfb [DOM/network] Disable DNS prefetching if document nodePrincipal is systemPrincipal 2024-07-10 10:54:53 +02:00
Moonchild 84ed844e3f [IPC] Clean up control flow in WaitableEvent. 2024-07-10 10:54:43 +02:00
Moonchild 50af804f1c [network] Add additional cookie setting checks.
Added checks for sub-document navigations from cross-site to same-site in
third-party checks when setting a cookie.
2024-07-10 10:54:37 +02:00
Moonchild 82ce93bce9 No issue - Update SQLite to 3.46.0 2024-07-10 10:54:24 +02:00
Moonchild 228abc8259 No issue - Update NSS to 3.90.3 2024-07-10 10:54:17 +02:00
Moonchild 1692fa5291 Issue #2045 - Temporarily force hidden elements to be actually hidden.
For the time being, because we don't have `revert` yet, we should force
normally hidden elements to be hidden, so they aren't revealed by sites
using the bad practice of `*{ }` style blanking rules but then using
`revert` to re-hide them.
2024-07-10 10:54:02 +02:00
Moonchild bb58c6ae38 Issue #2541 - Deal with empty LineNameList in CSS grid templates.
Resolves #2541
2024-07-02 01:39:01 +02:00
Moonchild 4f58dc27f9 Re-synchronize branches, picking up 2 commits that were not correctly merged. 2024-06-16 12:32:02 +02:00
Moonchild fc5324b9f7 Issue #2532 - Align dialog submission triggered by form.submit() with the spec.
Submission in click handler of submit button should not be deferred
per https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#submit-dialog

See Bug 1719872
2024-06-15 17:56:37 +02:00
Moonchild 561f65aabf Issue #2532 - Prevent unwanted text selection when backdrop is clicked. 2024-06-15 17:56:31 +02:00
Moonchild 9acfe36b95 Issue #2532 - Don't do PreventDefault for escape key if <select> dropdown is not shown
We always use PreventDefault for <select> element, which is problematic if modal
dialog is on as it prevents cancelling the dialog. We fix it by not blocking the
default action if <select> is not shown.

See Bug 1649278
2024-06-15 17:56:25 +02:00
Moonchild ce495cbd85 Issue #2532 - Fix a null pointer crash while doing dialog form submission
See Bug 1652699
2024-06-15 17:56:20 +02:00
Moonchild c44020f188 Issue #2532 - Default pref check to true 2024-06-15 17:56:15 +02:00
Moonchild 35e7a695af Issue #2532 - Implement form[method=dialog]
See bug 1557303
2024-06-15 17:56:08 +02:00
Moonchild 7a55055d22 Merge branch 'master' into release 2024-06-13 21:31:39 +02:00
Moonchild 061900b87f [gfx] Use calloc for cairo font-creation functions. 2024-05-23 13:48:18 +02:00
Moonchild abe32f7309 [gfx] Ensure font entry's unitsPerEm and font extents are initialized when gfxFont is created. 2024-05-23 13:48:11 +02:00
Moonchild 7bfd4c7fe7 [DOM] Clean up ReportLoadError and normalize error messages. 2024-05-23 13:48:04 +02:00
Moonchild 859d6a3e2c [gfx] Clear mSharedBlobData if blob creation failed. 2024-05-23 13:47:58 +02:00
Moonchild c2f05f99af [network] Make http digest auth cnonce length configurable. 2024-05-23 13:47:50 +02:00
Moonchild 55b33fb02b Merge branch 'master' into release 2024-04-19 22:05:10 +02:00
Moonchild c247e40d41 Revert "Update NSS to 3.90.2"
This reverts commit b1cb7e0a8f.
2024-03-23 07:45:56 +01:00
Moonchild 05c58f159d Revert "Undo build system change from NSS update to fix missing command-line utils."
This reverts commit 67d5fefcf2.
2024-03-23 07:45:40 +01:00
Moonchild 67d5fefcf2 Undo build system change from NSS update to fix missing command-line utils. 2024-03-21 21:53:57 +01:00
Moonchild aad017be9e [MFBT] Make move assignment of RefPtr have the same behavior as nsCOMPtr 2024-03-20 19:52:30 +01:00
Moonchild 4543dbf3ff [parser] Specialize AddAttributes for <html>/<body>. 2024-03-20 19:52:24 +01:00
Moonchild b1cb7e0a8f Update NSS to 3.90.2 2024-03-20 19:52:08 +01:00
Moonchild 1c6d21c97d [network] Block set-cookie from multipart/x-mixed-replace 2024-02-22 23:20:07 +01:00
Eitan Isaacson fc42fb38c9 [layout] Process pairs in coord list in PolyArea.
Range -1 assures the array is even with a step size of 2, avoiding lone
value processing.
2024-02-22 23:19:59 +01:00
Jens Stutte 618068c15b [DOM] Check if WorkerRunnable::Run runs on top of WorkerThreadPrimaryRunnable::Run in a worker thread. 2024-02-22 23:19:53 +01:00
FranklinDM 808516a0a8 No issue - Replacing location might throw NS_ERROR_UNEXPECTED while the developer tools window is being destroyed 2024-02-22 23:19:45 +01:00
FranklinDM 7d6b806040 No issue - Remove leftover doorhanger code from the developer tools
Partially based on reverting https://bugzilla.mozilla.org/show_bug.cgi?id=1078539
2024-02-22 23:19:38 +01:00
Martok 6b4e2c9d73 Issue #2453 - Follow-Up: Use hard-coded minimum timer interval in workers.
From the spec: "If nesting level is greater than 5, and timeout is less than 4, then set timeout to 4.",
therefore not having it user-configurable doesn't really break anything.
2024-02-22 23:19:20 +01:00
Moonchild 787883f6a4 Disable URL-paste content loading by default.
See https://repo.palemoon.org/MoonchildProductions/Pale-Moon/issues/1957
2024-02-22 23:18:36 +01:00
Moonchild 7f02753c04 Issue #2465 - Do not use our in-tree metrics hints if using system-cairo
Use a somewhat equivalent font-options instance when using the
system-supplied cairo lib, instead of our in-tree extension.

Resolves #2465
2024-02-07 21:40:55 +01:00
Moonchild 8fa38b3445 Issue #618 - Follow-up: Fix missed constant refactor preventing ExportEntries from working. 2024-02-07 21:40:29 +01:00
Moonchild 541c5f9f45 Merge branch 'master' into release 2024-01-25 15:55:20 +01:00
Moonchild 4b6bd4976a Merge branch 'master' into release
# Conflicts:
#	modules/libpref/init/all.js
2024-01-25 09:09:51 +01:00
Moonchild a0843d52b4 Revert "[XPCOM] Compare return value of readlink in nsLocalFileUnix::GetNativeTarget"
This reverts commit 188f61505f.
2023-12-21 14:03:31 +01:00
Kershaw Chang 977a8cbed8 Bug 1736385 - Make sure thread is alive in CacheIOThread::ThreadFunc 2023-12-21 11:44:50 +01:00
Moonchild 1e85085305 [dom] Better handling of aborted websocket workers.
Catch the case where we are in worker-shutdown but are still connecting
and make filing and closing connections a bit more robust with a RefPtr.
2023-12-21 11:44:42 +01:00
Barret Rennie 188f61505f [XPCOM] Compare return value of readlink in nsLocalFileUnix::GetNativeTarget 2023-12-21 11:44:32 +01:00
Moonchild a514d7f6a4 [layout] Always check against fragment length in nsTextFrame 2023-12-21 11:44:21 +01:00
Moonchild 47c2c75ceb Bug 1868901 2023-12-21 11:44:12 +01:00
Moonchild 7082ec8a9a No issue - Allow redirects for requests that require preflight
Spec update, see Bug 1312864
2023-12-21 11:43:58 +01:00
Brian Smith 2907a84362 Issue #2387 - Remove a missed AddRef() which could cause leaks.
Update comments explaining how the reference counting works.
2023-12-10 23:58:08 +01:00
Brian Smith b8d1ee05c3 Issue #2387 - Collection of fixes related to a crash while canceling a dynamic import.
Add AddRef/Release hooks for embedding's script or module private value and set this script source object where appropriate.
https://bugzilla.mozilla.org/show_bug.cgi?id=1519140 Partial, no Value passing changes.
Clear the list of dynamic import requests after cancelling them in ScriptLoader::ParsingComplete as we do for other requests.
https://bugzilla.mozilla.org/show_bug.cgi?id=1291535
ScriptLoader::OnStreamComplete never returns a failure.
https://bugzilla.mozilla.org/show_bug.cgi?id=1627275
Also cancel the correct kind of parser for Modules.
2023-12-10 23:57:54 +01:00
Moonchild 0b625e624a [DOM] Fix double-free crash in MessagePort.cpp 2023-12-10 17:02:28 +01:00
Moonchild a4da712f91 Issue #2281 - Exclude throw wrapping on modern libcpp.
As discussed.
2023-11-25 18:17:35 +01:00
Moonchild 185f124e87 Issue #2381 - Remove system-nspr/nss leftovers (release port) 2023-11-25 17:15:01 +01:00
Moonchild 8633077691 [WebGL] Flip the validation state for gl_KHR_no_validation.
The original state was inverted due to confusion due to a double
negative (not:no_error).
This validation should only be enabled on Windows (for now).
Future tracking and discussion in BZ 1862039
2023-11-24 12:24:55 +01:00
Moonchild 39a1899045 [DOM] Improve MessagePort state machine. 2023-11-24 12:24:32 +01:00
Moonchild 4dc011a187 [Network] Fix relative URL path starting with multiple slashes 2023-11-24 12:24:19 +01:00
Moonchild ccb12e1dda [DOM] Check if rootDoc is secure context for web compat 2023-11-24 12:24:04 +01:00
Moonchild 63f0d3e295 [WebGL] Turn on more validation/error checking in webgl (when not on Win) 2023-11-24 12:23:49 +01:00
Moonchild 09d598c496 Revert "No Issue - add mutex in EventSource"
This reverts commit 10b3237e52.

Apparently causes deadlocks in Linux.
2023-11-15 12:22:11 +01:00
Moonchild 7e60482d80 No issue - Stop supporting data: scheme in SVG <use> elements. 2023-11-14 12:42:58 +01:00
Moonchild 10b3237e52 No Issue - add mutex in EventSource
Potentially avoids a gc crash when load is high.
2023-11-14 12:42:26 +01:00
athenian200 99af7cc028 Issue #1824 - Support SunOS Linker mapfiles.
Generating OS-appropriate mapfiles from a provided SYMBOL_FILE is
apparently required to work with newer ffvpx. Nothing else in our
codebase actually seemed to require it. Also seems to reduce the amount
of console spam I see relating to symbol visibility during the build
process, and I think it even makes libxul.so link a bit faster.
2023-11-04 01:47:00 -05:00
athenian200 76b360b5d1 Issue #1824 - Move to GCC 10.
It seems to work, but it is a lot slower than compiling with GCC 7.
2023-11-04 01:38:20 -05:00
Moonchild 4001b58a3e [DOM] For now, use C++11 static_asserts only.
Single-param static_assert is C++17 or later.
Follow-up to 3d92b82125
2023-10-27 14:20:10 +02:00
Moonchild 134a8aac87 Issue #35 - Follow-up: undo locale changes so they aren't pre-processed.
Pre-processing loses our localization notes and licensing headers for
l10n which is not a good thing. It's not a big deal having a few unused
strings in these files in the resulting locales.
2023-10-26 22:47:13 +02:00
Moonchild 3e2e48872a Merge branch 'master' into release 2023-10-25 22:51:58 +02:00
Moonchild 622b43cbc5 Merge branch 'master' into release 2023-10-25 22:49:37 +02:00
Moonchild 75b44ef620 Merge branch 'master' into release
# Conflicts:
#	js/src/wasm/WasmBinaryIterator.cpp
#	media/libvpx/vp8/encoder/onyx_if.c
2023-10-05 23:43:10 +02:00
Basilisk-Dev 00084ea49c Cherry-pick upstream libvpx fix
Backport of https://hg.mozilla.org/releases/mozilla-esr115/rev/5241232a3292943bd59ff1704eab60fee3cbc9d1
Addresses CVE-2023-5217
2023-09-28 16:18:01 +02:00
Moonchild b6fae24296 [network] Refactor TransactionObserver::OnDataAvailable() 2023-09-27 21:55:28 +02:00
André Bargull 13c6b7422d [js] Handle dead wrappers 2023-09-27 21:55:19 +02:00
Moonchild 24f2e663cd Restore incorrect SIMD Op removals. 2023-09-25 10:48:42 +02:00
Brian Smith f96b155988 Issue #2313 - Implement WebAssembly sign extension opcodes. (uplift) 2023-09-25 10:46:25 +02:00
Brian Smith d5cc24e916 Issue #2308 & #1240 Follow-up - Fill in missing JSOP_INC/DEC cases for Doubles in Ion. 2023-09-20 03:34:06 +02:00
Brian Smith 8eba271c5f Issue #2308 & #1240 Follow-up - Replace JSOP_POS in ++/-- with JSOP_TONUMERIC.
https://bugzilla.mozilla.org/show_bug.cgi?id=1519135
2023-09-20 03:33:57 +02:00
Brian Smith 19955c82b3 Issue #2308 & #1240 Follow-up - Fill in missing JSOP_INC/DEC cases for Ion on Intel32/64. 2023-09-20 03:33:50 +02:00
Brian Smith 80ae8aec7c Issue #2308 & #1240 Follow-up - Add BigInt support to JSOP_INC and JSOP_DEC.
https://bugzilla.mozilla.org/show_bug.cgi?id=1526309
2023-09-20 03:33:41 +02:00
Brian Smith d8441d7c81 Issue #2308 & #1240 Follow-up - Introduce new increment and decrement operations.
https://bugzilla.mozilla.org/show_bug.cgi?id=1508521
2023-09-20 03:33:33 +02:00
Brian Smith c2446f2478 Issue #2308 - Fix JSON BigInt regressions.
https://bugzilla.mozilla.org/show_bug.cgi?id=1522433
2023-09-20 03:33:23 +02:00
Brian Smith 6efb7a1904 Issue #2282 - Performance observer safety checks.
Both fixes from later revisions, without the Dispatch API changes.
2023-09-20 03:33:14 +02:00
Brian Smith fa0b03a10f Issue #2026 Follow-up: Fill in missing BigInt64 cases in js::IsTypedArrayConstructor().
Hopefully fixes RSA errors on ProtonMail.
2023-09-20 03:32:41 +02:00
Moonchild 3ae2972950 Issue #2309 - Cherry-pick upstream libwebp fix.
Backport of: https://chromium.googlesource.com/webm/libwebp.git/+/2af26267cdfcb63a88e5c74a85927a12d6ca1d76

Resolves #2309
2023-09-13 10:22:50 +02:00
Moonchild 2d48de9998 Merge branch 'master' into release 2023-09-01 15:44:29 +02:00
Moonchild 3b029cdfe4 Merge branch 'master' into release 2023-07-15 16:01:39 +02:00
Moonchild ea9077a8a5 Merge branch 'master' into release 2023-07-07 19:41:06 +02:00
Moonchild b4af6b6265 No issue - Set the default for incremental cycle collector to be off.
Negative performance impact if enabled.
2023-06-05 21:17:24 +02:00
Moonchild ae1d53ceb1 Issue #2257 - Remove rematerialized frames after bailouts and exceptions.
This ensures that rematerialized frames used by the devtools debugger
are properly removed so that no stale data is used during bailouts.
2023-06-05 21:17:13 +02:00
Brian Smith c3f4709d5e Issue #2252 - Prevent crash when attempting to load a script with execution disallowed.
This issue is due to the ExecutionContext added in Issue #1691 not handling GetScript()
in a context where script execution is not allowed.  This expressed itself in crashes when
playing MP4s with the NoScript extension installed and enabled.
2023-06-05 21:16:57 +02:00
FranklinDM a7bb3fc175 Issue #1592 - Follow-up: Ensure topmost scope marker is cleaned up 2023-06-05 21:16:43 +02:00
FranklinDM 6a0203f25f Issue #2250 - Part 2: Ignore the ancestor filter assertion if rule matching is restricted or if the current element is under a shadow host
This only affects debug builds.
2023-06-05 21:16:31 +02:00
FranklinDM b0dfcb147f Issue #2250 - Part 1: Return early if the element being tested for is likely an ancestor and does not have an assigned slot 2023-06-05 21:16:22 +02:00
Job Bautista 06fd4c9357 Issue #2221 - Follow-up: Simplify jit_ioncheck{1|2|3}_deunified_sources assignment. 2023-06-05 21:15:52 +02:00
Job Bautista b9ea7fd9ee Issue #2221 - Follow-up: Ensure jit_ioncheck{1|2|3}_deunified_sources is defined.
Should fix build bustage in armhf, as well as prevent bustage in mips32.
2023-06-05 21:15:33 +02:00
Moonchild 58308a5c7a Merge branch 'master' into release
# Conflicts:
#	python/mozbuild/mozpack/dmg.py
2023-05-11 17:35:14 +02:00
Brian Smith 88c7d54975 No Issue - Fix FreeBSD build failure with WebRTC enabled. (release uplift)
Tag #2227
2023-05-01 22:12:11 +02:00
Timothy Valldeperas eadb5678b3 Issue #2175 - Fix build bustage in WebRTC. (release uplift)
Resolves #2227
2023-05-01 19:04:57 +02:00
Moonchild 54e3e60796 Revert "[devtools] Don't allow sourcemap URLs to redirect"
This reverts commit 2a05494abe.
2023-04-17 10:25:45 +02:00
Moonchild 2a05494abe [devtools] Don't allow sourcemap URLs to redirect 2023-04-13 10:54:34 +02:00
Moonchild bc89e58def [network] Improve checks while parsing MIME parameters. 2023-04-13 10:54:27 +02:00
Moonchild 3a009b97f6 Issue #1911 - Follow-up: Filter out illegal characters in more locations. 2023-04-13 10:54:10 +02:00
Moonchild a105f6d5e9 No issue - Fix off-by-one of kLargeDatasetSize 2023-04-13 10:54:02 +02:00
Sandra 5db241c0c0 Increase size of data over which we write the data to disk rather than keep it around in memory 2023-04-13 10:53:53 +02:00
Sandra d38dca10e5 Use nsAnonymousTemporaryFile for clipboard cache
Base on https://github.com/mozilla/gecko-dev/commit/ecc04a9245b409d7eed7df63ba733cd2073180de
2023-04-13 10:53:14 +02:00
Moonchild 54fc723126 Issue #2180 - Follow-up: Move sentinel check up a bit. 2023-04-02 15:39:05 +02:00
Moonchild 9b8ca17ee4 Issue #2180 - Add pref to control NSS TLS 1.3 protocol downgrade sentinel 2023-04-02 15:38:57 +02:00
Moonchild cddc95b39b Issue #2176 - Don't reconstruct the parent when tearing down
display:contents nodes with pseudo-elements.

We need to use StyleChildrenIterator which iterates over them, instead.
This is a bit of a hack but we can't always have our cake.

We need to be a bit careful though, since ::before and ::after are owned
by their own frame, and thus could be unbound from the tree or even dead
after removing the frame.

This basically ports bugs 1435566 and 1438467
2023-04-02 15:38:31 +02:00
Moonchild 5676529793 Issue #2171 - Skip over shadow nodes that don't have an owning node.
Resolves #2171
2023-04-02 15:37:44 +02:00
Moonchild ce68156cf4 Revert "[widget] Linux GTK3: Detach accessible from moz_container before it's deleted"
This reverts commit 465a18f342.
Resolves #2168
2023-03-18 19:57:56 +01:00
Moonchild 5032ad9593 Issue #2117 - Follow-up: Run precomplete cmd during package staging
We rely on this for all OSes except Mac where precomplete should not
be in the root (it uses Mozilla's fallback packaging that places it in
$RESPATH)
2023-03-17 22:11:30 +01:00
Moonchild b55f765f2e Issue #1911 - Follow-up: Filter out illegal file extensions also.
We already did this for file names, just not extensions.
2023-03-17 12:02:55 +01:00
Moonchild 856078d435 [widget] Linux GTK3: Detach accessible from moz_container before it's deleted 2023-03-17 12:02:46 +01:00
Moonchild c74c262d2f [GFX] Add some sanity checks and clamps to SurfaceData calculations. 2023-03-17 12:02:38 +01:00
Moonchild 787e29e374 No Issue - Ensure more OsiSpace
ensureOsiSpace(); was very much under-used. This adds more instances
where it makes sense to ensure Osi space before placing masm calls.
2023-03-17 12:02:31 +01:00
FranklinDM e439896c9b Issue #2148 - Shrink Vector from (usually) four pointers in size to three
when no inline storage is used.

See Bug 1338374
2023-03-17 12:02:20 +01:00
FranklinDM 15b508f1fb Issue #2148 - Make Vector not use AlignedStorage for its inline element storage
See Bug 1338374 1/2
2023-03-17 12:02:12 +01:00
Job Bautista 5651ebfc76 Issue #2148 - Discard RegExpShared data tables when discarding regexp JIT code.
Based on Mozilla bug 1378736's part 2.
Should fix the double-free.
Follow-up for #2083
2023-03-17 12:02:04 +01:00
Job Bautista 593bfc1ce8 Issue #2148 - Don't null out RegExpObject -> RegExpShared pointer on GC.
Follow-up for issue #2083.
Taken from Mozilla bug 1378736.
2023-03-17 12:01:50 +01:00
Brian Smith 28953cda7a Issue #2160 - Initial support for notarizing during DMG package.
Added --with-macbundle-idenity configure option to set a codesign identity.
If no identity is set or cross-compiling from Linux no codesigning will be
done. Currently doing a full deep bundle v2 sign, instead of limited v1.
2023-03-15 15:10:52 +01:00
Moonchild 516f3f545d Merge branch 'master' into release
# Conflicts:
#	CLOBBER
#	js/src/vm/RegExpObject.cpp
#	security/nss/lib/nss/nss.h
#	security/nss/lib/pkcs12/p12d.c
#	security/nss/lib/softoken/softkver.h
#	security/nss/lib/util/nssutil.h
2023-03-13 13:11:20 +01:00
Moonchild 83aff65a42 Force clobber 2023-02-19 17:53:31 +01:00
Moonchild 5bd97df957 [NSS] Update NSS to 3.52.9 to pick up fixes. 2023-02-19 17:51:26 +01:00
Moonchild 8772711181 [DOM] Check whether module load request was already cancelled when a load fails 2023-02-19 17:51:18 +01:00
Moonchild dc9526f4c6 [widget] Properly test for and handle errors in target-surface creation
and mapping.
2023-02-19 17:51:10 +01:00
Moonchild 9ab36e7ae0 Issue #2103 - Fix typo in RegExp Parser
This corrects the typo where the left-hand character would determine if
the right-hand character would be added or not.

Resolves #2103
2023-02-02 10:50:47 +01:00
Job Bautista e8d30841e7 Issue #2091 - Parse \p{Extended_Pictographic} too.
This is essentially a follow up to Issue #1286. We already have
 UCHAR_EXTENDED_PICTOGRAPHIC in our in-tree ICU, so there's no reason to comment
 this case out.
2023-01-27 05:01:53 +01:00
Martok 9faf29374e Issue #2093 - Trace HeapPtr<RegExpShared::groupsTemplate_> for GC move/compact events, regression from #2072 2023-01-26 20:11:28 +01:00
Moonchild 75e4818d36 Merge branch 'master' into release 2023-01-19 00:42:00 +01:00
Moonchild a65144e9e0 Fix merge conflicts. 2023-01-13 12:55:52 +01:00
Moonchild 4f29548526 Merge branch 'master' into release
# Conflicts:
#	image/decoders/nsJXLDecoder.cpp
#	js/src/irregexp/NativeRegExpMacroAssembler.cpp
#	js/src/irregexp/RegExpAST.h
#	js/src/irregexp/RegExpEngine.cpp
#	js/src/irregexp/RegExpParser.cpp
#	js/src/irregexp/RegExpParser.h
#	xpcom/io/nsLocalFileUnix.cpp
2023-01-13 12:11:56 +01:00
Moonchild 528db2cbd8 Issue #1818 - Remove obsolete path hack in widget code. 2022-12-16 09:13:48 +00:00
Moonchild 84e6bcc1e6 [network] Align cookie checks with RFC 6265 (bis) 2022-12-16 09:13:38 +00:00
Moonchild 0dc9ff518d [libjar] Add some extra sanity checks to our Zip reader. 2022-12-16 09:13:25 +00:00
Moonchild a2e3bd44aa [network] move some generic websocket code to the baseclass 2022-12-16 09:13:09 +00:00
Moonchild 163a0e7caf Revert "Issue #1279 - Implement regular expressions lookbehind (v2)"
This reverts commit d10e8a5b06.
2022-12-15 09:11:02 +00:00
Moonchild 49a86db5f3 Issue #2040 - Pre-multiply the alpha values in our JXL decode buffer. (uplift)
Using selective calculation (only if not opaque) and fast integer
math here should optimize well in compilers.
2022-12-15 09:09:19 +00:00
Moonchild 2640953d8b Issue #2019 - Follow-up: Make nsPluginInstanceOwner also listen to keypress events in the system event group.
nsPluginInstanceOwner only listens to keypress events in the default event group.
However, in our changed operating mode, keypress events are not fired in the
default event group if the key does not result in something printable.
This means that nsPluginInstanceOwner should also listen to keypress events
in the system event group and should handle each keypress that way, but
only once. I.e., if a printable keypress event is received in the system event
group, it should be ignored, since it would've already been handled in the
default event group in that case.
2022-11-26 18:18:09 +00:00
Moonchild 7eb7d67f7a Issue #2033 - Temporary fix of R<->B channel swap.
We have a BGR/RGB channel ordering mismatch here. to at least
provide proper display, a quick&dirty byte swap on the output
buffer will fix this for now, but we should look into seeing where
the surface mismatch is caused.
std::swap() should optimize pretty well in any of the used
compilers, but if necessary, a full buffer ASM routine can be
slotted in (although on current hardware I doubt this will be
even noticeable as it is)
2022-11-26 02:43:18 +00:00
Moonchild e28860ba7f Revert "[XPCOM] Deal with lstat potentially lying in nsLocalFileUnix."
This reverts commit c127f58ef3.
2022-11-20 14:14:48 +00:00
Moonchild 49a96b1d91 Merge branch 'master' into release 2022-11-19 20:15:23 +00:00
Moonchild 3130812693 Merge branch 'master' into release 2022-11-12 18:34:07 +00:00
Moonchild 71ae69aea8 [WebGL] Implement webgl.max-size-per-texture-mib 2022-10-26 14:50:05 +00:00
Moonchild 9e34d697c7 [XPCOM] Fix Base64 off-by-one issue and safeguard against this mistake in the future. 2022-10-26 14:49:55 +00:00
Moonchild 8fa9125d02 [No issue] Hold some strong references on nsRefreshDriver 2022-10-26 14:49:46 +00:00
Brian Smith 4b4488c3e4 Issue #2022 - Part 2 - Add Ventura version detection.
Also add Monterey and Ventura to the graphics driver blocklist.
2022-10-26 14:49:33 +00:00
Brian Smith 248db7d301 Issue #2022 - Part 1 - Fix transparent windows on MacOS 13 Ventura.
During the BaseWindow creation contenView is nil on Ventura...
So create a NSView with the requested dimensions and set is as the contenView.
2022-10-26 14:49:23 +00:00
Moonchild e199f2949b [No issue] Ensure LockImpl::Try() returns the correct bool value. 2022-10-26 14:45:39 +00:00
Moonchild 456b5450a4 Issue #2010 - Ensure raw tagnames are safe exiting internalEntityParser
This resolves #2010
2022-09-28 13:50:10 +00:00
Moonchild d8e629c4a3 Merge branch 'master' into release 2022-09-27 20:12:40 +00:00
Moonchild 4898c4f297 Merge branch 'master' into release 2022-09-24 12:16:59 +00:00
Moonchild 7cd578bbc6 Merge branch 'master' into release 2022-09-22 13:16:48 +00:00
Moonchild 1e91df628a Merge branch 'master' into release 2022-09-22 11:52:16 +00:00
Moonchild b110549cbd Merge branch 'master' into release 2022-07-27 06:07:45 +00:00
Moonchild 971047835a Merge branch 'master' into release
# Conflicts:
#	config/milestone.txt
#	toolkit/mozapps/extensions/internal/XPIProvider.jsm
2022-07-25 20:47:06 +00:00
Moonchild dd4d9eb032 [XPCOM] Crash safely when TArray replacements are OOB.
In the unlikely event of TArray element replacement calls are OOB, crash safely
with a debug breakpoint instead of corrupting memory.
2022-07-03 15:49:44 +00:00
Moonchild 8b94f1e480 [DOM] use the sanitizer to restrict href in svg:use to fragment-only URLs 2022-07-03 15:49:34 +00:00
Moonchild c89610a5c7 [network] Clear PAC loader when the load failed 2022-07-03 15:49:23 +00:00
Moonchild 217963cbed Update NSS to 3.52.7 2022-07-03 15:49:14 +00:00
Moonchild c4f4e18340 [DOM media] Remove potentially unsafe type accesses when debug logging 2022-07-03 15:49:04 +00:00
Moonchild 8a7c0e7345 [network] Clean up and update the list of external protocol handlers. 2022-07-03 15:48:54 +00:00
Moonchild 52e304d450 Issue #1053 - Follow-up: Correct conditional define on POSIX systems. (uplift)
This conditional was incorrectly changed when removing Android support.
This potentially causes issues on Linux systems by not using pthreads correctly,
which may lead to high idle CPU usage.
2022-06-28 13:28:20 +00:00
Moonchild cfc0eeca53 Revert "Issue #1909 - Guard against empty update manifest URL"
This reverts commit d7fadcdef9.
2022-06-07 11:59:07 +00:00
Moonchild ebd3dd9228 Merge branch 'master' into release 2022-06-03 21:50:44 +00:00
Moonchild cb40e4e7ef Merge branch 'master' into release 2022-06-01 13:54:11 +00:00
Moonchild 662dba55fd Merge branch 'master' into release 2022-05-29 11:13:44 +00:00
Moonchild 8760ce023c Issue #1895 - Implement queueMicroTask(callback()) (uplift) 2022-05-07 14:40:14 +00:00
Moonchild b86e148bb7 Roll back milestone version to release. 2022-05-06 12:43:43 +00:00
Moonchild 9e83721e5e Merge branch 'master' into release 2022-05-06 12:43:00 +00:00
Moonchild dc2d6c2e60 Revert "No Issue - Make content-type on JAR channels behave the same as HTTP channels."
This reverts commit 425677ada7.
2022-05-03 17:38:19 +00:00
Moonchild 4ada6f6762 Update 7zSD for v31 2022-05-03 17:38:12 +00:00
12456 changed files with 677603 additions and 5108771 deletions

No files matched your search

+1 -1
View File
@@ -22,4 +22,4 @@
# changes to stick? As of bug 928195, this shouldn't be necessary! Please
# don't change CLOBBER for WebIDL changes any more.
Clobber for removal of network tickler
Clobber for NSS update
+4 -8
View File
@@ -14,7 +14,7 @@ endif
export TOPLEVEL_BUILD := 1
default::
BACKEND_ONCE_STAMP := backend.once.stamp
ifndef TEST_MOZBUILD
ifdef MOZ_BUILD_APP
include $(wildcard $(topsrcdir)/$(MOZ_BUILD_APP)/build.mk)
@@ -46,7 +46,7 @@ ifndef TEST_MOZBUILD
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 $(BACKEND_ONCE_STAMP)
$(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
@@ -100,11 +100,7 @@ config.status js/src/config.status:
ifndef TEST_MOZBUILD
.PHONY: backend
backend: $(BACKEND_ONCE_STAMP)
# Create a per-invocation stamp so backend regenerates only once
$(BACKEND_ONCE_STAMP):
@echo "Stamping backend regeneration."
@$(TOUCH) $@
backend: $(BUILD_BACKEND_FILES)
# A traditional rule would look like this:
# backend.%:
@@ -126,7 +122,7 @@ $(subst .,%,$(BUILD_BACKEND_FILES)):
@echo 'Build configuration changed. Regenerating backend.'
$(PYTHON) config.status
Makefile: $(BACKEND_ONCE_STAMP)
Makefile: $(BUILD_BACKEND_FILES)
@$(TOUCH) $@
define build_backend_rule
-8
View File
@@ -1,8 +0,0 @@
TRADEMARK NOTICE
================
The name "Goanna" and visual representations (logo) have not been
registered by the Copyright owners as a trademark in any jurisdiction.
However, because Goanna has been distributed and maintained world-wide,
continually since 2015, the Copyright owners claim "common-law trademark
protection" in any jurisdiction where common-law trademark is recognized.
+15 -65
View File
@@ -6,7 +6,7 @@
#include "Platform.h"
#include "nsIAccessibleEvent.h"
#include "nsIGSettingsService.h"
#include "nsIGConfService.h"
#include "nsIServiceManager.h"
#include "nsMai.h"
#include "AtkSocketAccessible.h"
@@ -18,6 +18,10 @@
#endif
#include <gtk/gtk.h>
#if (MOZ_WIDGET_GTK == 3)
extern "C" __attribute__((weak,visibility("default"))) int atk_bridge_adaptor_init(int*, char **[]);
#endif
using namespace mozilla;
using namespace mozilla::a11y;
@@ -29,20 +33,12 @@ extern "C" {
typedef GType (* AtkGetTypeType) (void);
typedef void (*GnomeAccessibilityInit) (void);
typedef void (*GnomeAccessibilityShutdown) (void);
#if (MOZ_WIDGET_GTK == 3)
typedef int (*AtkBridgeAdaptorInit) (int*, char***);
#endif
}
static PRLibrary* sATKLib = nullptr;
static const char sATKLibName[] = "libatk-1.0.so.0";
static const char sATKHyperlinkImplGetTypeSymbol[] =
"atk_hyperlink_impl_get_type";
#if (MOZ_WIDGET_GTK == 3)
static PRLibrary* sAtkBridgeAdaptorLib = nullptr;
static const char sAtkBridgeAdaptorLibName[] = "libatk-bridge-2.0.so.0";
static const char sAtkBridgeAdaptorInitSymbol[] = "atk_bridge_adaptor_init";
#endif
gboolean toplevel_event_watcher(GSignalInvocationHint*, guint, const GValue*,
gpointer);
@@ -131,38 +127,6 @@ LoadGtkModule(GnomeAccessibilityModule& aModule)
return NS_OK;
}
#if (MOZ_WIDGET_GTK == 3)
static bool
InitAtkBridgeAdaptor()
{
AtkBridgeAdaptorInit initBridge =
reinterpret_cast<AtkBridgeAdaptorInit>(
PR_FindFunctionSymbolAndLibrary(sAtkBridgeAdaptorInitSymbol,
&sAtkBridgeAdaptorLib));
if (!initBridge) {
sAtkBridgeAdaptorLib = PR_LoadLibrary(sAtkBridgeAdaptorLibName);
if (sAtkBridgeAdaptorLib) {
initBridge =
reinterpret_cast<AtkBridgeAdaptorInit>(
PR_FindFunctionSymbol(sAtkBridgeAdaptorLib,
sAtkBridgeAdaptorInitSymbol));
if (!initBridge) {
PR_UnloadLibrary(sAtkBridgeAdaptorLib);
sAtkBridgeAdaptorLib = nullptr;
}
}
}
if (!initBridge) {
return false;
}
initBridge(nullptr, nullptr);
return true;
}
#endif
void
a11y::PlatformInit()
{
@@ -217,7 +181,9 @@ a11y::PlatformInit()
// Init atk-bridge now
PR_SetEnv("NO_AT_BRIDGE=0");
#if (MOZ_WIDGET_GTK == 3)
if (!InitAtkBridgeAdaptor())
if (atk_bridge_adaptor_init) {
atk_bridge_adaptor_init(nullptr, nullptr);
} else
#endif
{
nsresult rv = LoadGtkModule(sAtkBridge);
@@ -262,13 +228,6 @@ a11y::PlatformShutdown()
sAtkBridge.init = nullptr;
sAtkBridge.shutdown = nullptr;
}
#if (MOZ_WIDGET_GTK == 3)
if (sAtkBridgeAdaptorLib) {
// Do not shutdown/unload atk-bridge; an exit function registered by
// the bridge will take care of it.
sAtkBridgeAdaptorLib = nullptr;
}
#endif
#if (MOZ_WIDGET_GTK == 2)
if (sGail.lib) {
// Do not shutdown gail because
@@ -401,22 +360,13 @@ dbus_done:
return sShouldEnable;
#endif
// check GSettings
#define GSETINGS_A11Y_INTERFACE "org.gnome.desktop.interface"
#define GSETINGS_A11Y_KEY "toolkit-accessibility"
nsCOMPtr<nsIGSettingsService> gsettings =
do_GetService(NS_GSETTINGSSERVICE_CONTRACTID);
nsCOMPtr<nsIGSettingsCollection> a11y_settings;
if (gsettings) {
gsettings->GetCollectionForSchema(NS_LITERAL_CSTRING(GSETINGS_A11Y_INTERFACE),
getter_AddRefs(a11y_settings));
if (a11y_settings) {
a11y_settings->GetBoolean(NS_LITERAL_CSTRING(GSETINGS_A11Y_KEY),
&sShouldEnable);
}
}
//check gconf-2 setting
#define GCONF_A11Y_KEY "/desktop/gnome/interface/accessibility"
nsresult rv = NS_OK;
nsCOMPtr<nsIGConfService> gconf =
do_GetService(NS_GCONFSERVICE_CONTRACTID, &rv);
if (NS_SUCCEEDED(rv) && gconf)
gconf->GetBool(NS_LITERAL_CSTRING(GCONF_A11Y_KEY), &sShouldEnable);
return sShouldEnable;
}
+1 -1
View File
@@ -55,7 +55,7 @@ private:
{
explicit IteratorState(Accessible* aParent, IteratorState* mParentState = nullptr);
RefPtr<Accessible> mParent;
Accessible* mParent;
int32_t mIndex;
IteratorState* mParentState;
};
+3 -3
View File
@@ -60,7 +60,7 @@
#ifdef MOZ_ENABLE_NPAPI
#include "nsPluginFrame.h"
#endif
#include "SVGGeometryFrame.h"
#include "nsSVGPathGeometryFrame.h"
#include "nsTreeBodyFrame.h"
#include "nsTreeColumns.h"
#include "nsTreeUtils.h"
@@ -1165,8 +1165,8 @@ nsAccessibilityService::CreateAccessible(nsINode* aNode,
if (!newAcc) {
if (content->IsSVGElement()) {
SVGGeometryFrame* geometryFrame = do_QueryFrame(frame);
if (geometryFrame) {
nsSVGPathGeometryFrame* pathGeometryFrame = do_QueryFrame(frame);
if (pathGeometryFrame) {
// A graphic elements: rect, circle, ellipse, line, path, polygon,
// polyline and image. A 'use' and 'text' graphic elements require
// special support.
+1 -1
View File
@@ -76,7 +76,7 @@ HyperTextAccessible::NativeState()
{
uint64_t states = AccessibleWrap::NativeState();
if (mContent->AsElement()->State().HasState(NS_EVENT_STATE_READWRITE)) {
if (mContent->AsElement()->State().HasState(NS_EVENT_STATE_MOZ_READWRITE)) {
states |= states::EDITABLE;
} else if (mContent->IsHTMLElement(nsGkAtoms::article)) {
+9 -9
View File
@@ -40,7 +40,7 @@ def loadEventIDL(parser, includePath, eventname):
class Configuration:
def __init__(self, filename):
config = {}
exec(compile(open(filename, "rb").read(), filename, 'exec'), config)
execfile(filename, config)
self.simple_events = config.get('simple_events', [])
def firstCap(str):
@@ -64,7 +64,7 @@ def print_header_file(fd, conf, incdirs):
for e in conf.simple_events:
idl, idl_path = loadEventIDL(p, incdirs, e)
idl_paths.add(idl_path)
for iface in [p for p in idl.productions if p.kind == "interface"]:
for iface in filter(lambda p: p.kind == "interface", idl.productions):
classname = ("xpcAcc%s" % e)
baseinterfaces = interfaces(iface)
@@ -73,7 +73,7 @@ def print_header_file(fd, conf, incdirs):
fd.write("public:\n")
attributes = allAttributes(iface)
args = list(map(writeAttributeParams, attributes))
args = map(writeAttributeParams, attributes)
fd.write(" %s(%s) :\n" % (classname, ", ".join(args)))
initializers = []
@@ -83,7 +83,7 @@ def print_header_file(fd, conf, incdirs):
fd.write(" NS_DECL_CYCLE_COLLECTING_ISUPPORTS\n")
fd.write(" NS_DECL_CYCLE_COLLECTION_CLASS(%s)\n" % (classname))
for iface in [i for i in baseinterfaces if i.name != "nsISupports"]:
for iface in filter(lambda i: i.name != "nsISupports", baseinterfaces):
fd.write(" NS_DECL_%s\n" % iface.name.upper())
fd.write("\nprivate:\n")
@@ -97,13 +97,13 @@ def print_header_file(fd, conf, incdirs):
return idl_paths
def interfaceAttributeTypes(idl):
ifaces = [p for p in idl.productions if p.kind == "interface"]
ifaces = filter(lambda p: p.kind == "interface", idl.productions)
attributes = []
for i in ifaces:
ifaceAttributes = allAttributes(i)
attributes.extend(ifaceAttributes)
ifaceAttrs = [a for a in attributes if a.realtype.nativeType("in").endswith("*")]
return [a.realtype.nativeType("in").strip(" *") for a in ifaceAttrs]
ifaceAttrs = filter(lambda a: a.realtype.nativeType("in").endswith("*"), attributes)
return map(lambda a: a.realtype.nativeType("in").strip(" *"), ifaceAttrs)
def print_cpp(idl, fd, conf, eventname):
for p in idl.productions:
@@ -186,7 +186,7 @@ def interfaces(iface):
def allAttributes(iface):
attributes = []
for i in interfaces(iface):
attrs = [m for m in i.members if isinstance(m, xpidl.Attribute)]
attrs = filter(lambda m: isinstance(m, xpidl.Attribute), i.members)
attributes.extend(attrs)
return attributes
@@ -194,7 +194,7 @@ def allAttributes(iface):
def write_cpp(eventname, iface, fd):
classname = "xpcAcc%s" % eventname
attributes = allAttributes(iface)
ccattributes = [m for m in attributes if m.realtype.nativeType('in').endswith('*')]
ccattributes = filter(lambda m: m.realtype.nativeType('in').endswith('*'), attributes)
fd.write("NS_IMPL_CYCLE_COLLECTION(%s" % classname)
for c in ccattributes:
fd.write(", m%s" % firstCap(c.name))
+5 -4
View File
@@ -5,11 +5,11 @@
'''Parses a given application.ini file and outputs the corresponding
XULAppData structure as a C++ header file'''
import configparser
import ConfigParser
import sys
def main(output, file):
config = configparser.RawConfigParser()
config = ConfigParser.RawConfigParser()
config.read(file)
flags = set()
try:
@@ -27,7 +27,8 @@ def main(output, file):
'App:id', 'Gecko:minversion', 'Gecko:maxversion')
missing = [var for var in expected if var not in appdata]
if missing:
print("Missing values in %s: %s" % (file, ', '.join(missing)), file=sys.stderr)
print >>sys.stderr, \
"Missing values in %s: %s" % (file, ', '.join(missing))
sys.exit(1)
if not 'Crash Reporter:serverurl' in appdata:
@@ -56,4 +57,4 @@ if __name__ == '__main__':
if len(sys.argv) != 1:
main(sys.stdout, sys.argv[1])
else:
print("Usage: %s /path/to/application.ini" % sys.argv[0], file=sys.stderr)
print >>sys.stderr, "Usage: %s /path/to/application.ini" % sys.argv[0]
-3
View File
@@ -982,9 +982,6 @@ EOF
k1om:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
loongarch64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
m32r*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
+4 -4
View File
@@ -34,7 +34,7 @@ def symlink(source, link_name):
def check_run(args):
global DEBUG
if DEBUG:
print(' '.join(args), file=sys.stderr)
print >> sys.stderr, ' '.join(args)
r = subprocess.call(args)
assert r == 0
@@ -43,11 +43,11 @@ def run_in(path, args):
d = os.getcwd()
global DEBUG
if DEBUG:
print('cd "%s"' % path, file=sys.stderr)
print >> sys.stderr, 'cd "%s"' % path
os.chdir(path)
check_run(args)
if DEBUG:
print('cd "%s"' % d, file=sys.stderr)
print >> sys.stderr, 'cd "%s"' % d
os.chdir(d)
@@ -377,7 +377,7 @@ if __name__ == "__main__":
extra_cflags2 = ["-fPIC"]
extra_cxxflags2 = ["-fPIC", "-static-libstdc++"]
if 'LD_LIBRARY_PATH' in os.environ:
if os.environ.has_key('LD_LIBRARY_PATH'):
os.environ['LD_LIBRARY_PATH'] = '%s/lib64/:%s' % (gcc_dir, os.environ['LD_LIBRARY_PATH']);
else:
os.environ['LD_LIBRARY_PATH'] = '%s/lib64/' % gcc_dir
+3 -3
View File
@@ -81,9 +81,9 @@ def process_files(files, output_filename, digests, strip):
short_file = short_file.lstrip('/')
else:
short_file = file
print('%s %s %s %s' % (hash, digest,
print >>output, '%s %s %s %s' % (hash, digest,
os.path.getsize(file),
short_file), file=output)
short_file)
def setup_logging(level=logging.DEBUG):
'''This function sets up the logging module using a speficiable logging
@@ -140,7 +140,7 @@ def main():
try:
for digest in options.digests:
hashlib.new(digest)
except ValueError as ve:
except ValueError, ve:
logger.error('Could not create a "%s" hash object (%s)' %
(digest, ve.args[0]))
exit(1)
@@ -11,7 +11,7 @@ import logging
import os
import site
import sys
import urllib.request, urllib.error, urllib.parse
import urllib2
import difflib
FAILURE_CODE = 1
@@ -40,10 +40,10 @@ def make_hg_url(hgHost, repoPath, protocol='https', revision=None,
def readConfig(configfile, keys=[], required=[]):
c = {}
exec(compile(open(configfile, "rb").read(), configfile, 'exec'), c)
execfile(configfile, c)
for k in keys:
c = c[k]
items = list(c.keys())
items = c.keys()
err = False
for key in required:
if key not in items:
@@ -126,7 +126,7 @@ def get_mozconfig(path, options):
else:
url = make_hg_url(options.hghost, options.branch, 'http',
options.revision, path)
return urllib.request.urlopen(url).readlines()
return urllib2.urlopen(url).readlines()
if __name__ == '__main__':
from optparse import OptionParser
+4
View File
@@ -43,6 +43,8 @@ gyp_vars.update({
'arm_neon': 0,
'arm_neon_optional': 1,
'moz_webrtc_omx': 0,
'moz_webrtc_mediacodec': 0,
# Turn off multi monitor screen share
'multi_monitor_screenshare%' : 0,
@@ -71,6 +73,8 @@ if CONFIG['ARM_ARCH']:
if int(CONFIG['ARM_ARCH']) < 7:
gyp_vars['armv7'] = 0
gyp_vars['arm_neon_optional'] = 0
elif os == 'Android':
gyp_vars['armv7'] = 1
else:
# CPU detection for ARM works on Android only. armv7 always uses CPU
# detection, so we have to set armv7=0 for non-Android target
+1 -1
View File
@@ -18,7 +18,7 @@ flavors = {
'Linux': 'linux',
'Darwin': 'mac',
'SunOS': 'solaris',
'kFreeBSD': 'freebsd',
'GNU/kFreeBSD': 'freebsd',
'DragonFly': 'dragonfly',
'FreeBSD': 'freebsd',
'NetBSD': 'netbsd',
+9 -14
View File
@@ -12,7 +12,7 @@ import random
import subprocess
import sys
import uuid
import builtins
import __builtin__
from types import ModuleType
@@ -170,16 +170,11 @@ def bootstrap(topsrcdir, mozilla_dir=None):
if mozilla_dir is None:
mozilla_dir = topsrcdir
# Ensure we are not running Python 2.
# We put this check here so we generate a user-friendly error message
# rather than a cryptic stack trace on module import.
if sys.version_info[0] < 3 or sys.version_info[1] < 3:
print('Python 3.3 or above is required to run mach.')
print('You are running Python', platform.python_version())
sys.exit(1)
# This sanity check is overkill, but why not?
if sys.version_info[0] > 3:
print('Python 4.x or higher not supported. Use Python 3 instead.')
# Ensure we are running Python 2.7+. We put this check here so we generate a
# user-friendly error message rather than a cryptic stack trace on module
# import.
if sys.version_info[0] != 2 or sys.version_info[1] < 7:
print('Python 2.7 or above (but not Python 3) is required to run mach.')
print('You are running Python', platform.python_version())
sys.exit(1)
@@ -340,7 +335,7 @@ def bootstrap(topsrcdir, mozilla_dir=None):
# always load local repository configuration
mach.settings_paths.append(mozilla_dir)
for category, meta in list(CATEGORIES.items()):
for category, meta in CATEGORIES.items():
mach.define_category(category, meta['short'], meta['long'],
meta['priority'])
@@ -365,7 +360,7 @@ class ImportHook(object):
self._modules = set()
def __call__(self, name, globals=None, locals=None, fromlist=None,
level=0):
level=-1):
# name might be a relative import. Instead of figuring out what that
# resolves to, which is complex, just rely on the real import.
# Since we don't know the full module name, we can't check sys.modules,
@@ -414,4 +409,4 @@ class ImportHook(object):
# Install our hook
builtins.__import__ = ImportHook(builtins.__import__)
__builtin__.__import__ = ImportHook(__builtin__.__import__)
+1 -1
View File
@@ -11,7 +11,7 @@
# _declare_exceptions template, and add it to the return statement. Then
# destructure in the assignment below the function declaration.
@template
@imports(_from='builtins', _import='Exception')
@imports(_from='__builtin__', _import='Exception')
def _declare_exceptions():
class FatalCheckError(Exception):
'''An exception to throw from a function decorated with @checking.
+14 -24
View File
@@ -133,8 +133,7 @@ option(env='PYTHON', nargs=1, help='Python interpreter')
@imports(_from='mozbuild.configure.util', _import='LineIO')
@imports(_from='mozbuild.virtualenv', _import='VirtualenvManager')
@imports(_from='mozbuild.virtualenv', _import='verify_python_version')
@imports(_from='mozpack.path', _import='normsep')
@imports('sysconfig')
@imports('distutils.sysconfig')
def virtualenv_python(env_python, build_env, mozconfig, help):
if help:
return
@@ -166,9 +165,6 @@ def virtualenv_python(env_python, build_env, mozconfig, help):
os.path.join(topobjdir, '_virtualenv'), out,
os.path.join(topsrcdir, 'build', 'virtualenv_packages.txt'))
if normsep(sys.executable) == normsep(manager.python_path):
return normsep(manager.python_path)
if python:
# If we're not in the virtualenv, we need the which module for
# find_program.
@@ -197,10 +193,10 @@ def virtualenv_python(env_python, build_env, mozconfig, help):
sys.exit(subprocess.call([python] + sys.argv))
# We are now in the virtualenv
if not sysconfig.get_path("purelib"):
if not distutils.sysconfig.get_python_lib():
die('Could not determine python site packages directory')
return normsep(python)
return python
set_config('PYTHON', virtualenv_python)
add_old_configure_assignment('PYTHON', virtualenv_python)
@@ -216,7 +212,7 @@ def early_options():
def early_options():
return set(
option.env
for option in __sandbox__._options.values()
for option in __sandbox__._options.itervalues()
if option.env
)
return early_options
@@ -244,17 +240,17 @@ def mozconfig_options(mozconfig, help):
log.info(' %s' % arg)
helper.add(arg, origin='mozconfig', args=helper._args)
for key, value in mozconfig['env']['added'].items():
for key, value in mozconfig['env']['added'].iteritems():
add(key, value)
os.environ[key] = value
for key, (_, value) in mozconfig['env']['modified'].items():
for key, (_, value) in mozconfig['env']['modified'].iteritems():
add(key, value)
os.environ[key] = value
for key, value in mozconfig['vars']['added'].items():
for key, value in mozconfig['vars']['added'].iteritems():
# mozconfig_loader adds _IS_SET variables that are irrelevant
if not key.endswith('_IS_SET'):
add(key, value)
for key, (_, value) in mozconfig['vars']['modified'].items():
for key, (_, value) in mozconfig['vars']['modified'].iteritems():
add(key, value)
@@ -294,7 +290,6 @@ option('--target', nargs=1,
@imports(_from='mozbuild.configure.constants', _import='Endianness')
@imports(_from='mozbuild.configure.constants', _import='Kernel')
@imports(_from='mozbuild.configure.constants', _import='OS')
@imports(_from='mozbuild.configure.constants', _import='OS_and_Kernel')
def split_triplet(triplet):
# The standard triplet is defined as
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
@@ -344,7 +339,7 @@ def split_triplet(triplet):
if cpu.endswith('86') or (cpu.startswith('i') and '86' in cpu):
canonical_cpu = 'x86'
endianness = 'little'
elif cpu == 'x86_64':
elif cpu in ('x86_64', 'ia64'):
canonical_cpu = cpu
endianness = 'little'
elif cpu in ('s390', 's390x'):
@@ -380,9 +375,6 @@ def split_triplet(triplet):
elif cpu.startswith('aarch64'):
canonical_cpu = 'aarch64'
endianness = 'little'
elif cpu.startswith('loongarch64'):
canonical_cpu = 'loongarch64'
endianness = 'little'
else:
die('Unknown CPU type: %s' % cpu)
@@ -390,8 +382,8 @@ def split_triplet(triplet):
alias=triplet,
cpu=CPU(canonical_cpu),
bitness=CPU_bitness[canonical_cpu],
kernel=OS_and_Kernel(canonical_kernel),
os=OS_and_Kernel(canonical_os),
kernel=Kernel(canonical_kernel),
os=OS(canonical_os),
endianness=Endianness(endianness),
raw_cpu=cpu,
raw_os=os,
@@ -405,8 +397,7 @@ def split_triplet(triplet):
def config_sub(shell, triplet):
config_sub = os.path.join(os.path.dirname(__file__), '..',
'autoconf', 'config.sub')
return subprocess.check_output([shell, config_sub, triplet],
universal_newlines=True).strip()
return subprocess.check_output([shell, config_sub, triplet]).strip()
@depends('--host', shell)
@@ -416,8 +407,7 @@ def host(value, shell):
if not value:
config_guess = os.path.join(os.path.dirname(__file__), '..',
'autoconf', 'config.guess')
host = subprocess.check_output([shell, config_guess],
universal_newlines=True).strip()
host = subprocess.check_output([shell, config_guess]).strip()
else:
host = value[0]
@@ -768,7 +758,7 @@ def enabled_in_nightly(milestone, _):
def all_configure_options(_):
result = []
previous = None
for option in __sandbox__._options.values():
for option in __sandbox__._options.itervalues():
# __sandbox__._options contains items for both option.name and
# option.env. But it's also an OrderedDict, meaning both are
# consecutive.
+2 -34
View File
@@ -11,14 +11,9 @@ def moz_jemalloc4(value):
option('--enable-jemalloc', env='MOZ_MEMORY',
help='Replace system memory allocator with jemalloc')
option('--enable-mimalloc',
help='Replace system memory allocator with mimalloc')
@depends('--enable-jemalloc', '--enable-mimalloc', target, build_project,
c_compiler)
def jemalloc(value, mimalloc, target, build_project, c_compiler):
if value and mimalloc:
die('--enable-jemalloc and --enable-mimalloc cannot be used together')
@depends('--enable-jemalloc', target, build_project, c_compiler)
def jemalloc(value, target, build_project, c_compiler):
if value.origin != 'default':
return bool(value) or None
@@ -35,38 +30,11 @@ def jemalloc(value, mimalloc, target, build_project, c_compiler):
if target.kernel == 'Linux':
return True
@depends('--enable-mimalloc', '--enable-jemalloc', target)
def mimalloc(value, jemalloc, target):
if value and jemalloc:
die('--enable-jemalloc and --enable-mimalloc cannot be used together')
if value.origin != 'default':
if not value:
return None
if target.kernel not in ('Darwin', 'WINNT', 'Linux', 'kFreeBSD', 'FreeBSD',
'NetBSD', 'OpenBSD', 'DragonFly'):
die('--enable-mimalloc is not supported on %s', target.kernel)
return True
@depends('--enable-mimalloc', '--enable-jemalloc')
def mimalloc_requires_disable(mimalloc, jemalloc):
if not mimalloc:
return
if jemalloc or jemalloc.origin not in ('command-line', 'mozconfig'):
die('--enable-mimalloc requires --disable-jemalloc to be passed explicitly')
set_config('MOZ_MEMORY', jemalloc)
set_define('MOZ_MEMORY', jemalloc)
add_old_configure_assignment('MOZ_MEMORY', jemalloc)
@depends(mimalloc)
def mimalloc_config(mimalloc):
return True if mimalloc else False
set_config('MOZ_MIMALLOC', mimalloc_config)
set_define('MOZ_MIMALLOC', mimalloc)
add_old_configure_assignment('MOZ_MIMALLOC', mimalloc_config)
# Because --enable-jemalloc doesn't use a default because of the dependency
# on the target, we can't use a js_option for it to propagate to js/src
+24 -15
View File
@@ -3,6 +3,13 @@
# 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/.
@imports('codecs')
@imports('sys')
def encoded_open(path, mode):
encoding = 'mbcs' if sys.platform == 'win32' else 'utf-8'
return codecs.open(path, mode, encoding)
m4 = check_prog(
"M4",
(
@@ -24,10 +31,8 @@ m4 = check_prog(
@imports(_from='os.path', _import='exists')
@imports(_from='mozbuild.shellutil', _import='quote')
@imports(_from='os', _import='environ')
@imports(_from='mozbuild.getencoding', _import='getencoding')
def prepare_configure(old_configure, mozconfig, awk, m4, build_env, shell,
old_configure_assignments, build_project):
encoding = getencoding()
# os.path.abspath in the sandbox will ensure forward slashes on Windows,
# which is actually necessary because this path actually ends up literally
# as $0, and backslashes there breaks autoconf's detection of the source
@@ -38,6 +43,7 @@ def prepare_configure(old_configure, mozconfig, awk, m4, build_env, shell,
if not old_configure_dir.endswith('/js/src'):
old_configure = os.path.join(old_configure_dir, 'js', 'src',
os.path.basename(old_configure))
refresh = True
if exists(old_configure):
mtime = getmtime(old_configure)
@@ -61,21 +67,25 @@ def prepare_configure(old_configure, mozconfig, awk, m4, build_env, shell,
env['AWK'] = awk
env['AC_MACRODIR'] = os.path.join(build_env.topsrcdir, 'build', 'autoconf')
my_env = env
# Handle Python 2.7 not allowing unicode in the environment on Windows
if sys.platform == 'win32':
my_env = dict()
for e in env:
my_env[e.encode('ascii','ignore')] = env[e].encode('ascii','ignore')
script = subprocess.check_output([
shell, autoconf,
'--localdir=%s' % os.path.dirname(old_configure),
old_configure + '.in'], env=my_env)
script = script.decode(encoding, errors='replace')
# Make old-configure append to config.log, where we put our own log.
# This could be done with a m4 macro, but it's way easier this way
script = script.replace('>./config.log', '>>./config.log')
with open(old_configure, 'w', encoding=encoding, errors='replace') as fh:
with open(old_configure, 'wb') as fh:
fh.write(script)
cmd = [shell, old_configure]
with open('old-configure.vars', 'w', encoding=encoding, errors='replace') as out:
with encoded_open('old-configure.vars', 'w') as out:
log.debug('Injecting the following to old-configure:')
def inject(command):
print(command, file=out)
@@ -117,6 +127,7 @@ def old_configure_options(*options):
'--enable-alsa',
'--enable-appcompat-guid',
'--enable-av1',
'--enable-jxl',
'--enable-b2g-bt',
'--enable-b2g-camera',
'--enable-b2g-ril',
@@ -142,7 +153,10 @@ def old_configure_options(*options):
'--enable-faststripe',
'--enable-feeds',
'--enable-gamepad',
'--enable-gconf',
'--enable-gczeal',
'--enable-gio',
'--enable-gnomeui',
'--enable-gold',
'--enable-hardware-aec-ns',
'--enable-icf',
@@ -152,7 +166,6 @@ def old_configure_options(*options):
'--enable-jitspew',
'--enable-js-lto',
'--enable-leak-sanitizer',
'--enable-libaom',
'--enable-libjpeg-turbo',
'--enable-libproxy',
'--enable-llvm-hacks',
@@ -164,7 +177,6 @@ def old_configure_options(*options):
'--enable-negotiateauth',
'--enable-nfc',
'--enable-npapi',
'--enable-npapi-gtk2',
'--enable-nspr-build',
'--enable-official-branding',
'--enable-official-vendor',
@@ -286,11 +298,8 @@ def old_configure_options(*options):
@imports('subprocess')
@imports('sys')
@imports(_from='mozbuild.shellutil', _import='quote')
@imports(_from='mozbuild.util', _import='exec_')
@imports(_from='mozbuild.getencoding', _import='getencoding')
def old_configure(prepare_configure, extra_old_configure_args, all_options,
*options):
encoding = getencoding()
cmd = prepare_configure
# old-configure only supports the options listed in @old_configure_options
@@ -327,7 +336,7 @@ def old_configure(prepare_configure, extra_old_configure_args, all_options,
ret = subprocess.call(cmd)
if ret:
with log.queue_debug():
with open('config.log', 'r', encoding=encoding, errors='replace') as fh:
with encoded_open('config.log', 'r') as fh:
fh.seek(log_size)
for line in fh:
log.debug(line.rstrip())
@@ -335,12 +344,12 @@ def old_configure(prepare_configure, extra_old_configure_args, all_options,
sys.exit(ret)
raw_config = {}
with open('config.data', 'r', encoding=encoding, errors='replace') as fh:
with encoded_open('config.data', 'r') as fh:
code = compile(fh.read(), 'config.data', 'exec')
# Every variation of the exec() function I tried led to:
# SyntaxError: unqualified exec is not allowed in function 'main' it
# contains a nested function with free variables
exec_(code, raw_config)
exec code in raw_config
# Ensure all the flags known to old-configure appear in the
# @old_configure_options above.
@@ -374,9 +383,9 @@ def set_old_configure_define(name, value):
def post_old_configure(raw_config):
for k, v in raw_config['substs']:
set_old_configure_config(
k[1:-1], v[1:-1] if isinstance(v, str) else v)
k[1:-1], v[1:-1] if isinstance(v, types.StringTypes) else v)
for k, v in dict(raw_config['defines']).items():
for k, v in dict(raw_config['defines']).iteritems():
set_old_configure_define(k[1:-1], v[1:-1])
set_old_configure_config('non_global_defines',
+6 -45
View File
@@ -61,44 +61,6 @@ set_config('HAVE_YASM', have_yasm)
# Until the YASM variable is not necessary in old-configure.
add_old_configure_assignment('YASM', have_yasm)
# nasm detection
# ==============================================================
nasm = check_prog('NASM', ['nasm'], allow_missing=True)
@depends_if(nasm)
@checking('nasm version')
def nasm_version(nasm):
version = check_cmd_output(
nasm, '-v',
onerror=lambda: die('Failed to get nasm version.')
).splitlines()[0].split()[2]
return Version(version)
@depends(nasm, nasm_version)
def have_nasm(nasm, version):
if nasm and version >= Version('2.14'):
return True
set_config('HAVE_NASM', have_nasm)
@depends(have_nasm, target)
def nasm_asflags(have_nasm, target):
if have_nasm:
asflags = {
('OSX', 'x86'): '-f macho32',
('OSX', 'x86_64'): '-f macho64',
('WINNT', 'x86'): '-f win32',
('WINNT', 'x86_64'): '-f win64',
}.get((target.os, target.cpu), None)
if asflags is None:
if target.cpu == 'x86':
asflags = '-f elf32'
elif target.cpu == 'x86_64':
asflags = '-f elf64'
return asflags
set_config('NASM_ASFLAGS', nasm_asflags)
# MacOS deployment target version
# ==============================================================
# This needs to happen before any compilation test is done.
@@ -274,7 +236,7 @@ def get_compiler_info(compiler, language):
('CPU', CPU_preprocessor_checks),
('KERNEL', kernel_preprocessor_checks),
):
for n, (value, condition) in enumerate(preprocessor_checks.items()):
for n, (value, condition) in enumerate(preprocessor_checks.iteritems()):
check += dedent('''\
#%(if)s %(condition)s
%%%(name)s "%(value)s"
@@ -307,7 +269,7 @@ def get_compiler_info(compiler, language):
# have non-ASCII characters. Treat the output as bytearray.
data = {}
for line in result.splitlines():
if line.startswith('%'):
if line.startswith(b'%'):
k, _, v = line.partition(' ')
k = k.lstrip('%')
data[k] = v.replace(' ', '').lstrip('"').rstrip('"')
@@ -435,11 +397,10 @@ def check_compiler(compiler, language, target):
@imports('json')
@imports('subprocess')
@imports('sys')
@imports(_from='locale', _import='getpreferredencoding')
def get_vc_paths(topsrcdir):
encoding = getpreferredencoding(False)
def vswhere(args):
return json.loads(subprocess.check_output([os.path.join(topsrcdir, 'build/win32/vswhere.exe'), '-format', 'json'] + args).decode(encoding, errors='replace'))
encoding = 'mbcs' if sys.platform == 'win32' else 'utf-8'
return json.loads(subprocess.check_output([os.path.join(topsrcdir, 'build/win32/vswhere.exe'), '-format', 'json'] + args).decode(encoding, 'replace'))
# Can't pass -requires with -legacy, so query each separately.
# Legacy versions first (VS2015)
@@ -458,7 +419,7 @@ def get_vc_paths(topsrcdir):
# Then VS2017 and newer.
for install in vswhere(['-requires', 'Microsoft.VisualStudio.Component.VC.Tools.x86.x64']):
path = install['installationPath']
tools_version = open(os.path.join(path, r'VC\Auxiliary\Build\Microsoft.VCToolsVersion.default.txt'), 'r', encoding=encoding, errors='replace').read().strip()
tools_version = open(os.path.join(path, r'VC\Auxiliary\Build\Microsoft.VCToolsVersion.default.txt'), 'rb').read().strip()
tools_path = os.path.join(path, r'VC\Tools\MSVC', tools_version, r'bin\HostX64')
yield (Version(install['installationVersion']), {
'x64': [os.path.join(tools_path, 'x64')],
@@ -640,7 +601,7 @@ def compiler(language, host_or_target, c_compiler=None, other_compiler=None,
if cross_compiling and other_compiler.type == 'clang':
return namespace(**{
k: [] if k == 'flags' else v
for k, v in other_compiler.__dict__.items()
for k, v in other_compiler.__dict__.iteritems()
})
# Normally, we'd use `var` instead of `_var`, but the interaction with
+3 -10
View File
@@ -25,22 +25,15 @@ def configure_error(message):
@imports('sys')
@imports(_from='mozbuild.configure.util', _import='LineIO')
@imports(_from='mozbuild.shellutil', _import='quote')
@imports(_from='mozbuild.getencoding', _import='getencoding')
def check_cmd_output(*args, **kwargs):
encoding = getencoding()
onerror = kwargs.pop('onerror', None)
with log.queue_debug():
log.debug('Executing: `%s`', quote(*args))
proc = subprocess.Popen(args, stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
stdout, stderr = proc.communicate()
retcode = proc.wait()
stdout = stdout.decode(encoding, errors='replace')
stderr = stderr.decode(encoding, errors='replace')
if retcode == 0:
return stdout
@@ -77,7 +70,7 @@ def windows_binary_type(path):
Returns WindowsBinaryType constant.
"""
GetBinaryTypeW = ctypes.windll.kernel32.GetBinaryTypeW
GetBinaryTypeW.argtypes = [wintypes.LPWSTR, ctypes.POINTER(wintypes.DWORD)]
GetBinaryTypeW.argtypes = [wintypes.LPWSTR, wintypes.POINTER(wintypes.DWORD)]
GetBinaryTypeW.restype = wintypes.BOOL
bin_type = wintypes.DWORD()
@@ -239,7 +232,7 @@ def unique_list(l):
# ('19.0', 'arm', r'C:\...\amd64_arm\cl.exe')
# ('19.0', 'x64', r'C:\...\amd64\cl.exe')
# ('19.0', 'x86', r'C:\...\amd64_x86\cl.exe')
@imports(_import='winreg', _as='winreg')
@imports(_import='_winreg', _as='winreg')
@imports(_from='__builtin__', _import='WindowsError')
@imports(_from='fnmatch', _import='fnmatch')
def get_registry_values(pattern):
@@ -302,7 +295,7 @@ def get_registry_values(pattern):
keys = next_keys
@imports(_from='mozbuild.version', _import='RichVersion', _as='_Version')
@imports(_from='mozbuild.configure.util', _import='Version', _as='_Version')
def Version(v):
'A version number that can be compared usefully.'
return _Version(v)
+1 -4
View File
@@ -408,12 +408,9 @@ mt = check_prog('MT', depends_win()(lambda: ('mt.exe',)), input='MT',
@depends_win(mt)
@checking('whether MT is really Microsoft Manifest Tool', lambda x: bool(x))
@imports('subprocess')
@imports(_from='locale', _import='getpreferredencoding')
def valid_mt(path):
encoding = getpreferredencoding(False)
try:
out = subprocess.check_output([path])
out = out.decode(encoding, errors='replace').splitlines()
out = subprocess.check_output([path]).splitlines()
out = '\n'.join(l for l in out
if 'Microsoft (R) Manifest Tool' in l)
if out:
+13 -13
View File
@@ -58,7 +58,7 @@ def runUtil(util, args, inputdata = None):
def createRandomFile(randomFile):
for count in range(0, 2048):
for count in xrange(0, 2048):
randomFile.write(chr(random.randint(0, 255)))
@@ -125,7 +125,7 @@ def createSSLServerCertificate(build, srcDir):
iterator = iter(locations)
# Skips the first entry, I don't know why: bug 879740
next(iterator)
iterator.next()
locationsParam = ""
firstLocation = ""
@@ -148,7 +148,7 @@ def createSSLServerCertificate(build, srcDir):
firstLocation = loc.host
if not firstLocation:
print("Nothing to generate, no automatic secure hosts specified")
print "Nothing to generate, no automatic secure hosts specified"
else:
createRandomFile(rndfile)
@@ -162,7 +162,7 @@ def createSSLServerCertificate(build, srcDir):
return 0
if len(sys.argv) == 1:
print("Specify --gen-server or --gen-ca")
print "Specify --gen-server or --gen-ca"
sys.exit(1)
build = MozbuildObject.from_environment()
@@ -170,23 +170,23 @@ certdir = os.path.join(build.topsrcdir, "build", "pgo", "certs")
if sys.argv[1] == "--gen-server":
certificateStatus = createSSLServerCertificate(build, certdir)
if certificateStatus:
print("TEST-UNEXPECTED-FAIL | SSL Server Certificate generation")
print "TEST-UNEXPECTED-FAIL | SSL Server Certificate generation"
sys.exit(certificateStatus)
if sys.argv[1] == "--gen-ca":
certificateStatus = createCertificateAuthority(build, certdir)
if certificateStatus:
print("TEST-UNEXPECTED-FAIL | Certificate Authority generation")
print "TEST-UNEXPECTED-FAIL | Certificate Authority generation"
else:
print("\n\n")
print("===================================================")
print(" IMPORTANT:")
print(" To use this new certificate authority in tests")
print(" run 'make' at testing/mochitest")
print("===================================================")
print "\n\n"
print "==================================================="
print " IMPORTANT:"
print " To use this new certificate authority in tests"
print " run 'make' at testing/mochitest"
print "==================================================="
sys.exit(certificateStatus)
print("Invalid option specified")
print "Invalid option specified"
sys.exit(1)
@@ -88,7 +88,7 @@ var decompressedJQuery = function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(par
for documentation and information on getting the source.
*/
var decompressedDojo = function(p,a,c,k,e,d){e=function(c){return(c<a?"":e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)d[e(c)]=k[c]||e(c);k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('if(V z=="1k"){(B(){if(V D["1o"]=="1k"){D.1o={}}if((!D["1z"])||(!1z["ca"])){D.1z={}}A cn=["rA","rz","1K","ry","rx","9f","rw","rv","ru","rt","rs","rr","rq","ro","rn","rm"];A i=0,24;1s(24=cn[i++]){if(!1z[24]){1z[24]=B(){}}}if(V D["z"]=="1k"){D.z={}}z.1W=D;A d3={im:U,rl:U,rk:"",rj:"",ri:"",rh:K,rg:U};R(A 8z in d3){if(V 1o[8z]=="1k"){1o[8z]=d3[8z]}}A jK=["rf","rd","rc","rb"];A t;1s(t=jK.3a()){z["is"+t]=U}})();z.8h=1o.8h;z.cY={jJ:0,jI:9,jH:0,jG:"",jF:2V("$ra: r9 $".1f(/[0-9]+/)[0]),2i:B(){4G(z.cY){C jJ+"."+jI+"."+jH+jG+" ("+jF+")"}}};z.d1=B(jE,jD,1V){A 2h=1V||z.1W;R(A i=0,p;2h&&(p=jE[i]);i++){2h=(p in 2h?2h[p]:(jD?2h[p]={}:1k))}C 2h};z.88=B(jC,jA,jB){A d2=jC.1A("."),p=d2.8q(),M=z.d1(d2,K,jB);C(M&&p?(M[p]=jA):1k)};z.6q=B(jz,jy,jx){C z.d1(jz.1A("."),jy,jx)};z.r8=B(jw,M){C!!z.6q(jw,U,M)};z["3u"]=B(d0){C z.1W.3u?z.1W.3u(d0):3u(d0)};z.ia=B(jv,cZ,cX){A 8y="r7: "+jv;if(cZ){8y+=" "+cZ}if(cX){8y+=" -- r6 be r5 in cY: "+cX}1z.1K(8y)};z.r4=B(ju,cW){A cV="r3: "+ju+" -- r2 r1 4F r0 qZ qY.";if(cW){cV+=" "+cW}1z.1K(cV)};(B(){A cR={53:{},6p:0,1h:{},8k:{z:{1p:"z",1Z:"."},cU:{1p:"cU",1Z:"../qX/cU"},cT:{1p:"cT",1Z:"cT"}},cN:B(cS){A mp=D.8k;C jp(mp[cS]&&mp[cS].1Z)},jk:B(8x){A mp=D.8k;if(D.cN(8x)){C mp[8x].1Z}C 8x},8v:[],6t:U,56:[],8t:[],8u:U};R(A cQ in cR){z[cQ]=cR[cQ]}})();z.jg=B(8w,cP,cb){A 1g=(((8w.2s(0)=="/"||8w.1f(/^\\w+:/)))?"":D.51)+8w;if(1o.jt&&z.c8){1g+="?"+67(1o.jt).2f(/\\W+/g,"")}1u{C!cP?D.cO(1g,cb):D.jq(1g,cP,cb)}1y(e){1z.1K(e);C U}};z.cO=B(1g,cb){if(D.8v[1g]){C K}A 6u=D.iR(1g,K);if(!6u){C U}D.8v[1g]=K;D.8v.Y(1g);if(cb){6u="("+6u+")"}A jr=z["3u"](6u+"\\r\\n//@ qW="+1g);if(cb){cb(jr)}C K};z.jq=B(1g,jo,cb){A ok=U;1u{ok=D.cO(1g,cb)}1y(e){1z.1K("qV je ",1g," 4G 9f: ",e)}C jp(ok&&D.53[jo])};z.6m=B(){D.8u=K;D.6t=K;A 57=D.56;D.56=[];R(A x=0;x<57.G;x++){57[x]()}D.8u=U;if(z.6t&&z.6p==0&&D.56.G>0){z.8s()}};z.ck=B(){A 57=D.8t;1s(57.G){(57.8q())()}};z.qU=B(M,jn){A d=z;if(P.G==1){d.56.Y(M)}I{if(P.G>1){d.56.Y(B(){M[jn]()})}}if(d.6t&&d.6p==0&&!d.8u){d.8s()}};z.dW=B(M,jm){A d=z;if(P.G==1){d.8t.Y(M)}I{if(P.G>1){d.8t.Y(B(){M[jm]()})}}};z.iM=B(){if(D.6t){C}if(D.6p>0){1z.1K("qT qS in qR!");C}z.8s()};z.8s=B(){if(V 5c=="8b"||(1o["qQ"]&&z.2M)){5c("z.6m();",0)}I{z.6m()}};z.cF=B(jl){A 4v=jl.1A(".");R(A i=4v.G;i>0;i--){A 8r=4v.2w(0,i).22(".");if((i==1)&&!D.cN(8r)){4v[0]="../"+4v[0]}I{A cM=D.jk(8r);if(cM!=8r){4v.3S(0,i,cM);3f}}}C 4v};z.jj=U;z.8m=B(2T,qP,55){55=D.jj||55;A 54=D.53[2T];if(54){C 54}A cL=2T.1A(".");A 3L=D.cF(2T);A jh=((3L[0].2s(0)!="/")&&!3L[0].1f(/^\\w+:/));A ji=3L[3L.G-1];A 3m;if(ji=="*"){2T=cL.2w(0,-1).22(".");3L.8q();3m=3L.22("/")+"/"+(1o["qO"]||"qN")+".js";if(jh&&3m.2s(0)=="/"){3m=3m.2w(1)}}I{3m=3L.22("/")+".js";2T=cL.22(".")}A jf=(!55)?2T:L;A ok=D.jg(3m,jf);if((!ok)&&(!55)){2m S 1O("qM 3O 4E \'"+2T+"\'; 72 qL \'"+3m+"\'")}if((!55)&&(!D["qK"])){54=D.53[2T];if(!54){2m S 1O("qJ \'"+2T+"\' is 3O qI a8 je \'"+3m+"\'")}}C 54};z.8c=z.8m;z.1Q=B(cK){A cJ=cK+"";A 8p=cJ;A 6s=cK.1A(/\\./);if(6s[6s.G-1]=="*"){6s.8q();8p=6s.22(".")}A 8o=z.6q(8p,K);D.53[cJ]=8o;D.53[8p]=8o;C 8o};z.qH=B(8n){A jd=8n["qG"]||[];A cI=jd.3U(8n[z.j4]||8n["aY"]||[]);R(A x=0;x<cI.G;x++){A 8l=cI[x];if(8l.1P==4e){z.8m.14(z,8l)}I{z.8m(8l)}}};z.jb=B(jc,qF){if(jc===K){A cH=[];R(A i=1;i<P.G;i++){cH.Y(P[i])}z.8c.14(z,cH)}};z.qE=z.jb;z.io=B(cG,ja){D.8k[cG]={1p:cG,1Z:ja}};z.qD=B(qC,qB,qA,qz){z.8c("z.j9");z.j9.qy.14(z.qx,P)};(B(){A j7=S 9G("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\\\?([^#]*))?(#(.*))?$");A j6=S 9G("^((([^:]+:)?([^@]+))@)?([^:]*)(:([0-9]+))?$");z.4r=B(){A n=L;A 1V=P;A 1g=1V[0];R(A i=1;i<1V.G;i++){if(!1V[i]){6c}A 1t=S z.4r(1V[i]+"");A 4u=S z.4r(1g+"");if((1t.28=="")&&(!1t.4t)&&(!1t.3l)&&(!1t.1r)){if(1t.52!=n){4u.52=1t.52}1t=4u}I{if(!1t.4t){1t.4t=4u.4t;if(!1t.3l){1t.3l=4u.3l;if(1t.28.2s(0)!="/"){A j8=4u.28.21(0,4u.28.31("/")+1)+1t.28;A 1X=j8.1A("/");R(A j=0;j<1X.G;j++){if(1X[j]=="."){if(j==1X.G-1){1X[j]=""}I{1X.3S(j,1);j--}}I{if(j>0&&!(j==1&&1X[0]=="")&&1X[j]==".."&&1X[j-1]!=".."){if(j==(1X.G-1)){1X.3S(j,1);1X[j-1]=""}I{1X.3S(j-1,2);j-=2}}}}1t.28=1X.22("/")}}}}1g="";if(1t.4t){1g+=1t.4t+":"}if(1t.3l){1g+="//"+1t.3l}1g+=1t.28;if(1t.1r){1g+="?"+1t.1r}if(1t.52){1g+="#"+1t.52}}D.1g=1g.2i();A r=D.1g.1f(j7);D.4t=r[2]||(r[1]?"":n);D.3l=r[4]||(r[3]?"":n);D.28=r[5];D.1r=r[7]||(r[6]?"":n);D.52=r[9]||(r[8]?"":n);if(D.3l!=n){r=D.3l.1f(j6);D.8X=r[3]||n;D.8W=r[4]||n;D.qw=r[5];D.qv=r[7]||n}};z.4r.1C.2i=B(){C D.1g}})();z.qu=B(j5,2E){A 2B=z.cF(j5).22("/");if(!2B){C L}if(2B.31("/")!=2B.G-1){2B+="/"}A cE=2B.T(":");if(2B.2s(0)!="/"&&(cE==-1||cE>2B.T("/"))){2B=z.51+2B}C S z.4r(2B,2E)};if(V 26!="1k"){z.c8=K;z.j4="qt";(B(){A d=z;if(1q&&1q.4I){A 8j=1q.4I("ak");A j3=/z(\\.qs)?\\.js([\\?\\.]|$)/i;R(A i=0;i<8j.G;i++){A 4X=8j[i].5t("4X");if(!4X){6c}A m=4X.1fLine truncated
var decompressedDojo = function(p,a,c,k,e,d){e=function(c){return(c<a?"":e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)d[e(c)]=k[c]||e(c);k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('if(V z=="1k"){(B(){if(V D["1o"]=="1k"){D.1o={}}if((!D["1z"])||(!1z["ca"])){D.1z={}}A cn=["rA","rz","1K","ry","rx","9f","rw","rv","ru","rt","rs","rr","rq","ro","rn","rm"];A i=0,24;1s(24=cn[i++]){if(!1z[24]){1z[24]=B(){}}}if(V D["z"]=="1k"){D.z={}}z.1W=D;A d3={im:U,rl:U,rk:"",rj:"",ri:"",rh:K,rg:U};R(A 8z in d3){if(V 1o[8z]=="1k"){1o[8z]=d3[8z]}}A jK=["rf","rd","rc","rb"];A t;1s(t=jK.3a()){z["is"+t]=U}})();z.8h=1o.8h;z.cY={jJ:0,jI:9,jH:0,jG:"",jF:2V("$ra: r9 $".1f(/[0-9]+/)[0]),2i:B(){4G(z.cY){C jJ+"."+jI+"."+jH+jG+" ("+jF+")"}}};z.d1=B(jE,jD,1V){A 2h=1V||z.1W;R(A i=0,p;2h&&(p=jE[i]);i++){2h=(p in 2h?2h[p]:(jD?2h[p]={}:1k))}C 2h};z.88=B(jC,jA,jB){A d2=jC.1A("."),p=d2.8q(),M=z.d1(d2,K,jB);C(M&&p?(M[p]=jA):1k)};z.6q=B(jz,jy,jx){C z.d1(jz.1A("."),jy,jx)};z.r8=B(jw,M){C!!z.6q(jw,U,M)};z["3u"]=B(d0){C z.1W.3u?z.1W.3u(d0):3u(d0)};z.ia=B(jv,cZ,cX){A 8y="r7: "+jv;if(cZ){8y+=" "+cZ}if(cX){8y+=" -- r6 be r5 in cY: "+cX}1z.1K(8y)};z.r4=B(ju,cW){A cV="r3: "+ju+" -- r2 r1 4F r0 qZ qY.";if(cW){cV+=" "+cW}1z.1K(cV)};(B(){A cR={53:{},6p:0,1h:{},8k:{z:{1p:"z",1Z:"."},cU:{1p:"cU",1Z:"../qX/cU"},cT:{1p:"cT",1Z:"cT"}},cN:B(cS){A mp=D.8k;C jp(mp[cS]&&mp[cS].1Z)},jk:B(8x){A mp=D.8k;if(D.cN(8x)){C mp[8x].1Z}C 8x},8v:[],6t:U,56:[],8t:[],8u:U};R(A cQ in cR){z[cQ]=cR[cQ]}})();z.jg=B(8w,cP,cb){A 1g=(((8w.2s(0)=="/"||8w.1f(/^\\w+:/)))?"":D.51)+8w;if(1o.jt&&z.c8){1g+="?"+67(1o.jt).2f(/\\W+/g,"")}1u{C!cP?D.cO(1g,cb):D.jq(1g,cP,cb)}1y(e){1z.1K(e);C U}};z.cO=B(1g,cb){if(D.8v[1g]){C K}A 6u=D.iR(1g,K);if(!6u){C U}D.8v[1g]=K;D.8v.Y(1g);if(cb){6u="("+6u+")"}A jr=z["3u"](6u+"\\r\\n//@ qW="+1g);if(cb){cb(jr)}C K};z.jq=B(1g,jo,cb){A ok=U;1u{ok=D.cO(1g,cb)}1y(e){1z.1K("qV je ",1g," 4G 9f: ",e)}C jp(ok&&D.53[jo])};z.6m=B(){D.8u=K;D.6t=K;A 57=D.56;D.56=[];R(A x=0;x<57.G;x++){57[x]()}D.8u=U;if(z.6t&&z.6p==0&&D.56.G>0){z.8s()}};z.ck=B(){A 57=D.8t;1s(57.G){(57.8q())()}};z.qU=B(M,jn){A d=z;if(P.G==1){d.56.Y(M)}I{if(P.G>1){d.56.Y(B(){M[jn]()})}}if(d.6t&&d.6p==0&&!d.8u){d.8s()}};z.dW=B(M,jm){A d=z;if(P.G==1){d.8t.Y(M)}I{if(P.G>1){d.8t.Y(B(){M[jm]()})}}};z.iM=B(){if(D.6t){C}if(D.6p>0){1z.1K("qT qS in qR!");C}z.8s()};z.8s=B(){if(V 5c=="8b"||(1o["qQ"]&&z.2M)){5c("z.6m();",0)}I{z.6m()}};z.cF=B(jl){A 4v=jl.1A(".");R(A i=4v.G;i>0;i--){A 8r=4v.2w(0,i).22(".");if((i==1)&&!D.cN(8r)){4v[0]="../"+4v[0]}I{A cM=D.jk(8r);if(cM!=8r){4v.3S(0,i,cM);3f}}}C 4v};z.jj=U;z.8m=B(2T,qP,55){55=D.jj||55;A 54=D.53[2T];if(54){C 54}A cL=2T.1A(".");A 3L=D.cF(2T);A jh=((3L[0].2s(0)!="/")&&!3L[0].1f(/^\\w+:/));A ji=3L[3L.G-1];A 3m;if(ji=="*"){2T=cL.2w(0,-1).22(".");3L.8q();3m=3L.22("/")+"/"+(1o["qO"]||"qN")+".js";if(jh&&3m.2s(0)=="/"){3m=3m.2w(1)}}I{3m=3L.22("/")+".js";2T=cL.22(".")}A jf=(!55)?2T:L;A ok=D.jg(3m,jf);if((!ok)&&(!55)){2m S 1O("qM 3O 4E \'"+2T+"\'; 72 qL \'"+3m+"\'")}if((!55)&&(!D["qK"])){54=D.53[2T];if(!54){2m S 1O("qJ \'"+2T+"\' is 3O qI a8 je \'"+3m+"\'")}}C 54};z.8c=z.8m;z.1Q=B(cK){A cJ=cK+"";A 8p=cJ;A 6s=cK.1A(/\\./);if(6s[6s.G-1]=="*"){6s.8q();8p=6s.22(".")}A 8o=z.6q(8p,K);D.53[cJ]=8o;D.53[8p]=8o;C 8o};z.qH=B(8n){A jd=8n["qG"]||[];A cI=jd.3U(8n[z.j4]||8n["aY"]||[]);R(A x=0;x<cI.G;x++){A 8l=cI[x];if(8l.1P==4e){z.8m.14(z,8l)}I{z.8m(8l)}}};z.jb=B(jc,qF){if(jc===K){A cH=[];R(A i=1;i<P.G;i++){cH.Y(P[i])}z.8c.14(z,cH)}};z.qE=z.jb;z.io=B(cG,ja){D.8k[cG]={1p:cG,1Z:ja}};z.qD=B(qC,qB,qA,qz){z.8c("z.j9");z.j9.qy.14(z.qx,P)};(B(){A j7=S 9G("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\\\?([^#]*))?(#(.*))?$");A j6=S 9G("^((([^:]+:)?([^@]+))@)?([^:]*)(:([0-9]+))?$");z.4r=B(){A n=L;A 1V=P;A 1g=1V[0];R(A i=1;i<1V.G;i++){if(!1V[i]){6c}A 1t=S z.4r(1V[i]+"");A 4u=S z.4r(1g+"");if((1t.28=="")&&(!1t.4t)&&(!1t.3l)&&(!1t.1r)){if(1t.52!=n){4u.52=1t.52}1t=4u}I{if(!1t.4t){1t.4t=4u.4t;if(!1t.3l){1t.3l=4u.3l;if(1t.28.2s(0)!="/"){A j8=4u.28.21(0,4u.28.31("/")+1)+1t.28;A 1X=j8.1A("/");R(A j=0;j<1X.G;j++){if(1X[j]=="."){if(j==1X.G-1){1X[j]=""}I{1X.3S(j,1);j--}}I{if(j>0&&!(j==1&&1X[0]=="")&&1X[j]==".."&&1X[j-1]!=".."){if(j==(1X.G-1)){1X.3S(j,1);1X[j-1]=""}I{1X.3S(j-1,2);j-=2}}}}1t.28=1X.22("/")}}}}1g="";if(1t.4t){1g+=1t.4t+":"}if(1t.3l){1g+="//"+1t.3l}1g+=1t.28;if(1t.1r){1g+="?"+1t.1r}if(1t.52){1g+="#"+1t.52}}D.1g=1g.2i();A r=D.1g.1f(j7);D.4t=r[2]||(r[1]?"":n);D.3l=r[4]||(r[3]?"":n);D.28=r[5];D.1r=r[7]||(r[6]?"":n);D.52=r[9]||(r[8]?"":n);if(D.3l!=n){r=D.3l.1f(j6);D.8X=r[3]||n;D.8W=r[4]||n;D.qw=r[5];D.qv=r[7]||n}};z.4r.1C.2i=B(){C D.1g}})();z.qu=B(j5,2E){A 2B=z.cF(j5).22("/");if(!2B){C L}if(2B.31("/")!=2B.G-1){2B+="/"}A cE=2B.T(":");if(2B.2s(0)!="/"&&(cE==-1||cE>2B.T("/"))){2B=z.51+2B}C S z.4r(2B,2E)};if(V 26!="1k"){z.c8=K;z.j4="qt";(B(){A d=z;if(1q&&1q.4I){A 8j=1q.4I("ak");A j3=/z(\\.qs)?\\.js([\\?\\.]|$)/i;R(A i=0;i<8j.G;i++){A 4X=8j[i].5t("4X");if(!4X){6c}A m=4X.1fLine truncated
/*
+1 -1
View File
@@ -77,7 +77,7 @@ if __name__ == '__main__':
jarlog = os.getenv("JARLOG_FILE")
if jarlog:
env["MOZ_JAR_LOG_FILE"] = os.path.abspath(jarlog)
print("jarlog: %s" % env["MOZ_JAR_LOG_FILE"])
print "jarlog: %s" % env["MOZ_JAR_LOG_FILE"]
cmdargs = ["http://localhost:%d/index.html" % PORT]
runner = FirefoxRunner(profile=profile,
+11 -22
View File
@@ -3,7 +3,7 @@
from __future__ import print_function
import os, sys
if not len(sys.argv) == 2 or not os.path.exists(sys.argv[1]):
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:
@@ -44,8 +44,7 @@ PP_DIRECTIVES = [
]
PP_FILES = []
PP_BAD_DIRECTIVE_FILES = []
PP_BAD_ENCODING_FILES = []
PP_BAD_FILES = []
for root, directories, filenames in os.walk(DIST_PATH):
for filename in filenames:
@@ -53,31 +52,21 @@ for root, directories, filenames in os.walk(DIST_PATH):
PP_FILES += [ os.path.join(root, filename).replace(os.sep, '/') ]
for file in PP_FILES:
with open(file, encoding='utf-8') as fp:
with open(file) as fp:
marker = '%' if file.endswith(PP_SPECIAL_TYPES) else '#'
directives = tuple(marker + directive for directive in PP_DIRECTIVES)
try:
for line in fp:
if line.startswith(directives):
PP_BAD_DIRECTIVE_FILES += [ file.replace(DIST_PATH + '/', '') ]
except UnicodeDecodeError:
PP_BAD_ENCODING_FILES += [ file.replace(DIST_PATH+ '/' , '') ]
for line in fp:
if line.startswith(directives):
PP_BAD_FILES += [ file.replace(DIST_PATH + '/', '') ]
fp.close()
PP_BAD_DIRECTIVE_FILES = list(dict.fromkeys(PP_BAD_DIRECTIVE_FILES))
PP_BAD_ENCODING_FILES = list(dict.fromkeys(PP_BAD_ENCODING_FILES))
PP_BAD_FILES = list(dict.fromkeys(PP_BAD_FILES))
print('Done!')
if len(PP_BAD_DIRECTIVE_FILES) > 0:
print("\nWARNING: The following {0} file(s) in {1} may require preprocessing:\n".format(len(PP_BAD_DIRECTIVE_FILES), DIST_PATH))
for file in PP_BAD_DIRECTIVE_FILES:
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)
if len(PP_BAD_ENCODING_FILES) > 0:
print("\nWARNING: The following {0} file(s) in {1} are not valid UTF-8:\n".format(len(PP_BAD_ENCODING_FILES), DIST_PATH))
for file in PP_BAD_ENCODING_FILES:
print(file)
sys.exit(0)
exit(0)
+1 -1
View File
@@ -10,4 +10,4 @@ with open(filename, 'rU') as fh:
source = fh.read()
statements = pymake.parser.parsestring(source, filename)
print(statements.to_source())
print statements.to_source()
+2 -2
View File
@@ -4,9 +4,9 @@ import sys
import pymake.parser
for f in sys.argv[1:]:
print("Parsing %s" % f)
print "Parsing %s" % f
fd = open(f, 'rU')
s = fd.read()
fd.close()
stmts = pymake.parser.parsestring(s, f)
print(stmts)
print stmts
+15 -15
View File
@@ -2,7 +2,7 @@
import errno, sys, os, shutil, time
from getopt import getopt, GetoptError
from .process import PythonException
from process import PythonException
__all__ = ["mkdir", "rm", "sleep", "touch"]
@@ -13,8 +13,8 @@ def mkdir(args):
"""
try:
opts, args = getopt(args, "p", ["parents"])
except GetoptError as e:
raise PythonException("mkdir: %s" % e, 1)
except GetoptError, e:
raise PythonException, ("mkdir: %s" % e, 1)
parents = False
for o, a in opts:
if o in ('-p', '--parents'):
@@ -25,11 +25,11 @@ def mkdir(args):
os.makedirs(f)
else:
os.mkdir(f)
except OSError as e:
except OSError, e:
if e.errno == errno.EEXIST and parents:
pass
else:
raise PythonException("mkdir: %s" % e, 1)
raise PythonException, ("mkdir: %s" % e, 1)
def rm(args):
"""
@@ -38,8 +38,8 @@ def rm(args):
"""
try:
opts, args = getopt(args, "rRf", ["force", "recursive"])
except GetoptError as e:
raise PythonException("rm: %s" % e, 1)
except GetoptError, e:
raise PythonException, ("rm: %s" % e, 1)
force = False
recursive = False
for o, a in opts:
@@ -50,7 +50,7 @@ def rm(args):
for f in args:
if os.path.isdir(f):
if not recursive:
raise PythonException("rm: cannot remove '%s': Is a directory" % f, 1)
raise PythonException, ("rm: cannot remove '%s': Is a directory" % f, 1)
else:
shutil.rmtree(f, force)
elif os.path.exists(f):
@@ -58,9 +58,9 @@ def rm(args):
os.unlink(f)
except:
if not force:
raise PythonException("rm: failed to remove '%s': %s" % (f, sys.exc_info()[0]), 1)
raise PythonException, ("rm: failed to remove '%s': %s" % (f, sys.exc_info()[0]), 1)
elif not force:
raise PythonException("rm: cannot remove '%s': No such file or directory" % f, 1)
raise PythonException, ("rm: cannot remove '%s': No such file or directory" % f, 1)
def sleep(args):
"""
@@ -70,7 +70,7 @@ def sleep(args):
values = {'s': 1, 'm': 60, 'h': 3600, 'd': 86400}
for a in args:
multiplier = 1
for k, v in values.items():
for k, v in values.iteritems():
if a.endswith(k):
a = a[:-1]
multiplier = v
@@ -79,7 +79,7 @@ def sleep(args):
f = float(a)
total += f * multiplier
except ValueError:
raise PythonException("sleep: invalid time interval '%s'" % a, 1)
raise PythonException, ("sleep: invalid time interval '%s'" % a, 1)
time.sleep(total)
def touch(args):
@@ -88,8 +88,8 @@ def touch(args):
"""
try:
opts, args = getopt(args, "t:")
except GetoptError as e:
raise PythonException("touch: %s" % e, 1)
except GetoptError, e:
raise PythonException, ("touch: %s" % e, 1)
opts = dict(opts)
times = None
if '-t' in opts:
@@ -97,7 +97,7 @@ def touch(args):
from time import mktime, localtime
m = re.match('^(?P<Y>(?:\d\d)?\d\d)?(?P<M>\d\d)(?P<D>\d\d)(?P<h>\d\d)(?P<m>\d\d)(?:\.(?P<s>\d\d))?$', opts['-t'])
if not m:
raise PythonException("touch: invalid date format '%s'" % opts['-t'], 1)
raise PythonException, ("touch: invalid date format '%s'" % opts['-t'], 1)
def normalized_field(m, f):
if f == 'Y':
if m.group(f) is None:
+13 -13
View File
@@ -11,7 +11,7 @@ except when a submake specifies -j1 when the parent make is building in parallel
import os, subprocess, sys, logging, time, traceback, re
from optparse import OptionParser
from . import data, parserdata, process, util
import data, parserdata, process, util
# TODO: If this ever goes from relocatable package to system-installed, this may need to be
# a configured-in path.
@@ -62,7 +62,7 @@ def parsemakeflags(env):
return opts
def _version(*args):
print("""pymake: GNU-compatible make program
print """pymake: GNU-compatible make program
Copyright (C) 2009 The Mozilla Foundation <http://www.mozilla.org/>
This is free software; see the source for copying conditions.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
@@ -71,7 +71,7 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.""")
DEALINGS IN THE SOFTWARE."""
_log = logging.getLogger('pymake.execution')
@@ -95,7 +95,7 @@ class _MakeContext(object):
def remakecb(self, remade, error=None):
if error is not None:
print(error)
print error
self.context.defer(self.cb, 2)
return
@@ -124,15 +124,15 @@ class _MakeContext(object):
self.makefile.include(f)
self.makefile.finishparsing()
self.makefile.remakemakefiles(self.remakecb)
except util.MakeError as e:
print(e)
except util.MakeError, e:
print e
self.context.defer(self.cb, 2)
return
if len(self.targets) == 0:
if self.makefile.defaulttarget is None:
print("No target specified and no default target found.")
print "No target specified and no default target found."
self.context.defer(self.cb, 2)
return
@@ -154,7 +154,7 @@ class _MakeContext(object):
if not len(self.realtargets):
if self.options.printdir:
print("make.py[%i]: Leaving directory '%s'" % (self.makelevel, self.workdir))
print "make.py[%i]: Leaving directory '%s'" % (self.makelevel, self.workdir)
sys.stdout.flush()
self.context.defer(self.cb, 0)
@@ -255,24 +255,24 @@ def main(args, env, cwd, cb):
context = process.getcontext(options.jobcount)
if options.printdir:
print("make.py[%i]: Entering directory '%s'" % (makelevel, workdir))
print "make.py[%i]: Entering directory '%s'" % (makelevel, workdir)
sys.stdout.flush()
if len(options.makefiles) == 0:
if os.path.exists(util.normaljoin(workdir, 'Makefile')):
options.makefiles.append('Makefile')
else:
print("No makefile found")
print "No makefile found"
cb(2)
return
ostmts, targets, overrides = parserdata.parsecommandlineargs(arguments)
_MakeContext(makeflags, makelevel, workdir, context, env, targets, options, ostmts, overrides, cb)
except (util.MakeError) as e:
print(e)
except (util.MakeError), e:
print e
if options.printdir:
print("make.py[%i]: Leaving directory '%s'" % (makelevel, workdir))
print "make.py[%i]: Leaving directory '%s'" % (makelevel, workdir)
sys.stdout.flush()
cb(2)
return
+18 -18
View File
@@ -3,9 +3,8 @@ A representation of makefile data structures.
"""
import logging, re, os, sys
from . import parserdata, parser, functions, process, util, implicit
from io import StringIO
from functools import reduce
import parserdata, parser, functions, process, util, implicit
from cStringIO import StringIO
if sys.version_info[0] < 3:
str_type = basestring
@@ -406,7 +405,7 @@ class Expansion(BaseExpansion, list):
if len(a) != len(b):
return False
for i in range(len(self)):
for i in xrange(len(self)):
e1, is_func1 = a[i]
e2, is_func2 = b[i]
@@ -448,7 +447,7 @@ class Variables(object):
self.parent = parent
def readfromenvironment(self, env):
for k, v in env.items():
for k, v in env.iteritems():
self.set(k, self.FLAVOR_RECURSIVE, self.SOURCE_ENVIRONMENT, v)
def get(self, name, expand=True):
@@ -548,7 +547,7 @@ class Variables(object):
self.set(k, flavor, source, value)
def __iter__(self):
for k, (flavor, source, value, valueexp) in self._map.items():
for k, (flavor, source, value, valueexp) in self._map.iteritems():
yield k, flavor, source, value
def __contains__(self, item):
@@ -865,7 +864,7 @@ class RemakeRuleContext(object):
assert error in (True, False)
if error:
print("<%s>: Found error" % self.target.target)
print "<%s>: Found error" % self.target.target
self.error = True
if didanything:
self.didanything = True
@@ -950,8 +949,8 @@ class RemakeRuleContext(object):
self.target.didanything = True
try:
self.commands = [c for c in self.rule.getcommands(self.target, self.makefile)]
except util.MakeError as e:
print(e)
except util.MakeError, e:
print e
sys.stdout.flush()
cb(error=True)
return
@@ -1284,9 +1283,9 @@ class Target(object):
try:
self.resolvedeps(makefile, targetstack, [], False)
except util.MakeError as e:
except util.MakeError, e:
if printerror:
print(e)
print e
self.error = True
self.notifydone(makefile)
return
@@ -1398,7 +1397,7 @@ class _CommandWrapper(object):
def _cb(self, res):
if res != 0 and not self.ignoreErrors:
print("%s: command '%s' failed, return code %i" % (self.loc, self.cline, res))
print "%s: command '%s' failed, return code %i" % (self.loc, self.cline, res)
self.usercb(error=True)
else:
self.usercb(error=False)
@@ -1592,7 +1591,7 @@ class _RemakeContext(object):
assert error in (True, False)
if error and self.required:
print("Error remaking makefiles (ignored)")
print "Error remaking makefiles (ignored)"
if len(self.toremake):
target, self.required = self.toremake.pop(0)
@@ -1679,7 +1678,7 @@ class Makefile(object):
self.variables.set('MAKECMDGOALS', Variables.FLAVOR_SIMPLE,
Variables.SOURCE_AUTOMATIC, ' '.join(targets))
for vname, val in implicit.variables.items():
for vname, val in implicit.variables.iteritems():
self.variables.set(vname,
Variables.FLAVOR_SIMPLE,
Variables.SOURCE_IMPLICIT, val)
@@ -1751,10 +1750,11 @@ class Makefile(object):
if value is None:
self._vpath = []
else:
self._vpath = [e for e in re.split('[%s\s]+' % os.pathsep,
value.resolvestr(self, self.variables, ['VPATH'])) if e != '']
self._vpath = filter(lambda e: e != '',
re.split('[%s\s]+' % os.pathsep,
value.resolvestr(self, self.variables, ['VPATH'])))
targets = list(self._targets.values())
targets = list(self._targets.itervalues())
for t in targets:
t.explicit = True
for r in t.rules:
@@ -1825,7 +1825,7 @@ class Makefile(object):
def getsubenvironment(self, variables):
env = dict(self.env)
for vname, v in self.exportedvars.items():
for vname, v in self.exportedvars.iteritems():
if v:
flavor, source, val = variables.get(vname)
if val is None:
+11 -11
View File
@@ -2,10 +2,10 @@
Makefile functions.
"""
from . import parser, util
import parser, util
import subprocess, os, logging, sys
from .globrelative import glob
from io import StringIO
from globrelative import glob
from cStringIO import StringIO
log = logging.getLogger('pymake.data')
@@ -135,7 +135,7 @@ class Function(object):
if len(self._arguments) != len(other._arguments):
return False
for i in range(len(self._arguments)):
for i in xrange(len(self._arguments)):
# According to the GNU make manual Section 8.1, whitespace around
# arguments is *not* part of the argument's value. So, we do a
# whitespace-agnostic comparison.
@@ -525,7 +525,7 @@ class JoinFunction(Function):
@staticmethod
def iterjoin(l1, l2):
for i in range(0, max(len(l1), len(l2))):
for i in xrange(0, max(len(l1), len(l2))):
i1 = i < len(l1) and l1[i] or ''
i2 = i < len(l2) and l2[i] or ''
yield i1 + i2
@@ -670,7 +670,7 @@ class CallFunction(Function):
v = data.Variables(parent=variables)
v.set('0', data.Variables.FLAVOR_SIMPLE, data.Variables.SOURCE_AUTOMATIC, vname)
for i in range(1, len(self._arguments)):
for i in xrange(1, len(self._arguments)):
param = self._arguments[i].resolvestr(makefile, variables, setting)
v.set(str(i), data.Variables.FLAVOR_SIMPLE, data.Variables.SOURCE_AUTOMATIC, param)
@@ -770,7 +770,7 @@ class ShellFunction(Function):
__slots__ = Function.__slots__
def resolve(self, makefile, variables, fd, setting):
from .process import prepare_command
from process import prepare_command
cline = self._arguments[0].resolvestr(makefile, variables, setting)
executable, cline = prepare_command(cline, makefile.workdir, self.loc)
@@ -785,8 +785,8 @@ class ShellFunction(Function):
try:
p = subprocess.Popen(cline, executable=executable, env=makefile.env, shell=False,
stdout=subprocess.PIPE, cwd=makefile.workdir)
except OSError as e:
print("Error executing command %s" % cline[0], e, file=sys.stderr)
except OSError, e:
print >>sys.stderr, "Error executing command %s" % cline[0], e
return
finally:
os.environ['PATH'] = oldpath
@@ -830,7 +830,7 @@ class InfoFunction(Function):
def resolve(self, makefile, variables, fd, setting):
v = self._arguments[0].resolvestr(makefile, variables, setting)
print(v)
print v
functionmap = {
'subst': SubstFunction,
@@ -870,4 +870,4 @@ functionmap = {
'info': InfoFunction,
}
from . import data
import data
+2 -2
View File
@@ -7,7 +7,7 @@ Filename globbing like the python glob module with minor differences:
"""
import os, re, fnmatch
from . import util
import util
_globcheck = re.compile('[[*?]')
@@ -62,7 +62,7 @@ def globpattern(dir, pattern):
if not leaf.startswith('.')]
leaves = fnmatch.filter(leaves, pattern)
leaves = [l for l in leaves if os.path.exists(util.normaljoin(dir, l))]
leaves = filter(lambda l: os.path.exists(util.normaljoin(dir, l)), leaves)
leaves.sort()
return leaves
+4 -4
View File
@@ -34,7 +34,7 @@ coming.
"""
import logging, re, os, sys
from . import data, functions, util, parserdata
import data, functions, util, parserdata
_log = logging.getLogger('pymake.parser')
@@ -108,7 +108,7 @@ _alltokens = re.compile(r'''\\*\# | # hash mark preceeded by any number of backs
:: |
(?:\$(?:$|[\(\{](?:%s)\s+|.)) | # dollar sign followed by EOF, a function keyword with whitespace, or any character
:(?![\\/]) | # colon followed by anything except a slash (Windows path detection)
[=#{}();,|'"]''' % '|'.join(iter(functions.functionmap.keys())), re.VERBOSE)
[=#{}();,|'"]''' % '|'.join(functions.functionmap.iterkeys()), re.VERBOSE)
def iterdata(d, offset, tokenlist, it):
"""
@@ -336,7 +336,7 @@ _conditionkeywords = {
'ifndef': ifndef
}
_conditiontokens = tuple(_conditionkeywords.keys())
_conditiontokens = tuple(_conditionkeywords.iterkeys())
_conditionre = re.compile(r'(%s)(?:$|\s+)' % '|'.join(_conditiontokens))
_directivestokenlist = _conditiontokens + \
@@ -691,7 +691,7 @@ def parsemakesyntax(d, offset, stopon, iterfunc):
while True: # this is not a for loop because `di` changes during the function
assert stacktop is not None
try:
s, token, tokenoffset, offset = next(di)
s, token, tokenoffset, offset = di.next()
except StopIteration:
break
+19 -19
View File
@@ -1,6 +1,6 @@
import logging, re, os
from . import data, parser, functions, util
from io import StringIO
import data, parser, functions, util
from cStringIO import StringIO
from pymake.globrelative import hasglob, glob
_log = logging.getLogger('pymake.data')
@@ -76,7 +76,7 @@ def parsecommandlineargs(args):
overrides = []
stmts = StatementList()
r = []
for i in range(0, len(args)):
for i in xrange(0, len(args)):
a = args[i]
vname, t, val = util.strpartition(a, ':=')
@@ -195,7 +195,7 @@ class Rule(Statement):
deps = list(_expandwildcards(makefile, data.stripdotslashes(self.depexp.resolvesplit(makefile, makefile.variables))))
if ispattern:
rule = data.PatternRule(targets, list(map(data.Pattern, deps)), self.doublecolon, loc=self.targetexp.loc)
rule = data.PatternRule(targets, map(data.Pattern, deps), self.doublecolon, loc=self.targetexp.loc)
makefile.appendimplicitrule(rule)
else:
rule = data.Rule(deps, self.doublecolon, loc=self.targetexp.loc, weakdeps=False)
@@ -207,7 +207,7 @@ class Rule(Statement):
context.currule = rule
def dump(self, fd, indent):
print("%sRule %s: %s" % (indent, self.targetexp, self.depexp), file=fd)
print >>fd, "%sRule %s: %s" % (indent, self.targetexp, self.depexp)
def to_source(self):
sep = ':'
@@ -285,7 +285,7 @@ class StaticPatternRule(Statement):
context.currule = rule
def dump(self, fd, indent):
print("%sStaticPatternRule %s: %s: %s" % (indent, self.targetexp, self.patternexp, self.depexp), file=fd)
print >>fd, "%sStaticPatternRule %s: %s: %s" % (indent, self.targetexp, self.patternexp, self.depexp)
def to_source(self):
sep = ':'
@@ -339,7 +339,7 @@ class Command(Statement):
context.currule.addcommand(self.exp)
def dump(self, fd, indent):
print("%sCommand %s" % (indent, self.exp,), file=fd)
print >>fd, "%sCommand %s" % (indent, self.exp,)
def to_source(self):
# Commands have some interesting quirks when it comes to source
@@ -438,7 +438,7 @@ class SetVariable(Statement):
v.set(vname, flavor, self.source, value)
def dump(self, fd, indent):
print("%sSetVariable<%s> %s %s\n%s %r" % (indent, self.valueloc, self.vnameexp, self.token, indent, self.value), file=fd)
print >>fd, "%sSetVariable<%s> %s %s\n%s %r" % (indent, self.valueloc, self.vnameexp, self.token, indent, self.value)
def __eq__(self, other):
if not isinstance(other, SetVariable):
@@ -452,7 +452,7 @@ class SetVariable(Statement):
def to_source(self):
chars = []
for i in range(0, len(self.value)):
for i in xrange(0, len(self.value)):
c = self.value[i]
# Literal # is escaped in variable assignment otherwise it would be
@@ -651,14 +651,14 @@ class ConditionBlock(Statement):
i += 1
def dump(self, fd, indent):
print("%sConditionBlock" % (indent,), file=fd)
print >>fd, "%sConditionBlock" % (indent,)
indent2 = indent + ' '
for c, statements in self._groups:
print("%s Condition %s" % (indent, c), file=fd)
print >>fd, "%s Condition %s" % (indent, c)
statements.dump(fd, indent2)
print("%s ~Condition" % (indent,), file=fd)
print("%s~ConditionBlock" % (indent,), file=fd)
print >>fd, "%s ~Condition" % (indent,)
print >>fd, "%s~ConditionBlock" % (indent,)
def to_source(self):
lines = []
@@ -681,7 +681,7 @@ class ConditionBlock(Statement):
if len(self) != len(other):
return False
for i in range(0, len(self)):
for i in xrange(0, len(self)):
our_condition, our_statements = self[i]
other_condition, other_statements = other[i]
@@ -793,7 +793,7 @@ class Include(Statement):
makefile.include(f, self.required, loc=self.exp.loc, weak=self.weak)
def dump(self, fd, indent):
print("%sInclude %s" % (indent, self.exp), file=fd)
print >>fd, "%sInclude %s" % (indent, self.exp)
def to_source(self):
prefix = ''
@@ -840,7 +840,7 @@ class VPathDirective(Statement):
makefile.addvpath(pattern, dirs)
def dump(self, fd, indent):
print("%sVPath %s" % (indent, self.exp), file=fd)
print >>fd, "%sVPath %s" % (indent, self.exp)
def to_source(self):
return 'vpath %s' % self.exp.to_source()
@@ -885,7 +885,7 @@ class ExportDirective(Statement):
makefile.exportedvars[v] = True
def dump(self, fd, indent):
print("%sExport (single=%s) %s" % (indent, self.single, self.exp), file=fd)
print >>fd, "%sExport (single=%s) %s" % (indent, self.single, self.exp)
def to_source(self):
return ('export %s' % self.exp.to_source()).rstrip()
@@ -915,7 +915,7 @@ class UnexportDirective(Statement):
makefile.exportedvars[v] = False
def dump(self, fd, indent):
print("%sUnexport %s" % (indent, self.exp), file=fd)
print >>fd, "%sUnexport %s" % (indent, self.exp)
def to_source(self):
return 'unexport %s' % self.exp.to_source()
@@ -947,7 +947,7 @@ class EmptyDirective(Statement):
raise data.DataError("Line expands to non-empty value", self.exp.loc)
def dump(self, fd, indent):
print("%sEmptyDirective: %s" % (indent, self.exp), file=fd)
print >>fd, "%sEmptyDirective: %s" % (indent, self.exp)
def to_source(self):
return self.exp.to_source()
+25 -25
View File
@@ -10,9 +10,9 @@ import site
from collections import deque
# XXXkhuey Work around http://bugs.python.org/issue1731717
subprocess._cleanup = lambda: None
from . import command, util
import command, util
if sys.platform=='win32':
from . import win32process
import win32process
_log = logging.getLogger('pymake.process')
@@ -28,7 +28,7 @@ def tokens2re(tokens):
# which matches the pattern and captures it in a named match group.
# The group names and patterns come are given as a dict in the function
# argument.
nonescaped = r'(?<!\\)(?:%s)' % '|'.join('(?P<%s>%s)' % (name, value) for name, value in tokens.items())
nonescaped = r'(?<!\\)(?:%s)' % '|'.join('(?P<%s>%s)' % (name, value) for name, value in tokens.iteritems())
# The final pattern matches either the above pattern, or an escaped
# backslash, captured in the "escape" match group.
return re.compile('(?:%s|%s)' % (nonescaped, r'(?P<escape>\\\\)'))
@@ -115,7 +115,7 @@ class ClineSplitter(list):
self._push(self.cline[:m.start()])
self.cline = self.cline[m.end():]
match = dict([(name, value) for name, value in list(m.groupdict().items()) if value])
match = dict([(name, value) for name, value in m.groupdict().items() if value])
if 'quote' in match:
# " or ' start a quoted string
if match['quote'] == '"':
@@ -129,7 +129,7 @@ class ClineSplitter(list):
elif 'special' in match:
# Unquoted, non-escaped special characters need to be sent to a
# shell.
raise MetaCharacterException(match['special'])
raise MetaCharacterException, match['special']
elif 'whitespace' in match:
# Whitespaces terminate current argument.
self._next()
@@ -145,7 +145,7 @@ class ClineSplitter(list):
self.glob = True
self._push(m.group(0))
else:
raise Exception("Shouldn't reach here")
raise Exception, "Shouldn't reach here"
if self.arg:
self._next()
@@ -153,20 +153,20 @@ class ClineSplitter(list):
# Single quoted strings are preserved, except for the final quote
index = self.cline.find("'")
if index == -1:
raise Exception('Unterminated quoted string in command')
raise Exception, 'Unterminated quoted string in command'
self._push(self.cline[:index])
self.cline = self.cline[index+1:]
def _parse_doubly_quoted(self):
if not self.cline:
raise Exception('Unterminated quoted string in command')
raise Exception, 'Unterminated quoted string in command'
while self.cline:
m = _doubly_quoted_tokens.search(self.cline)
if not m:
raise Exception('Unterminated quoted string in command')
raise Exception, 'Unterminated quoted string in command'
self._push(self.cline[:m.start()])
self.cline = self.cline[m.end():]
match = dict([(name, value) for name, value in list(m.groupdict().items()) if value])
match = dict([(name, value) for name, value in m.groupdict().items() if value])
if 'quote' in match:
# a double quote ends the quoted string, so go back to
# unquoted parsing
@@ -175,7 +175,7 @@ class ClineSplitter(list):
# Unquoted, non-escaped special characters in a doubly quoted
# string still have a special meaning and need to be sent to a
# shell.
raise MetaCharacterException(match['special'])
raise MetaCharacterException, match['special']
elif 'escape' in match:
# Escaped backslashes turn into a single backslash
self._push('\\')
@@ -194,7 +194,7 @@ def clinetoargv(cline, cwd):
str = _escapednewlines.sub('', cline)
try:
args = ClineSplitter(str, cwd)
except MetaCharacterException as e:
except MetaCharacterException, e:
return None, e.char
if len(args) and args[0].find('=') != -1:
@@ -327,12 +327,12 @@ class PopenJob(Job):
# general overview of "subprocess PATH semantics and portability".
oldpath = os.environ['PATH']
try:
if self.env is not None and 'PATH' in self.env:
if self.env is not None and self.env.has_key('PATH'):
os.environ['PATH'] = self.env['PATH']
p = subprocess.Popen(self.argv, executable=self.executable, shell=self.shell, env=self.env, cwd=self.cwd)
return p.wait()
except OSError as e:
print(e, file=sys.stderr)
except OSError, e:
print >>sys.stderr, e
return -127
finally:
os.environ['PATH'] = oldpath
@@ -383,30 +383,30 @@ class PythonJob(Job):
try:
__import__(self.module)
except Exception as e:
print('Error importing %s: %s' % (
self.module, e), file=sys.stderr)
print >>sys.stderr, 'Error importing %s: %s' % (
self.module, e)
return -127
m = sys.modules[self.module]
if self.method not in m.__dict__:
print("No method named '%s' in module %s" % (self.method, self.module), file=sys.stderr)
print >>sys.stderr, "No method named '%s' in module %s" % (self.method, self.module)
return -127
rv = m.__dict__[self.method](self.argv)
if rv != 0 and rv is not None:
print((
print >>sys.stderr, (
"Native command '%s %s' returned value '%s'" %
(self.module, self.method, rv)), file=sys.stderr)
(self.module, self.method, rv))
return (rv if isinstance(rv, int) else 1)
except PythonException as e:
print(e, file=sys.stderr)
except PythonException, e:
print >>sys.stderr, e
return e.exitcode
except:
e = sys.exc_info()[1]
if isinstance(e, SystemExit) and (e.code == 0 or e.code is None):
pass # sys.exit(0) is not a failure
else:
print(e, file=sys.stderr)
print >>sys.stderr, e
traceback.print_exc()
return -127
finally:
@@ -461,7 +461,7 @@ class ParallelContext(object):
def _docall_generic(self, pool, job, cb, echo, justprint):
if echo is not None:
print(echo)
print echo
processcb = job.get_callback(ParallelContext._condition)
if justprint:
processcb(0)
@@ -491,7 +491,7 @@ class ParallelContext(object):
def _checkdone():
jobs = []
for c in ParallelContext._allcontexts:
for i in range(0, len(c.running)):
for i in xrange(0, len(c.running)):
if c.running[i][0].done:
jobs.append(c.running[i])
for j in jobs:
+2 -2
View File
@@ -82,7 +82,7 @@ else:
return str[:offset], token, str[offset + len(token):]
try:
from builtins import any
from __builtin__ import any
except ImportError:
def any(it):
for i in it:
@@ -138,7 +138,7 @@ class MostUsedCache(object):
return item.o
def verify(self):
for k, v in self.d.items():
for k, v in self.d.iteritems():
if v.o:
assert v in self.active
else:
+3 -3
View File
@@ -1,10 +1,10 @@
import pymake.data, pymake.functions, pymake.util
import unittest
import re
from io import StringIO
from cStringIO import StringIO
def multitest(cls):
for name in cls.testdata.keys():
for name in cls.testdata.iterkeys():
def m(self, name=name):
return self.runSingle(*self.testdata[name])
@@ -63,7 +63,7 @@ class LRUTest(unittest.TestCase):
c = pymake.util.LRUCache(3, self.spaceFunc, lambda k, v: k % 2)
self.assertEqual(tuple(c.debugitems()), ())
for i in range(0, len(self.expected)):
for i in xrange(0, len(self.expected)):
k, e, fc, di = self.expected[i]
v = c.get(k)
+1 -1
View File
@@ -277,7 +277,7 @@ class MakefileCorupusTest(TestBase):
self.assertEqual(len(statements), len(new_statements))
for i in range(0, len(statements)):
for i in xrange(0, len(statements)):
original = statements[i]
formatted = new_statements[i]
+6 -6
View File
@@ -2,10 +2,10 @@ import pymake.data, pymake.parser, pymake.parserdata, pymake.functions
import unittest
import logging
from io import StringIO
from cStringIO import StringIO
def multitest(cls):
for name in cls.testdata.keys():
for name in cls.testdata.iterkeys():
def m(self, name=name):
return self.runSingle(*self.testdata[name])
@@ -134,7 +134,7 @@ class IterTest(TestBase):
self.assertEqual(actual, expected)
if ifunc == pymake.parser.itermakefilechars:
print("testing %r" % expected)
print "testing %r" % expected
self.assertEqual(pymake.parser.flattenmakesyntax(d, 0), expected)
multitest(IterTest)
@@ -207,7 +207,7 @@ class MakeSyntaxTest(TestBase):
def compareRecursive(self, actual, expected, path):
self.assertEqual(len(actual), len(expected),
"compareRecursive: %s %r" % (path, actual))
for i in range(0, len(actual)):
for i in xrange(0, len(actual)):
ipath = path + [i]
a, isfunc = actual[i]
@@ -217,7 +217,7 @@ class MakeSyntaxTest(TestBase):
else:
self.assertEqual(type(a), getattr(pymake.functions, e['type']),
"compareRecursive: %s" % (ipath,))
for k, v in e.items():
for k, v in e.iteritems():
if k == 'type':
pass
elif k[0] == '[':
@@ -264,7 +264,7 @@ class VariableTest(TestBase):
m = pymake.data.Makefile()
stmts.execute(m)
for k, v in self.expected.items():
for k, v in self.expected.iteritems():
flavor, source, val = m.variables.get(k)
if val is None:
self.assertEqual(val, v, 'variable named %s' % k)
+13 -13
View File
@@ -63,7 +63,7 @@ def runTest(makefile, make, logfile, options):
"""
if os.path.exists(opts.tempdir): shutil.rmtree(opts.tempdir)
os.mkdir(opts.tempdir, 0o755)
os.mkdir(opts.tempdir, 0755)
logfd = open(logfile, 'w')
p = Popen(make + options['commandline'], stdout=logfd, stderr=STDOUT, env=options['env'])
@@ -78,15 +78,15 @@ def runTest(makefile, make, logfile, options):
logfd.close()
if stdout.find('TEST-FAIL') != -1:
print(stdout)
print stdout
return False, "FAIL (TEST-FAIL printed)"
if options['grepfor'] and stdout.find(options['grepfor']) == -1:
print(stdout)
print stdout
return False, "FAIL (%s not in output)" % options['grepfor']
if options['returncode'] == 0 and stdout.find('TEST-PASS') == -1:
print(stdout)
print stdout
return False, 'FAIL (No TEST-PASS printed)'
if options['returncode'] != 0:
@@ -94,7 +94,7 @@ def runTest(makefile, make, logfile, options):
return True, 'PASS'
print("%-30s%-28s%-28s" % ("Test:", "gmake:", "pymake:"))
print "%-30s%-28s%-28s" % ("Test:", "gmake:", "pymake:")
gmakefails = 0
pymakefails = 0
@@ -144,7 +144,7 @@ for makefile in makefiles:
if sys.platform in data:
d['returncode'] = data[sys.platform]
elif key == 'environment':
for k, v in data.items():
for k, v in data.iteritems():
d['env'][k] = v
elif key == 'grep-for':
d['grepfor'] = data
@@ -153,7 +153,7 @@ for makefile in makefiles:
elif key == 'skip':
d['skip'] = True
else:
print("%s: Unexpected #T key: %s" % (makefile, key), file=sys.stderr)
print >>sys.stderr, "%s: Unexpected #T key: %s" % (makefile, key)
sys.exit(1)
mdata.close()
@@ -190,12 +190,12 @@ for makefile in makefiles:
else:
pymakemsg = "OK (known fail)"
print("%-30.30s%-28.28s%-28.28s" % (os.path.basename(makefile),
gmakemsg, pymakemsg))
print "%-30.30s%-28.28s%-28.28s" % (os.path.basename(makefile),
gmakemsg, pymakemsg)
print()
print("Summary:")
print("%-30s%-28s%-28s" % ("", "gmake:", "pymake:"))
print
print "Summary:"
print "%-30s%-28s%-28s" % ("", "gmake:", "pymake:")
if gmakefails == 0:
gmakemsg = 'PASS'
@@ -207,7 +207,7 @@ if pymakefails == 0:
else:
pymakemsg = 'FAIL (%i failures)' % pymakefails
print("%-30.30s%-28.28s%-28.28s" % ('', gmakemsg, pymakemsg))
print "%-30.30s%-28.28s%-28.28s" % ('', gmakemsg, pymakemsg)
shutil.rmtree(opts.tempdir)
+5 -5
View File
@@ -4,7 +4,7 @@ from os import path
import re
import shutil
import sys
from urllib.request import urlopen
from urllib2 import urlopen
from release.paths import makeCandidatesDir
@@ -50,7 +50,7 @@ def findOldBuildIDs(product, version, buildNumber, platforms,
id = getBuildID(platform, product, version, n, nightlyDir,
server)
ids[platform].append(id)
except Exception as e:
except Exception, e:
log.error("Hit exception: %s" % e)
return ids
@@ -87,10 +87,10 @@ def readBranchConfig(dir, localconfig, branch, required=[]):
def readConfig(configfile, keys=[], required=[]):
c = {}
exec(compile(open(configfile, "rb").read(), configfile, 'exec'), c)
execfile(configfile, c)
for k in keys:
c = c[k]
items = list(c.keys())
items = c.keys()
err = False
for key in required:
if key not in items:
@@ -137,7 +137,7 @@ def getReleaseName(product, version, buildNumber):
def getRepoMatchingBranch(branch, sourceRepositories):
for sr in list(sourceRepositories.values()):
for sr in sourceRepositories.values():
if branch in sr['path']:
return sr
return None
+1 -1
View File
@@ -1,7 +1,7 @@
import difflib
import logging
import re
import urllib.request, urllib.error, urllib.parse
import urllib2
from util.commands import run_cmd, get_output
from util.hg import get_repo_name, make_hg_url
from subprocess import CalledProcessError
+24 -29
View File
@@ -13,11 +13,9 @@ import re
import subprocess
import sys
import pickle
from locale import getpreferredencoding
import mozpack.path as mozpath
encoding = getpreferredencoding(False)
class Pool(object):
def __new__(cls, size):
@@ -29,7 +27,7 @@ class Pool(object):
return super(Pool, cls).__new__(cls)
def imap_unordered(self, fn, iterable):
return map(fn, iterable)
return itertools.imap(fn, iterable)
def close(self):
pass
@@ -62,7 +60,7 @@ class File(object):
modified = True
if os.path.exists(self._path):
if open(self._path, 'r', encoding=encoding, errors='replace').read() == self._content:
if open(self._path, 'rb').read() == self._content:
modified = False
self._modified = modified
return modified
@@ -133,11 +131,11 @@ def maybe_clear_cache(data):
is_set = cache.get('ac_cv_env_%s_set' % precious) == 'set'
value = cache.get('ac_cv_env_%s_value' % precious) if is_set else None
if value != env.get(precious):
print('Removing %s because of %s value change from:' \
% (data['cache-file'], precious))
print(' %s' % (value if value is not None else 'undefined'))
print('to:')
print(' %s' % env.get(precious, 'undefined'))
print 'Removing %s because of %s value change from:' \
% (data['cache-file'], precious)
print ' %s' % (value if value is not None else 'undefined')
print 'to:'
print ' %s' % env.get(precious, 'undefined')
os.remove(data['cache-file'])
return True
return False
@@ -162,11 +160,9 @@ def get_config_files(data):
# Scan the config.status output for information about configuration files
# it generates.
raw_output = subprocess.check_output(
config_status_output = subprocess.check_output(
[data['shell'], '-c', '%s --help' % config_status],
stderr=subprocess.STDOUT)
config_status_output = raw_output.decode(encoding,
errors='replace').splitlines()
stderr=subprocess.STDOUT).splitlines()
state = None
for line in config_status_output:
if line.startswith('Configuration') and line.endswith(':'):
@@ -187,6 +183,7 @@ def get_config_files(data):
return config_files, command_files
def prepare(srcdir, objdir, shell, args):
parser = argparse.ArgumentParser()
parser.add_argument('--target', type=str)
@@ -235,7 +232,7 @@ def prepare(srcdir, objdir, shell, args):
'args': others,
'shell': shell,
'srcdir': srcdir,
'env': {str(k): str(v) for k, v in environ.items()},
'env': environ,
}
if args.cache_file:
@@ -252,9 +249,9 @@ def prepare(srcdir, objdir, shell, args):
except OSError as e:
if e.errno != errno.EEXIST:
raise
for k, v in data.items():
with open(data_file, 'wb') as f:
pickle.dump(data, f)
with open(data_file, 'wb') as f:
pickle.dump(data, f)
def prefix_lines(text, prefix):
@@ -264,6 +261,7 @@ def prefix_lines(text, prefix):
def run(objdir):
ret = 0
output = ''
with open(os.path.join(objdir, CONFIGURE_DATA), 'rb') as f:
data = pickle.load(f)
@@ -335,16 +333,14 @@ def run(objdir):
# We're going to run it ourselves.
command += ['--no-create']
print(prefix_lines('configuring', relobjdir))
print(prefix_lines('running %s' % ' '.join(command[:-1]), relobjdir))
print prefix_lines('configuring', relobjdir)
print prefix_lines('running %s' % ' '.join(command[:-1]), relobjdir)
sys.stdout.flush()
try:
raw_output = subprocess.check_output(command,
output += subprocess.check_output(command,
stderr=subprocess.STDOUT, cwd=objdir, env=data['env'])
output += raw_output.decode(encoding, errors='replace')
except subprocess.CalledProcessError as e:
err = e.output.decode(encoding, errors='replace')
return relobjdir, e.returncode, err
return relobjdir, e.returncode, e.output
# Leave config.status with a new timestamp if configure is newer than
# its original mtime.
@@ -372,13 +368,12 @@ def run(objdir):
if not skip_config_status:
if skip_configure:
print(prefix_lines('running config.status', relobjdir))
print prefix_lines('running config.status', relobjdir)
sys.stdout.flush()
try:
raw_output = subprocess.check_output([data['shell'], '-c',
output += subprocess.check_output([data['shell'], '-c',
'./config.status'], stderr=subprocess.STDOUT, cwd=objdir,
env=data['env'])
output += raw_output.decode(encoding, errors='replace')
except subprocess.CalledProcessError as e:
ret = e.returncode
output += e.output
@@ -400,9 +395,9 @@ def subconfigure(args):
args, others = parser.parse_known_args(args)
subconfigures = args.subconfigures
if args.list:
subconfigures.extend(open(args.list, 'r', encoding=encoding, errors='replace').read().splitlines())
subconfigures.extend(open(args.list, 'rb').read().splitlines())
if args.skip:
skips = set(open(args.skip, 'r', encoding=encoding, errors='replace').read().splitlines())
skips = set(open(args.skip, 'rb').read().splitlines())
subconfigures = [s for s in subconfigures if s not in skips]
if not subconfigures:
@@ -415,7 +410,7 @@ def subconfigure(args):
pool = Pool(len(subconfigures))
for relobjdir, returncode, output in \
pool.imap_unordered(run, subconfigures):
print(prefix_lines(output, relobjdir))
print prefix_lines(output, relobjdir)
sys.stdout.flush()
ret = max(returncode, ret)
if ret:
+7 -1
View File
@@ -290,6 +290,11 @@ fi
if [ -n "$LD_LIBRARY_PATH_64" ]; then
LD_LIBRARY_PATH_64=${MOZ_DIST_BIN}:${MOZ_DIST_BIN}/plugins:${MRE_HOME}${LD_LIBRARY_PATH_64:+":$LD_LIBRARY_PATH_64"}
fi
#
#
## Set SHLIB_PATH for HPUX
SHLIB_PATH=${MOZ_DIST_BIN}:${MRE_HOME}${SHLIB_PATH:+":$SHLIB_PATH"}
#
## Set LIBPATH for AIX
LIBPATH=${MOZ_DIST_BIN}:${MRE_HOME}${LIBPATH:+":$LIBPATH"}
#
@@ -334,6 +339,7 @@ then
fi
echo "DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH"
echo " LIBRARY_PATH=$LIBRARY_PATH"
echo " SHLIB_PATH=$SHLIB_PATH"
echo " LIBPATH=$LIBPATH"
echo " ADDON_PATH=$ADDON_PATH"
echo " MOZ_PROGRAM=$MOZ_PROGRAM"
@@ -344,7 +350,7 @@ then
fi
#
export MOZILLA_FIVE_HOME LD_LIBRARY_PATH
export LIBPATH LIBRARY_PATH ADDON_PATH DYLD_LIBRARY_PATH
export SHLIB_PATH LIBPATH LIBRARY_PATH ADDON_PATH DYLD_LIBRARY_PATH
if [ $moz_debug -eq 1 ]
then
+17 -17
View File
@@ -104,10 +104,10 @@ def DoSSHCommand(command, user, host, port=None, ssh_key=None):
try:
output = f(cmdline, stderr=STDOUT).strip()
except CalledProcessError as e:
print("failed ssh command output:")
print('=' * 20)
print(e.output)
print('=' * 20)
print "failed ssh command output:"
print '=' * 20
print e.output
print '=' * 20
raise
return output
@@ -118,7 +118,7 @@ def DoSCPFile(file, remote_path, user, host, port=None, ssh_key=None,
"""Upload file to user@host:remote_path using scp. Optionally use
port and ssh_key, if provided."""
if log:
print('Uploading %s' % file)
print 'Uploading %s' % file
cmdline = ["scp"]
AppendOptionalArgsToSSHCommandline(cmdline, port, ssh_key)
cmdline.extend([WindowsPathToMsysPath(file),
@@ -221,8 +221,8 @@ def UploadFiles(user, host, path, files, verbose=False, port=None, ssh_key=None,
if not host or not user:
return {}
if (not path and not upload_to_temp_dir) or (path and upload_to_temp_dir):
print("One (and only one of UPLOAD_PATH or UPLOAD_TO_TEMP must be " + \
"defined.")
print "One (and only one of UPLOAD_PATH or UPLOAD_TO_TEMP must be " + \
"defined."
sys.exit(1)
if upload_to_temp_dir:
@@ -269,18 +269,18 @@ def UploadFiles(user, host, path, files, verbose=False, port=None, ssh_key=None,
if post_upload_command is not None:
if verbose:
print("Running post-upload command: " + post_upload_command)
print "Running post-upload command: " + post_upload_command
file_list = '"' + '" "'.join(remote_files) + '"'
output = DoSSHCommand('%s "%s" %s' % (post_upload_command, path, file_list), user, host, port=port, ssh_key=ssh_key)
# We print since mozharness may parse URLs from the output stream.
print(output)
print output
properties = GetUrlProperties(output, package)
finally:
if upload_to_temp_dir:
DoSSHCommand("rm -rf %s" % path, user, host, port=port,
ssh_key=ssh_key)
if verbose:
print("Upload complete")
print "Upload complete"
return properties
def CopyFilesLocally(path, files, verbose=False, base_path=None, package=None):
@@ -299,7 +299,7 @@ def CopyFilesLocally(path, files, verbose=False, base_path=None, package=None):
if not os.path.exists(target_path):
os.makedirs(target_path)
if verbose:
print("Copying " + file + " to " + target_path)
print "Copying " + file + " to " + target_path
shutil.copy(file, target_path)
def WriteProperties(files, properties_file, url_properties, package):
@@ -341,20 +341,20 @@ if __name__ == '__main__':
help="Name of the main package.")
(options, args) = parser.parse_args()
if len(args) < 1:
print("You must specify at least one file to upload")
print "You must specify at least one file to upload"
sys.exit(1)
if not options.properties_file:
print("You must specify a --properties-file")
print "You must specify a --properties-file"
sys.exit(1)
if host == "localhost":
if upload_to_temp_dir:
print("Cannot use UPLOAD_TO_TEMP with UPLOAD_HOST=localhost")
print "Cannot use UPLOAD_TO_TEMP with UPLOAD_HOST=localhost"
sys.exit(1)
if post_upload_command:
# POST_UPLOAD_COMMAND is difficult to extract from the mozharness
# scripts, so just ignore it until it's no longer used anywhere
print("Ignoring POST_UPLOAD_COMMAND with UPLOAD_HOST=localhost")
print "Ignoring POST_UPLOAD_COMMAND with UPLOAD_HOST=localhost"
try:
if host == "localhost":
@@ -370,6 +370,6 @@ if __name__ == '__main__':
package=options.package, verbose=True)
WriteProperties(args, options.properties_file, url_properties, options.package)
except IOError as strerror:
print(strerror)
except IOError, (strerror):
print strerror
sys.exit(1)
+3 -3
View File
@@ -36,7 +36,7 @@ def count_ctors(filename):
# Even if we have .ctors, we shouldn't have any constructors in .ctors.
# Complain if .ctors does not look how we expect it to.
if have_ctors and n_ctors_ctors != 0:
print("Unexpected .ctors contents for", filename, file=sys.stderr)
print >>sys.stderr, "Unexpected .ctors contents for", filename
sys.exit(1)
return n_init_array_ctors
if have_ctors:
@@ -44,7 +44,7 @@ def count_ctors(filename):
# We didn't find anything; somebody switched initialization mechanisms on
# us, or the binary is completely busted. Complain either way.
print("Couldn't find .init_array or .ctors in", filename, file=sys.stderr)
print >>sys.stderr, "Couldn't find .init_array or .ctors in", filename
sys.exit(1)
if __name__ == '__main__':
@@ -60,5 +60,5 @@ if __name__ == '__main__':
}]}
]
}
print("PERFHERDER_DATA: %s" % json.dumps(perfherder_data))
print "PERFHERDER_DATA: %s" % json.dumps(perfherder_data)
+7 -7
View File
@@ -2,8 +2,8 @@
import os
import re
import subprocess
from urllib.parse import urlsplit
from configparser import RawConfigParser
from urlparse import urlsplit
from ConfigParser import RawConfigParser
from util.commands import run_cmd, get_output, remove_path
from util.retry import retry
@@ -105,7 +105,7 @@ def purge(dest):
try:
run_cmd(['hg', '--config', 'extensions.purge=', 'purge',
'-a', '--all', dest], cwd=dest)
except subprocess.CalledProcessError as e:
except subprocess.CalledProcessError, e:
log.debug('purge failed: %s' % e)
raise
@@ -306,7 +306,7 @@ def out(src, remote, **kwargs):
branch = "default"
revs.append((rev, branch))
return revs
except subprocess.CalledProcessError as inst:
except subprocess.CalledProcessError, inst:
# In some situations, some versions of Mercurial return "1"
# if no changes are found, so we need to ignore this return code
if inst.returncode == 1:
@@ -500,7 +500,7 @@ def apply_and_push(localrepo, remote, changer, max_attempts=10,
push(src=localrepo, remote=remote, ssh_username=ssh_username,
ssh_key=ssh_key, force=force)
return
except subprocess.CalledProcessError as e:
except subprocess.CalledProcessError, e:
log.debug("Hit error when trying to push: %s" % str(e))
if n == max_attempts:
log.debug("Tried %d times, giving up" % max_attempts)
@@ -515,7 +515,7 @@ def apply_and_push(localrepo, remote, changer, max_attempts=10,
try:
run_cmd(['hg', '--config', 'ui.merge=internal:merge',
'rebase'], cwd=localrepo)
except subprocess.CalledProcessError as e:
except subprocess.CalledProcessError, e:
log.debug("Failed to rebase: %s" % str(e))
update(localrepo, branch=branch)
for r in reversed(new_revs):
@@ -578,7 +578,7 @@ def adjust_paths(dest, **paths):
config.add_section('paths')
changed = False
for path_name, path_value in list(paths.items()):
for path_name, path_value in paths.items():
if (not config.has_option('paths', path_name) or
config.get('paths', path_name) != path_value):
changed = True
+1 -1
View File
@@ -11,6 +11,7 @@ mozbuild.pth:python/mozbuild
mozversioncontrol.pth:python/mozversioncontrol
mozlint.pth:python/mozlint
pymake.pth:build/pymake
optional:setup.py:python/psutil:build_ext:--inplace
optional:psutil.pth:python/psutil
which.pth:python/which
ply.pth:other-licenses/ply/
@@ -28,7 +29,6 @@ moztreedocs.pth:tools/docs
packages.txt:testing/mozbase/packages.txt
objdir:build
gyp.pth:media/webrtc/trunk/tools/gyp/pylib
six.pth:python/requests/requests/packages/urllib3/packages
pyasn1.pth:python/pyasn1
pyasn1_modules.pth:python/pyasn1-modules
bitstring.pth:python/bitstring
+11 -13
View File
@@ -23,8 +23,8 @@ BINSCOPE_OUTPUT_LOGFILE = r".\binscope_xml_output.log"
# usage
if len(sys.argv) < 3:
print("""usage : autobinscope.by path_to_binary path_to_symbols [log_file_path]"
log_file_path is optional, log will be written to .\binscope_xml_output.log by default""")
print """usage : autobinscope.by path_to_binary path_to_symbols [log_file_path]"
log_file_path is optional, log will be written to .\binscope_xml_output.log by default"""
sys.exit(0)
binary_path = sys.argv[1]
@@ -40,7 +40,7 @@ else:
try:
binscope_path = os.environ['BINSCOPE']
except KeyError:
print("BINSCOPE environment variable is not set, can't check DEP/ASLR etc. status.")
print "BINSCOPE environment variable is not set, can't check DEP/ASLR etc. status."
sys.exit(0)
try:
@@ -51,15 +51,13 @@ try:
"/c", "CompilerVersionCheck", "/c", "SafeSEHCheck", "/c", "SNCheck",
"/c", "DBCheck"], stdout=subprocess.PIPE)
except OSError as e:
errno = e.errno
strerror = e.strerror or str(e)
except WindowsError, (errno, strerror):
if errno != 2 and errno != 3:
print("Unexpected error ! \nError " + str(errno) + " : " + strerror + "\nExiting !\n")
print "Unexpected error ! \nError " + str(errno) + " : " + strerror + "\nExiting !\n"
sys.exit(0)
else:
print("Could not locate binscope at location : %s\n" % binscope_path)
print("Binscope wasn't installed or the BINSCOPE env variable wasn't set correctly, skipping this check and exiting...")
print "Could not locate binscope at location : %s\n" % binscope_path
print "Binscope wasn't installed or the BINSCOPE env variable wasn't set correctly, skipping this check and exiting..."
sys.exit(0)
proc.wait()
@@ -68,10 +66,10 @@ output = proc.communicate()[0]
# is this a PASS or a FAIL ?
if proc.returncode != 0:
print("Error count: %d" % proc.returncode)
print("TEST-UNEXPECTED-FAIL | autobinscope.py | %s is missing a needed Windows protection, such as /GS or ASLR" % binary_path)
print "Error count: %d" % proc.returncode
print "TEST-UNEXPECTED-FAIL | autobinscope.py | %s is missing a needed Windows protection, such as /GS or ASLR" % binary_path
logfile = open(log_file_path, "r")
for line in logfile:
print((line), end=' ')
print(line),
else:
print("TEST-PASS | autobinscope.py | %s succeeded" % binary_path)
print "TEST-PASS | autobinscope.py | %s succeeded" % binary_path
+1 -1
View File
@@ -39,6 +39,6 @@ def MergePGOFiles(basename, pgddir, pgcdir):
if __name__ == '__main__':
if len(sys.argv) != 3:
print("Usage: pgomerge.py <binary basename> <dist/bin>", file=sys.stderr)
print >>sys.stderr, "Usage: pgomerge.py <binary basename> <dist/bin>"
sys.exit(1)
MergePGOFiles(sys.argv[1], os.getcwd(), sys.argv[2])
+3 -3
View File
@@ -40,9 +40,9 @@ if __name__ == '__main__':
0, # no inherit
int(pid))
if handle:
print("Process %s:" % pid)
print "Process %s:" % pid
vsize, peak_vsize = get_vmsize(handle)
print("peak vsize: %d" % peak_vsize)
print "peak vsize: %d" % peak_vsize
ctypes.windll.kernel32.CloseHandle(handle)
else:
print("Couldn't open process %s" % pid)
print "Couldn't open process %s" % pid
+6 -6
View File
@@ -200,7 +200,7 @@ def format_manifest(manifest):
def write_zip(zip_path, prefix=None):
"""Write toolchain data to a zip file."""
if isinstance(prefix, str):
if isinstance(prefix, unicode):
prefix = prefix.encode('utf-8')
with JarWriter(file=zip_path, optimize=False, compress=5) as zip:
@@ -226,7 +226,7 @@ def write_zip(zip_path, prefix=None):
if __name__ == '__main__':
if len(sys.argv) != 3:
print(('usage: %s create-zip <path-prefix>' % sys.argv[0]))
print('usage: %s create-zip <path-prefix>' % sys.argv[0])
sys.exit(1)
assert sys.argv[1] == 'create-zip'
@@ -244,7 +244,7 @@ if __name__ == '__main__':
sha256.update(data)
sha512.update(data)
print(('Hashes of %s (size=%d)' % (destzip, len(data))))
print(('SHA-1: %s' % sha1.hexdigest()))
print(('SHA-256: %s' % sha256.hexdigest()))
print(('SHA-512: %s' % sha512.hexdigest()))
print('Hashes of %s (size=%d)' % (destzip, len(data)))
print('SHA-1: %s' % sha1.hexdigest())
print('SHA-256: %s' % sha256.hexdigest())
print('SHA-512: %s' % sha512.hexdigest())
+1 -2
View File
@@ -343,8 +343,7 @@ OriginAttributes::IsFirstPartyEnabled()
return sFirstPartyIsolation;
}
BasePrincipal::BasePrincipal(PrincipalKind aKind)
: mKind(aKind)
BasePrincipal::BasePrincipal()
{}
BasePrincipal::~BasePrincipal()
+9 -19
View File
@@ -251,14 +251,7 @@ public:
class BasePrincipal : public nsJSPrincipals
{
public:
enum PrincipalKind {
eNullPrincipal,
eCodebasePrincipal,
eExpandedPrincipal,
eSystemPrincipal
};
explicit BasePrincipal(PrincipalKind aKind);
BasePrincipal();
enum DocumentDomainConsideration { DontConsiderDocumentDomain, ConsiderDocumentDomain};
bool Subsumes(nsIPrincipal* aOther, DocumentDomainConsideration aConsideration);
@@ -308,19 +301,17 @@ public:
uint32_t PrivateBrowsingId() const { return mOriginAttributes.mPrivateBrowsingId; }
bool IsInIsolatedMozBrowserElement() const { return mOriginAttributes.mInIsolatedMozBrowser; }
PrincipalKind Kind() const { return mKind; }
enum PrincipalKind {
eNullPrincipal,
eCodebasePrincipal,
eExpandedPrincipal,
eSystemPrincipal
};
virtual PrincipalKind Kind() = 0;
already_AddRefed<BasePrincipal> CloneStrippingUserContextIdAndFirstPartyDomain();
/**
* Returns true if this principal's CSP should override a document's CSP for
* loads that it triggers. Currently true only for expanded principals which
* subsume the document principal.
*/
bool OverridesCSP(nsIPrincipal* aDocumentPrincipal) {
return mKind == eExpandedPrincipal && Subsumes(aDocumentPrincipal, DontConsiderDocumentDomain);
}
protected:
virtual ~BasePrincipal();
@@ -342,7 +333,6 @@ protected:
nsCOMPtr<nsIContentSecurityPolicy> mCSP;
nsCOMPtr<nsIContentSecurityPolicy> mPreloadCSP;
PrincipalOriginAttributes mOriginAttributes;
PrincipalKind mKind;
};
} // namespace mozilla
+3 -3
View File
@@ -36,9 +36,7 @@ public:
// This should only be used by deserialization, and the factory constructor.
// Other consumers should use the Create and CreateWithInheritedAttributes
// methods.
nsNullPrincipal()
: BasePrincipal(eNullPrincipal)
{}
nsNullPrincipal() {}
NS_DECL_NSISERIALIZABLE
@@ -62,6 +60,8 @@ public:
virtual nsresult GetScriptLocation(nsACString &aStr) override;
PrincipalKind Kind() override { return eNullPrincipal; }
protected:
virtual ~nsNullPrincipal() {}
+2 -16
View File
@@ -64,11 +64,10 @@ nsPrincipal::InitializeStatics()
}
nsPrincipal::nsPrincipal()
: BasePrincipal(eCodebasePrincipal)
, mCodebaseImmutable(false)
: mCodebaseImmutable(false)
, mDomainImmutable(false)
, mInitialized(false)
{}
{ }
nsPrincipal::~nsPrincipal()
{
@@ -464,18 +463,6 @@ nsPrincipal::Write(nsIObjectOutputStream* aStream)
rv = aStream->WriteStringZ(suffix.get());
NS_ENSURE_SUCCESS(rv, rv);
// This is an ugly hack to prevent re-entrancy calls into nsPrincipal::Write()
// because of repeat CSP processing.
// We refcount the context and if found 3+ refcounts on the same, skip writing
// the mCSP compound object.
// TODO: figure out exactly why this happens and fix the root cause.
nsCSPContext* CSPContext = static_cast<nsCSPContext*>(mCSP.get());
if(CSPContext) {
auto CSPDepth = CSPContext->AddRef();
CSPContext->Release();
if(CSPDepth > 2) return NS_OK;
}
rv = NS_WriteOptionalCompoundObject(aStream, mCSP,
NS_GET_IID(nsIContentSecurityPolicy),
true);
@@ -527,7 +514,6 @@ struct OriginComparator
nsExpandedPrincipal::nsExpandedPrincipal(nsTArray<nsCOMPtr<nsIPrincipal>> &aWhiteList,
const PrincipalOriginAttributes& aAttrs)
: BasePrincipal(eExpandedPrincipal)
{
// We force the principals to be sorted by origin so that nsExpandedPrincipal
// origins can have a canonical form.
+4
View File
@@ -46,6 +46,8 @@ public:
*/
static void InitializeStatics();
PrincipalKind Kind() override { return eCodebasePrincipal; }
nsCOMPtr<nsIURI> mDomain;
nsCOMPtr<nsIURI> mCodebase;
// If mCodebaseImmutable is true, mCodebase is non-null and immutable
@@ -80,6 +82,8 @@ public:
virtual nsresult GetScriptLocation(nsACString &aStr) override;
nsresult GetOriginInternal(nsACString& aOrigin) override;
PrincipalKind Kind() override { return eExpandedPrincipal; }
protected:
virtual ~nsExpandedPrincipal();
+3 -3
View File
@@ -36,9 +36,7 @@ public:
NS_IMETHOD GetBaseDomain(nsACString& aBaseDomain) override;
nsresult GetOriginInternal(nsACString& aOrigin) override;
nsSystemPrincipal()
: BasePrincipal(eSystemPrincipal)
{}
nsSystemPrincipal() {}
virtual nsresult GetScriptLocation(nsACString &aStr) override;
@@ -54,6 +52,8 @@ protected:
{
return true;
}
PrincipalKind Kind() override { return eSystemPrincipal; }
};
#endif // nsSystemPrincipal_h__
+1 -1
View File
@@ -66,7 +66,7 @@ endif
SH := /bin/sh
PERL ?= perl
PYTHON ?= $(shell which python3 > /dev/null 2>&1 && echo python3 || echo python)
PYTHON ?= $(shell which python2.7 > /dev/null 2>&1 && echo python2.7 || echo python)
CONFIG_GUESS_SCRIPT := $(wildcard $(TOPSRCDIR)/build/autoconf/config.guess)
ifdef CONFIG_GUESS_SCRIPT
+12 -12
View File
@@ -22,7 +22,7 @@ if topsrcdir == '':
topsrcdir = '.'
def check_call_noisy(cmd, *args, **kwargs):
print("Executing command:", cmd)
print "Executing command:", cmd
check_call(cmd, *args, **kwargs)
def do_hg_pull(dir, repository, hg):
@@ -67,22 +67,22 @@ def do_cvs_export(modules, tag, cvsroot, cvs):
cvs_module = module_tuple[1]
fullpath = os.path.join(topsrcdir, module)
if os.path.exists(fullpath):
print("Removing '%s'" % fullpath)
print "Removing '%s'" % fullpath
shutil.rmtree(fullpath)
(parent, leaf) = os.path.split(module)
print("CVS export begin: " + datetime.datetime.utcnow().strftime("%Y-%m-%d %H:%M:%S UTC"))
print "CVS export begin: " + datetime.datetime.utcnow().strftime("%Y-%m-%d %H:%M:%S UTC")
check_call_noisy([cvs, '-d', cvsroot,
'export', '-r', tag, '-d', leaf, cvs_module],
cwd=os.path.join(topsrcdir, parent))
print("CVS export end: " + datetime.datetime.utcnow().strftime("%Y-%m-%d %H:%M:%S UTC"))
print "CVS export end: " + datetime.datetime.utcnow().strftime("%Y-%m-%d %H:%M:%S UTC")
def toggle_trailing_blank_line(depname):
"""If the trailing line is empty, then we'll delete it.
Otherwise we'll add a blank line."""
lines = open(depname, "r").readlines()
if not lines:
print("unexpected short file", file=sys.stderr)
print >>sys.stderr, "unexpected short file"
return
if not lines[-1].strip():
@@ -95,7 +95,7 @@ def toggle_trailing_blank_line(depname):
def get_trailing_blank_line_state(depname):
lines = open(depname, "r").readlines()
if not lines:
print("unexpected short file", file=sys.stderr)
print >>sys.stderr, "unexpected short file"
return "no blank line"
if not lines[-1].strip():
@@ -104,18 +104,18 @@ def get_trailing_blank_line_state(depname):
return "no blank line"
def update_nspr_or_nss(tag, depfile, destination, hgpath):
print("reverting to HG version of %s to get its blank line state" % depfile)
print "reverting to HG version of %s to get its blank line state" % depfile
check_call_noisy([options.hg, 'revert', depfile])
old_state = get_trailing_blank_line_state(depfile)
print("old state of %s is: %s" % (depfile, old_state))
print "old state of %s is: %s" % (depfile, old_state)
do_hg_replace(destination, hgpath, tag, HG_EXCLUSIONS, options.hg)
new_state = get_trailing_blank_line_state(depfile)
print("new state of %s is: %s" % (depfile, new_state))
print "new state of %s is: %s" % (depfile, new_state)
if old_state == new_state:
print("toggling blank line in: ", depfile)
print "toggling blank line in: ", depfile
toggle_trailing_blank_line(depfile)
tag_file = destination + "/TAG-INFO"
print(tag, file=file(tag_file, "w"))
print >>file(tag_file, "w"), tag
o = OptionParser(usage="client.py [options] update_nspr tagname | update_nss tagname | update_libffi tagname")
o.add_option("--skip-mozilla", dest="skip_mozilla",
@@ -139,7 +139,7 @@ except IndexError:
sys.exit(2)
if action in ('checkout', 'co'):
print("Warning: client.py checkout is obsolete.", file=sys.stderr)
print >>sys.stderr, "Warning: client.py checkout is obsolete."
pass
elif action in ('update_nspr'):
tag, = args[1:]
+5 -5
View File
@@ -46,7 +46,7 @@ class ZipFile(zipfile.ZipFile):
date_time=time.localtime(time.time()))
zinfo.compress_type = self.compression
# Add some standard UNIX file access permissions (-rw-r--r--).
zinfo.external_attr = (0x81a4 & 0xFFFF) << 16
zinfo.external_attr = (0x81a4 & 0xFFFF) << 16L
else:
zinfo = zinfo_or_arcname
@@ -58,7 +58,7 @@ class ZipFile(zipfile.ZipFile):
# as the old, reuse the existing entry.
doSeek = False # store if we need to seek to the eof after overwriting
if zinfo.filename in self.NameToInfo:
if self.NameToInfo.has_key(zinfo.filename):
# Find the last ZipInfo with our name.
# Last, because that's catching multiple overwrites
i = len(self.filelist)
@@ -109,14 +109,14 @@ class ZipFile(zipfile.ZipFile):
# adjust file mode if we originally just wrote, now we rewrite
self.fp.close()
self.fp = open(self.filename, 'r+b')
all = [(zi, True) for zi in self.filelist] + \
[(zi, False) for zi in self._remove]
all = map(lambda zi: (zi, True), self.filelist) + \
map(lambda zi: (zi, False), self._remove)
all.sort(lambda l, r: cmp(l[0].header_offset, r[0].header_offset))
# empty _remove for multiple closes
self._remove = []
lengths = [all[i+1][0].header_offset - all[i][0].header_offset
for i in range(len(all)-1)]
for i in xrange(len(all)-1)]
lengths.append(self.end - all[-1][0].header_offset)
to_pos = 0
for (zi, keep), length in zip(all, lengths):
-354
View File
@@ -1,354 +0,0 @@
/* 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 https://mozilla.org/MPL/2.0/.
*
* C++ replacement for mozbuild/action/cl.py that wraps cl.exe on Windows.
* This is a Windows-only host tool, built well before XPCOM.
*/
#include <windows.h>
#include <string> // We don't use XPCOM string classes here.
#include <vector>
#include <fstream>
#include <algorithm>
#pragma warning(disable:4530)
using namespace std;
/* Make passed argv into a command line for cl.exe */
static wstring quoteArg(const wstring& aCmdArgv) {
bool addQuotes = aCmdArgv.find_first_of(L" \t\"") != wstring::npos;
if (!addQuotes) {
return aCmdArgv;
}
wstring out = L"\"";
size_t backslash = 0;
for (wchar_t ch : aCmdArgv) {
if (ch == L'\\') {
backslash++;
} else if (ch == L'"') {
// Escape all backslashes before a quote
out.append(backslash * 2, L'\\');
backslash = 0;
out += L"\\\"";
} else {
out.append(backslash, L'\\');
backslash = 0;
out += ch;
}
}
out.append(backslash * 2, L'\\');
out += L"\"";
return out;
}
/* We need to detect the showIncludes prefix to extract raw paths for
dep files, and drop the lines from display to avoid console spam. */
static string showIncludesPrefixDetection(const string& aLine) {
// Look for absolute Windows paths
size_t pos = string::npos;
// Drive letter: C:\...
for (size_t i = 0; i + 2 < aLine.size(); i++) {
if (isalpha((unsigned char)aLine[i]) &&
aLine[i + 1] == ':' &&
(aLine[i + 2] == '\\' || aLine[i + 2] == '/')) {
pos = i;
break;
}
}
// UNC path: \\server\share
if (pos == string::npos) {
if (aLine.size() >= 2 && aLine[0] == '\\' && aLine[1] == '\\') {
pos = 0;
}
}
if (pos == string::npos) {
return "";
}
// Prefix is everything before the path
return aLine.substr(0, pos);
}
/* Extract the header path from an include line using the known prefix */
static string extractHeaderPath(const string& aLine, const string& aPrefix) {
if (aLine.rfind(aPrefix, 0) != 0) {
return "";
}
// Strip prefix
string path = aLine.substr(aPrefix.size());
// Trim leading whitespace
while (!path.empty() && (path[0] == ' ' || path[0] == '\t')) {
path.erase(0, 1);
}
// Remove trailing newline
if (!path.empty() && (path.back() == '\n' || path.back() == '\r')) {
path.pop_back();
}
return path;
}
/* Sanitize a dependency path for Makefile depfiles.
Performs:
1. Strip trailing CR/LF
2. Strip leading MSVC indentation
3. Normalize slashes to '/'
4. Escape spaces and backslashes for Make */
static string sanitizeMakeDeps(string aLine) {
// 1. Strip trailing CR/LF
while (!aLine.empty() && (aLine.back() == '\r' || aLine.back() == '\n')) {
aLine.pop_back();
}
// 2. Strip leading indentation (MSVC indents include lines)
while (!aLine.empty() && (aLine.front() == ' ' || aLine.front() == '\t')) {
aLine.erase(aLine.begin());
}
// 3. Normalize slashes
for (char& ch : aLine) {
if (ch == '\\') {
ch = '/';
}
}
// 4. Escape for Make
string out;
out.reserve(aLine.size() * 2);
for (char ch : aLine) {
if (ch == ' ') {
out += "\\ ";
} else if (ch == '\\') {
// After normalization this shouldn't occur, but safe anyway
out += "\\\\";
} else {
out += ch;
}
}
return out;
}
/* MSYS1 does not use wide APIs, so ensure we get the narrow version here. */
static string getWinEnvVar(const char* aName) {
char buffer[32768];
DWORD length = GetEnvironmentVariableA(aName, buffer, sizeof(buffer));
if (length == 0 || length >= sizeof(buffer)) {
return string();
}
return string(buffer, length);
}
/* Exclude system headers by ignoring anything not in our directories.
* We don't know where people will put their objdir, so it has to be
* tracked separately.
*/
static bool isProjectDep(const string& aPath,
const string& aTopSrcDir,
const string& aTopObjDir) {
// We need forward slashes for our build system.
auto norm = [](string aStr) {
replace(aStr.begin(), aStr.end(), '\\', '/');
return aStr;
};
string path = norm(aPath);
string topSrcDir = norm(aTopSrcDir);
string topObjDir = norm(aTopObjDir);
// Must be absolute or relative under one of the two roots
return (path.rfind(topSrcDir, 0) == 0) ||
(path.rfind(topObjDir, 0) == 0);
}
/* Read stdout from the compiler pipe line-by-line, filtering include
lines and collecting dependency paths. */
static vector<string> processOutput(HANDLE aReadPipe) {
string lineBuf;
vector<string> deps;
string topSrcDir = getWinEnvVar("CL_TOPSRCDIR");
string topObjDir = getWinEnvVar("CL_TOPOBJDIR");
char buffer[4096];
DWORD bytesRead;
string includePrefix;
bool prefixFound = false;
while (ReadFile(aReadPipe, buffer, sizeof(buffer), &bytesRead, nullptr)) {
lineBuf.append(buffer, bytesRead);
size_t pos;
while ((pos = lineBuf.find('\n')) != string::npos) {
string line = lineBuf.substr(0, pos + 1);
lineBuf.erase(0, pos + 1);
if (!prefixFound) {
string maybe = showIncludesPrefixDetection(line);
if (!maybe.empty()) {
includePrefix = maybe;
prefixFound = true;
}
}
// If prefix is known and this line starts with it, it's an include line
if (prefixFound && line.rfind(includePrefix, 0) == 0) {
string header = extractHeaderPath(line, includePrefix);
if (!header.empty()) {
header = sanitizeMakeDeps(header);
if (isProjectDep(header, topSrcDir, topObjDir)) {
deps.push_back(header);
}
}
// This is an include line, don't print it
continue;
}
// Otherwise, just print
fwrite(line.data(), 1, line.size(), stdout);
}
}
if (!lineBuf.empty()) {
fwrite(lineBuf.data(), 1, lineBuf.size(), stdout);
}
return deps;
}
/* Convert a UTF-16 wide string to a UTF-8 narrow string. */
static string wideToUtf8(const wstring& aWide) {
if (aWide.empty()) {
return {};
}
int len = WideCharToMultiByte(CP_UTF8, 0, aWide.c_str(), -1, nullptr, 0, nullptr, nullptr);
string out(len - 1, '\0');
WideCharToMultiByte(CP_UTF8, 0, aWide.c_str(), -1, &out[0], len - 1, nullptr, nullptr);
return out;
}
/* Compute the .pp depfile path next to the given object file. */
static string makeDepfilePath(const string& aObjUtf8) {
size_t pos = aObjUtf8.find_last_of("/\\");
string dir = (pos == string::npos) ? "" : aObjUtf8.substr(0, pos + 1);
string base = (pos == string::npos) ? aObjUtf8 : aObjUtf8.substr(pos + 1);
return dir + ".deps/" + base + ".pp";
}
/* Write a Make-style dependency file for the given object and dep list. */
static void writeDepfile(const wstring& aObjFile, const vector<string>& aDeps) {
string objUtf8 = wideToUtf8(aObjFile);
string ppName = makeDepfilePath(objUtf8);
ofstream out(ppName);
out << objUtf8 << ":";
for (auto& dep : aDeps) {
out << " " << dep;
}
out << "\r\n";
}
int wmain(int argc, wchar_t** argv) {
if (argc < 2) {
fwprintf(stderr, L"Usage: action_cl.exe <compiler> [args...]\n");
return 1;
}
const wchar_t* compiler = argv[1];
// Build command line
wstring cmd = quoteArg(compiler);
wstring objFile;
wstring sourceFile;
cmd += L" -showIncludes";
for (int i = 2; i < argc; i++) {
cmd += L" ";
cmd += quoteArg(argv[i]);
}
vector<wchar_t> cmdLine(cmd.begin(), cmd.end());
cmdLine.push_back(L'\0');
for (int i = 2; i < argc; i++) {
wstring arg = argv[i];
if (arg.rfind(L"/Fo", 0) == 0 || arg.rfind(L"-Fo", 0) == 0) {
objFile = arg.substr(3); // strip /Fo or -Fo
}
if (!arg.empty() && arg[0] != L'-' && arg[0] != L'/') {
sourceFile = arg; // last non-flag argument is the source file
}
}
// Create pipe for capturing stdout
HANDLE readPipe, writePipe;
SECURITY_ATTRIBUTES sa = { sizeof(sa), nullptr, TRUE };
if (!CreatePipe(&readPipe, &writePipe, &sa, 0)) {
fwprintf(stderr, L"Failed to create pipe\n");
return 1;
}
SetHandleInformation(readPipe, HANDLE_FLAG_INHERIT, 0);
STARTUPINFOW si = { sizeof(si) };
si.dwFlags = STARTF_USESTDHANDLES;
si.hStdOutput = writePipe;
si.hStdError = GetStdHandle(STD_ERROR_HANDLE);
si.hStdInput = GetStdHandle(STD_INPUT_HANDLE);
PROCESS_INFORMATION pi;
BOOL ok = CreateProcessW(nullptr, cmdLine.data(), nullptr, nullptr, TRUE, 0, nullptr, nullptr, &si, &pi);
CloseHandle(writePipe);
if (!ok) {
fwprintf(stderr, L"Failed to launch compiler: %ls (error %lu)\n", compiler, GetLastError());
CloseHandle(readPipe);
return 1;
}
// Read compiler output and collect dependencies
auto deps = processOutput(readPipe);
CloseHandle(readPipe);
WaitForSingleObject(pi.hProcess, INFINITE);
DWORD exitCode = 0;
GetExitCodeProcess(pi.hProcess, &exitCode);
// Write the depfile only if we know the output object path
if (!objFile.empty()) {
string srcUtf8 = wideToUtf8(sourceFile);
deps.insert(deps.begin(), sanitizeMakeDeps(srcUtf8));
writeDepfile(objFile, deps);
}
CloseHandle(pi.hProcess);
CloseHandle(pi.hThread);
return exitCode;
}
+1 -1
View File
@@ -275,7 +275,7 @@ def check_style():
edges[inclname] = set()
# Process all the JS files.
for filename in list(js_names.keys()):
for filename in js_names.keys():
inclname = js_names[filename]
file_kind = FileKind.get(filename)
if file_kind == FileKind.C or file_kind == FileKind.CPP or \
+3 -4
View File
@@ -120,8 +120,8 @@ CONFIG_TOOLS = $(MOZ_BUILD_ROOT)/config
AUTOCONF_TOOLS = $(MOZILLA_DIR)/build/autoconf
ifdef _MSC_VER
CC_WRAPPER ?= $(DEPTH)/config/action_cl$(BIN_SUFFIX)
CXX_WRAPPER ?= $(DEPTH)/config/action_cl$(BIN_SUFFIX)
CC_WRAPPER ?= $(call py_action,cl)
CXX_WRAPPER ?= $(call py_action,cl)
endif # _MSC_VER
CC := $(CC_WRAPPER) $(CC)
@@ -562,8 +562,7 @@ endif
PLY_INCLUDE = -I$(MOZILLA_DIR)/other-licenses/ply
export CL_TOPOBJDIR = $(MOZ_BUILD_ROOT)
export CL_TOPSRCDIR = $(EXTERNAL_SOURCE_DIR)
export CL_INCLUDES_PREFIX
# Make sure that the build system can handle non-ASCII characters
# in environment variables to prevent it from breking silently on
# non-English systems.
+2 -4
View File
@@ -56,12 +56,10 @@ def generate_precomplete(root_path):
precomplete_file = open(precomplete_file_path, "wb")
rel_file_path_list, rel_dir_path_list = get_build_entries(root_path)
for rel_file_path in rel_file_path_list:
line = "remove \""+rel_file_path+"\"\n"
precomplete_file.write(line.encode('utf-8'))
precomplete_file.writelines("remove \""+rel_file_path+"\"\n")
for rel_dir_path in rel_dir_path_list:
line = "rmdir \""+rel_dir_path+"\"\n"
precomplete_file.write(line.encode('utf-8'))
precomplete_file.writelines("rmdir \""+rel_dir_path+"\"\n")
precomplete_file.close()
+2 -2
View File
@@ -36,7 +36,7 @@ def ensureParentDir(file):
if dir and not os.path.exists(dir):
try:
os.makedirs(dir)
except OSError as error:
except OSError, error:
if error.errno != errno.EEXIST:
raise
@@ -140,4 +140,4 @@ class ExpandArgs(list):
return [relativize(arg)]
if __name__ == '__main__':
print(" ".join(ExpandArgs(sys.argv[1:])))
print " ".join(ExpandArgs(sys.argv[1:]))
+7 -7
View File
@@ -305,11 +305,11 @@ class SectionFinder(object):
return syms
def print_command(out, args):
print("Executing: " + " ".join(args), file=out)
print >>out, "Executing: " + " ".join(args)
for tmp in [f for f in args.tmp if os.path.isfile(f)]:
print(tmp + ":", file=out)
print >>out, tmp + ":"
with open(tmp) as file:
print("".join([" " + l for l in file.readlines()]), file=out)
print >>out, "".join([" " + l for l in file.readlines()])
out.flush()
def main(args, proc_callback=None):
@@ -339,14 +339,14 @@ def main(args, proc_callback=None):
proc = subprocess.Popen(args, stdout = subprocess.PIPE, stderr = subprocess.STDOUT)
if proc_callback:
proc_callback(proc)
except Exception as e:
print('error: Launching', args, ':', e, file=sys.stderr)
except Exception, e:
print >>sys.stderr, 'error: Launching', args, ':', e
raise e
(stdout, stderr) = proc.communicate()
if proc.returncode and not options.verbose:
print_command(sys.stderr, args)
sys.stderr.buffer.write(stdout)
sys.stderr.buffer.flush()
sys.stderr.write(stdout)
sys.stderr.flush()
if proc.returncode:
return proc.returncode
return 0
+1 -1
View File
@@ -38,4 +38,4 @@ if __name__ == '__main__':
ensureParentDir(options.output)
with open(options.output, 'w') as outfile:
print(generate(args), file=outfile)
print >>outfile, generate(args)
-2
View File
@@ -101,8 +101,6 @@ else:
ASFLAGS += ['-no-integrated-as']
elif CONFIG['FFI_TARGET'] == 'AARCH64':
ffi_srcs = ('sysv.S', 'ffi.c')
elif CONFIG['FFI_TARGET'] == 'LOONGARCH64':
ffi_srcs = ('ffi.c', 'sysv.S')
elif CONFIG['FFI_TARGET'] == 'X86':
ffi_srcs = ('ffi.c', 'sysv.S', 'win32.S')
elif CONFIG['FFI_TARGET'] == 'X86_64':
+1 -20
View File
@@ -18,30 +18,20 @@ sources = [
'/intl/icu/source/common/dictionarydata.cpp',
'/intl/icu/source/common/dtintrv.cpp',
'/intl/icu/source/common/edits.cpp',
'/intl/icu/source/common/emojiprops.cpp',
'/intl/icu/source/common/errorcode.cpp',
'/intl/icu/source/common/filteredbrk.cpp',
'/intl/icu/source/common/filterednormalizer2.cpp',
'/intl/icu/source/common/fixedstring.cpp',
'/intl/icu/source/common/loadednormalizer2impl.cpp',
'/intl/icu/source/common/localebuilder.cpp',
'/intl/icu/source/common/localematcher.cpp',
'/intl/icu/source/common/localeprioritylist.cpp',
'/intl/icu/source/common/locavailable.cpp',
'/intl/icu/source/common/locbased.cpp',
'/intl/icu/source/common/locdispnames.cpp',
'/intl/icu/source/common/locdistance.cpp',
'/intl/icu/source/common/locdspnm.cpp',
'/intl/icu/source/common/locid.cpp',
'/intl/icu/source/common/loclikely.cpp',
'/intl/icu/source/common/loclikelysubtags.cpp',
'/intl/icu/source/common/locmap.cpp',
'/intl/icu/source/common/locresdata.cpp',
'/intl/icu/source/common/locutil.cpp',
'/intl/icu/source/common/lsr.cpp',
'/intl/icu/source/common/lstmbe.cpp',
'/intl/icu/source/common/messagepattern.cpp',
'/intl/icu/source/common/mlbe.cpp',
'/intl/icu/source/common/normalizer2.cpp',
'/intl/icu/source/common/normalizer2impl.cpp',
'/intl/icu/source/common/normlzr.cpp',
@@ -61,7 +51,6 @@ sources = [
'/intl/icu/source/common/rbbitblb.cpp',
'/intl/icu/source/common/resbund.cpp',
'/intl/icu/source/common/resource.cpp',
'/intl/icu/source/common/restrace.cpp',
'/intl/icu/source/common/ruleiter.cpp',
'/intl/icu/source/common/schriter.cpp',
'/intl/icu/source/common/serv.cpp',
@@ -121,8 +110,6 @@ sources = [
'/intl/icu/source/common/uloc.cpp',
'/intl/icu/source/common/uloc_keytype.cpp',
'/intl/icu/source/common/uloc_tag.cpp',
'/intl/icu/source/common/ulocale.cpp',
'/intl/icu/source/common/ulocbuilder.cpp',
'/intl/icu/source/common/umapfile.cpp',
'/intl/icu/source/common/umath.cpp',
'/intl/icu/source/common/umutablecptrie.cpp',
@@ -164,7 +151,6 @@ sources = [
'/intl/icu/source/common/utext.cpp',
'/intl/icu/source/common/utf_impl.cpp',
'/intl/icu/source/common/util.cpp',
'/intl/icu/source/common/util_props.cpp',
'/intl/icu/source/common/utrace.cpp',
'/intl/icu/source/common/utrie.cpp',
'/intl/icu/source/common/utrie2.cpp',
@@ -204,6 +190,7 @@ other_sources = [
'/intl/icu/source/common/usc_impl.cpp',
'/intl/icu/source/common/ushape.cpp',
'/intl/icu/source/common/ustr_wcs.cpp',
'/intl/icu/source/common/util_props.cpp',
]
EXPORTS.unicode += [
'/intl/icu/source/common/unicode/appendable.h',
@@ -225,8 +212,6 @@ EXPORTS.unicode += [
'/intl/icu/source/common/unicode/icudataver.h',
'/intl/icu/source/common/unicode/icuplug.h',
'/intl/icu/source/common/unicode/idna.h',
'/intl/icu/source/common/unicode/localebuilder.h',
'/intl/icu/source/common/unicode/localematcher.h',
'/intl/icu/source/common/unicode/localpointer.h',
'/intl/icu/source/common/unicode/locdspnm.h',
'/intl/icu/source/common/unicode/locid.h',
@@ -274,8 +259,6 @@ EXPORTS.unicode += [
'/intl/icu/source/common/unicode/uiter.h',
'/intl/icu/source/common/unicode/uldnames.h',
'/intl/icu/source/common/unicode/uloc.h',
'/intl/icu/source/common/unicode/ulocale.h',
'/intl/icu/source/common/unicode/ulocbuilder.h',
'/intl/icu/source/common/unicode/umachine.h',
'/intl/icu/source/common/unicode/umisc.h',
'/intl/icu/source/common/unicode/umutablecptrie.h',
@@ -303,8 +286,6 @@ EXPORTS.unicode += [
'/intl/icu/source/common/unicode/utf32.h',
'/intl/icu/source/common/unicode/utf8.h',
'/intl/icu/source/common/unicode/utf_old.h',
'/intl/icu/source/common/unicode/utfiterator.h',
'/intl/icu/source/common/unicode/utfstring.h',
'/intl/icu/source/common/unicode/utrace.h',
'/intl/icu/source/common/unicode/utypes.h',
'/intl/icu/source/common/unicode/uvernum.h',
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
-22
View File
@@ -3,15 +3,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/.
# Also see <http://www.icu-project.org/repos/icu/tags/latest/icu4c/readme.html#RecBuild> for the
# recommended build options when compiling ICU.
DEFINES.update(
# Don't use icu namespace automatically in client code.
U_USING_ICU_NAMESPACE = 0,
# Don't include obsolete header files.
U_NO_DEFAULT_INCLUDE_UTF_HEADERS = 1,
U_HIDE_OBSOLETE_UTF_OLD_H = 1,
# Remove chunks of the library that we don't need (yet).
UCONFIG_NO_LEGACY_CONVERSION = True,
@@ -20,13 +17,6 @@ DEFINES.update(
# We don't need to pass data to and from legacy char* APIs.
U_CHARSET_IS_UTF8 = True,
# Add 'explicit' keyword to UnicodeString constructors.
UNISTR_FROM_CHAR_EXPLICIT = 'explicit',
UNISTR_FROM_STRING_EXPLICIT = 'explicit',
# Disable dynamic loading of ICU data as a loadable library.
U_ENABLE_DYLOAD = 0,
)
if not CONFIG['HAVE_LANGINFO_CODESET']:
@@ -48,24 +38,12 @@ ALLOW_COMPILER_WARNINGS = True
# warnings that get triggered for every file.
if CONFIG['CLANG_CL']:
CFLAGS += [
'-Wno-c++20-compat',
'-Wno-comma',
'-Wno-implicit-const-int-float-conversion',
'-Wno-macro-redefined',
'-Wno-microsoft-include',
'-Wno-tautological-unsigned-enum-zero-compare',
'-Wno-unreachable-code-loop-increment',
'-Wno-unreachable-code-return',
]
CXXFLAGS += [
'-Wno-c++20-compat',
'-Wno-comma',
'-Wno-implicit-const-int-float-conversion',
'-Wno-macro-redefined',
'-Wno-microsoft-include',
'-Wno-tautological-unsigned-enum-zero-compare',
'-Wno-unreachable-code-loop-increment',
'-Wno-unreachable-code-return',
]
if CONFIG['_MSC_VER'] and not CONFIG['CLANG_CL']:
+5 -47
View File
@@ -42,14 +42,13 @@ sources = [
'/intl/icu/source/i18n/decContext.cpp',
'/intl/icu/source/i18n/decimfmt.cpp',
'/intl/icu/source/i18n/decNumber.cpp',
'/intl/icu/source/i18n/displayoptions.cpp',
'/intl/icu/source/i18n/double-conversion-bignum-dtoa.cpp',
'/intl/icu/source/i18n/double-conversion-bignum.cpp',
'/intl/icu/source/i18n/double-conversion-cached-powers.cpp',
'/intl/icu/source/i18n/double-conversion-double-to-string.cpp',
'/intl/icu/source/i18n/double-conversion-diy-fp.cpp',
'/intl/icu/source/i18n/double-conversion-fast-dtoa.cpp',
'/intl/icu/source/i18n/double-conversion-string-to-double.cpp',
'/intl/icu/source/i18n/double-conversion-strtod.cpp',
'/intl/icu/source/i18n/double-conversion.cpp',
'/intl/icu/source/i18n/dtfmtsym.cpp',
'/intl/icu/source/i18n/dtitvfmt.cpp',
'/intl/icu/source/i18n/dtitvinf.cpp',
@@ -59,10 +58,6 @@ sources = [
'/intl/icu/source/i18n/ethpccal.cpp',
'/intl/icu/source/i18n/fmtable.cpp',
'/intl/icu/source/i18n/format.cpp',
'/intl/icu/source/i18n/formatted_string_builder.cpp',
'/intl/icu/source/i18n/formattedval_iterimpl.cpp',
'/intl/icu/source/i18n/formattedval_sbimpl.cpp',
'/intl/icu/source/i18n/formattedvalue.cpp',
'/intl/icu/source/i18n/fphdlimp.cpp',
'/intl/icu/source/i18n/fpositer.cpp',
'/intl/icu/source/i18n/gregocal.cpp',
@@ -70,28 +65,16 @@ sources = [
'/intl/icu/source/i18n/hebrwcal.cpp',
'/intl/icu/source/i18n/indiancal.cpp',
'/intl/icu/source/i18n/islamcal.cpp',
'/intl/icu/source/i18n/iso8601cal.cpp',
'/intl/icu/source/i18n/japancal.cpp',
'/intl/icu/source/i18n/listformatter.cpp',
'/intl/icu/source/i18n/measfmt.cpp',
'/intl/icu/source/i18n/measunit.cpp',
'/intl/icu/source/i18n/measunit_extra.cpp',
'/intl/icu/source/i18n/measure.cpp',
'/intl/icu/source/i18n/messageformat2.cpp',
'/intl/icu/source/i18n/messageformat2_arguments.cpp',
'/intl/icu/source/i18n/messageformat2_checker.cpp',
'/intl/icu/source/i18n/messageformat2_data_model.cpp',
'/intl/icu/source/i18n/messageformat2_errors.cpp',
'/intl/icu/source/i18n/messageformat2_evaluation.cpp',
'/intl/icu/source/i18n/messageformat2_formattable.cpp',
'/intl/icu/source/i18n/messageformat2_formatter.cpp',
'/intl/icu/source/i18n/messageformat2_function_registry.cpp',
'/intl/icu/source/i18n/messageformat2_parser.cpp',
'/intl/icu/source/i18n/messageformat2_serializer.cpp',
'/intl/icu/source/i18n/msgfmt.cpp',
'/intl/icu/source/i18n/nfrs.cpp',
'/intl/icu/source/i18n/nfrule.cpp',
'/intl/icu/source/i18n/nfsubs.cpp',
'/intl/icu/source/i18n/nounit.cpp',
'/intl/icu/source/i18n/number_affixutils.cpp',
'/intl/icu/source/i18n/number_asformat.cpp',
'/intl/icu/source/i18n/number_capi.cpp',
@@ -108,16 +91,13 @@ sources = [
'/intl/icu/source/i18n/number_modifiers.cpp',
'/intl/icu/source/i18n/number_multiplier.cpp',
'/intl/icu/source/i18n/number_notation.cpp',
'/intl/icu/source/i18n/number_output.cpp',
'/intl/icu/source/i18n/number_padding.cpp',
'/intl/icu/source/i18n/number_patternmodifier.cpp',
'/intl/icu/source/i18n/number_patternstring.cpp',
'/intl/icu/source/i18n/number_rounding.cpp',
'/intl/icu/source/i18n/number_scientific.cpp',
'/intl/icu/source/i18n/number_simple.cpp',
'/intl/icu/source/i18n/number_skeletons.cpp',
'/intl/icu/source/i18n/number_symbolswrapper.cpp',
'/intl/icu/source/i18n/number_usageprefs.cpp',
'/intl/icu/source/i18n/number_stringbuilder.cpp',
'/intl/icu/source/i18n/number_utils.cpp',
'/intl/icu/source/i18n/numfmt.cpp',
'/intl/icu/source/i18n/numparse_affixes.cpp',
@@ -127,15 +107,14 @@ sources = [
'/intl/icu/source/i18n/numparse_impl.cpp',
'/intl/icu/source/i18n/numparse_parsednumber.cpp',
'/intl/icu/source/i18n/numparse_scientific.cpp',
'/intl/icu/source/i18n/numparse_stringsegment.cpp',
'/intl/icu/source/i18n/numparse_symbols.cpp',
'/intl/icu/source/i18n/numparse_validators.cpp',
'/intl/icu/source/i18n/numrange_capi.cpp',
'/intl/icu/source/i18n/numrange_fluent.cpp',
'/intl/icu/source/i18n/numrange_impl.cpp',
'/intl/icu/source/i18n/numsys.cpp',
'/intl/icu/source/i18n/olsontz.cpp',
'/intl/icu/source/i18n/persncal.cpp',
'/intl/icu/source/i18n/pluralranges.cpp',
'/intl/icu/source/i18n/plurfmt.cpp',
'/intl/icu/source/i18n/plurrule.cpp',
'/intl/icu/source/i18n/quantityformatter.cpp',
@@ -154,7 +133,6 @@ sources = [
'/intl/icu/source/i18n/smpdtfst.cpp',
'/intl/icu/source/i18n/sortkey.cpp',
'/intl/icu/source/i18n/standardplural.cpp',
'/intl/icu/source/i18n/string_segment.cpp',
'/intl/icu/source/i18n/stsearch.cpp',
'/intl/icu/source/i18n/taiwncal.cpp',
'/intl/icu/source/i18n/timezone.cpp',
@@ -179,10 +157,6 @@ sources = [
'/intl/icu/source/i18n/uitercollationiterator.cpp',
'/intl/icu/source/i18n/ulistformatter.cpp',
'/intl/icu/source/i18n/umsg.cpp',
'/intl/icu/source/i18n/units_complexconverter.cpp',
'/intl/icu/source/i18n/units_converter.cpp',
'/intl/icu/source/i18n/units_data.cpp',
'/intl/icu/source/i18n/units_router.cpp',
'/intl/icu/source/i18n/unum.cpp',
'/intl/icu/source/i18n/unumsys.cpp',
'/intl/icu/source/i18n/upluralrules.cpp',
@@ -271,7 +245,6 @@ EXPORTS.unicode += [
'/intl/icu/source/i18n/unicode/datefmt.h',
'/intl/icu/source/i18n/unicode/dcfmtsym.h',
'/intl/icu/source/i18n/unicode/decimfmt.h',
'/intl/icu/source/i18n/unicode/displayoptions.h',
'/intl/icu/source/i18n/unicode/dtfmtsym.h',
'/intl/icu/source/i18n/unicode/dtitvfmt.h',
'/intl/icu/source/i18n/unicode/dtitvinf.h',
@@ -280,8 +253,6 @@ EXPORTS.unicode += [
'/intl/icu/source/i18n/unicode/fieldpos.h',
'/intl/icu/source/i18n/unicode/fmtable.h',
'/intl/icu/source/i18n/unicode/format.h',
'/intl/icu/source/i18n/unicode/formattednumber.h',
'/intl/icu/source/i18n/unicode/formattedvalue.h',
'/intl/icu/source/i18n/unicode/fpositer.h',
'/intl/icu/source/i18n/unicode/gender.h',
'/intl/icu/source/i18n/unicode/gregocal.h',
@@ -289,12 +260,6 @@ EXPORTS.unicode += [
'/intl/icu/source/i18n/unicode/measfmt.h',
'/intl/icu/source/i18n/unicode/measunit.h',
'/intl/icu/source/i18n/unicode/measure.h',
'/intl/icu/source/i18n/unicode/messageformat2.h',
'/intl/icu/source/i18n/unicode/messageformat2_arguments.h',
'/intl/icu/source/i18n/unicode/messageformat2_data_model.h',
'/intl/icu/source/i18n/unicode/messageformat2_data_model_names.h',
'/intl/icu/source/i18n/unicode/messageformat2_formattable.h',
'/intl/icu/source/i18n/unicode/messageformat2_function_registry.h',
'/intl/icu/source/i18n/unicode/msgfmt.h',
'/intl/icu/source/i18n/unicode/nounit.h',
'/intl/icu/source/i18n/unicode/numberformatter.h',
@@ -311,7 +276,6 @@ EXPORTS.unicode += [
'/intl/icu/source/i18n/unicode/scientificnumberformatter.h',
'/intl/icu/source/i18n/unicode/search.h',
'/intl/icu/source/i18n/unicode/selfmt.h',
'/intl/icu/source/i18n/unicode/simplenumberformatter.h',
'/intl/icu/source/i18n/unicode/simpletz.h',
'/intl/icu/source/i18n/unicode/smpdtfmt.h',
'/intl/icu/source/i18n/unicode/sortkey.h',
@@ -333,11 +297,8 @@ EXPORTS.unicode += [
'/intl/icu/source/i18n/unicode/udat.h',
'/intl/icu/source/i18n/unicode/udateintervalformat.h',
'/intl/icu/source/i18n/unicode/udatpg.h',
'/intl/icu/source/i18n/unicode/udisplayoptions.h',
'/intl/icu/source/i18n/unicode/ufieldpositer.h',
'/intl/icu/source/i18n/unicode/uformattable.h',
'/intl/icu/source/i18n/unicode/uformattednumber.h',
'/intl/icu/source/i18n/unicode/uformattedvalue.h',
'/intl/icu/source/i18n/unicode/ugender.h',
'/intl/icu/source/i18n/unicode/ulistformatter.h',
'/intl/icu/source/i18n/unicode/ulocdata.h',
@@ -345,15 +306,12 @@ EXPORTS.unicode += [
'/intl/icu/source/i18n/unicode/unirepl.h',
'/intl/icu/source/i18n/unicode/unum.h',
'/intl/icu/source/i18n/unicode/unumberformatter.h',
'/intl/icu/source/i18n/unicode/unumberoptions.h',
'/intl/icu/source/i18n/unicode/unumberrangeformatter.h',
'/intl/icu/source/i18n/unicode/unumsys.h',
'/intl/icu/source/i18n/unicode/upluralrules.h',
'/intl/icu/source/i18n/unicode/uregex.h',
'/intl/icu/source/i18n/unicode/uregion.h',
'/intl/icu/source/i18n/unicode/ureldatefmt.h',
'/intl/icu/source/i18n/unicode/usearch.h',
'/intl/icu/source/i18n/unicode/usimplenumberformatter.h',
'/intl/icu/source/i18n/unicode/uspoof.h',
'/intl/icu/source/i18n/unicode/utmscale.h',
'/intl/icu/source/i18n/unicode/utrans.h',
+4 -6
View File
@@ -29,10 +29,7 @@ if CONFIG['MOZ_WEBM_ENCODER']:
external_dirs += ['media/libvpx']
if CONFIG['MOZ_AV1']:
if CONFIG['AV1_USE_AOM']:
external_dirs += ['media/libaom']
else:
external_dirs += ['media/libdav1d']
external_dirs += ['media/libaom']
external_dirs += ['media/libpng']
@@ -44,11 +41,12 @@ if CONFIG['CPU_ARCH'] == 'arm':
if CONFIG['MOZ_FFVPX']:
external_dirs += ['media/ffvpx']
if CONFIG["MOZ_JXL"]:
external_dirs += ["media/libjxl", "media/highway"]
external_dirs += [
'media/highway',
'media/kiss_fft',
'media/libcubeb',
'media/libjxl',
'media/libnestegg',
'media/libogg',
'media/libopus',
+2 -2
View File
@@ -95,12 +95,12 @@ def count_lines():
"""Keep track of the amount of times individual lines occur, in order to
prioritize the errors which occur most frequently."""
counts = {}
for string,count in list(blacklist.items()):
for string,count in blacklist.items():
for line in string.split("\n"):
counts[line] = counts.get(line, 0) + count
lines = []
for k,v in list(counts.items()):
for k,v in counts.items():
lines.append("{0:6}: {1}".format(v, k))
lines.sort()
+2 -2
View File
@@ -18,7 +18,7 @@ def periodically_print_status(proc):
time.sleep(0.5)
idleTime += 0.5
if idleTime > 20 * 60:
print("Still linking, 20 minutes passed...")
print "Still linking, 20 minutes passed..."
sys.stdout.flush()
idleTime = 0
@@ -42,6 +42,6 @@ def wrap_linker(args):
if __name__ == "__main__":
if len(sys.argv) < 2:
print("Usage: link.py <commandline>", file=sys.stderr)
print >>sys.stderr, "Usage: link.py <commandline>"
sys.exit(1)
sys.exit(wrap_linker(sys.argv[1:]))
+1 -1
View File
@@ -8,4 +8,4 @@
# Referenced by milestone.py.
#--------------------------------------------------------
6.9.0
6.7.0
-8
View File
@@ -23,19 +23,11 @@ if CONFIG['HOST_OS_ARCH'] != 'WINNT':
'nsinstall.c',
'pathsub.c',
]
# stdc++compat depends on config/export, so avoid a circular
# dependency added by HostProgram depending on stdc++compat,
# while the program here is in C.
HostProgram('nsinstall_real', c_only=True)
if CONFIG['HOST_OS_ARCH'] == 'WINNT':
HOST_SOURCES +=[
'action_cl.cpp',
]
HostProgram('action_cl')
if CONFIG['GKMEDIAS_SHARED_LIBRARY']:
DEFINES['GKMEDIAS_SHARED_LIBRARY'] = True
+7 -7
View File
@@ -5,7 +5,7 @@
from unittest import TextTestRunner as _TestRunner, TestResult as _TestResult
import unittest
import inspect
from io import StringIO
from StringIO import StringIO
import os
import sys
@@ -140,7 +140,7 @@ class MockedOpen(object):
'''
def __init__(self, files = {}):
self.files = {}
for name, content in files.items():
for name, content in files.iteritems():
self.files[normcase(os.path.abspath(name))] = content
def __call__(self, name, mode = 'r'):
@@ -158,19 +158,19 @@ class MockedOpen(object):
return file
def __enter__(self):
import builtins
self.open = builtins.open
import __builtin__
self.open = __builtin__.open
self._orig_path_exists = os.path.exists
self._orig_path_isdir = os.path.isdir
self._orig_path_isfile = os.path.isfile
builtins.open = self
__builtin__.open = self
os.path.exists = self._wrapped_exists
os.path.isdir = self._wrapped_isdir
os.path.isfile = self._wrapped_isfile
def __exit__(self, type, value, traceback):
import builtins
builtins.open = self.open
import __builtin__
__builtin__.open = self.open
os.path.exists = self._orig_path_exists
os.path.isdir = self._orig_path_isdir
os.path.isfile = self._orig_path_isfile
+6 -3
View File
@@ -149,7 +149,7 @@ def _nsinstall_internal(argv):
# nsinstall as a native command is always UTF-8
def nsinstall(argv):
return _nsinstall_internal([str(arg, "utf-8") for arg in argv])
return _nsinstall_internal([unicode(arg, "utf-8") for arg in argv])
if __name__ == '__main__':
# sys.argv corrupts characters outside the system code page on Windows
@@ -173,7 +173,10 @@ if __name__ == '__main__':
# The first argv will be "python", the second will be the .py file
argv = argv_arr[1:argc.value]
else:
# On Py3, we shouldn't do this for non-Windows. sys.argv is UTF-8 (or ASCII on old Unix).
argv = sys.argv
# For consistency, do it on Unix as well
if sys.stdin.encoding is not None:
argv = [unicode(arg, sys.stdin.encoding) for arg in sys.argv]
else:
argv = [unicode(arg) for arg in sys.argv]
sys.exit(_nsinstall_internal(argv[1:]))
+6 -6
View File
@@ -5,27 +5,27 @@
import configobj
import sys
import re
from io import StringIO
from StringIO import StringIO
try:
(file, section, key) = sys.argv[1:]
except ValueError:
print("Usage: printconfigsetting.py <file> <section> <setting>")
print "Usage: printconfigsetting.py <file> <section> <setting>"
sys.exit(1)
with open(file) as fh:
content = re.sub(r'^\s*;', '#', fh.read(), flags=re.M)
content = re.sub('^\s*;', '#', fh.read(), flags=re.M)
c = configobj.ConfigObj(StringIO(content))
try:
s = c[section]
except KeyError:
print("Section [%s] not found." % section, file=sys.stderr)
print >>sys.stderr, "Section [%s] not found." % section
sys.exit(1)
try:
print(s[key])
print s[key]
except KeyError:
print("Key %s not found." % key, file=sys.stderr)
print >>sys.stderr, "Key %s not found." % key
sys.exit(1)
+2 -2
View File
@@ -9,7 +9,7 @@ Run a python script, adding extra directories to the python path.
def main(args):
def usage():
print("pythonpath.py -I directory script.py [args...]", file=sys.stderr)
print >>sys.stderr, "pythonpath.py -I directory script.py [args...]"
sys.exit(150)
paths = []
@@ -45,7 +45,7 @@ def main(args):
frozenglobals['__name__'] = '__main__'
frozenglobals['__file__'] = script
exec(compile(open(script, "rb").read(), script, 'exec'), frozenglobals)
execfile(script, frozenglobals)
# Freeze scope here ... why this makes things work I have no idea ...
frozenglobals = globals()
+5 -5
View File
@@ -18,7 +18,7 @@ def rebuild_check(args):
deps = args[1:]
t = mtime(target)
if t < 0:
print(target)
print target
return
newer = []
@@ -31,13 +31,13 @@ def rebuild_check(args):
newer.append(dep)
if newer and removed:
print('Rebuilding %s because %s changed and %s was removed' % (target, ', '.join(newer), ', '.join(removed)))
print 'Rebuilding %s because %s changed and %s was removed' % (target, ', '.join(newer), ', '.join(removed))
elif newer:
print('Rebuilding %s because %s changed' % (target, ', '.join(newer)))
print 'Rebuilding %s because %s changed' % (target, ', '.join(newer))
elif removed:
print('Rebuilding %s because %s was removed' % (target, ', '.join(removed)))
print 'Rebuilding %s because %s was removed' % (target, ', '.join(removed))
else:
print('Rebuilding %s for an unknown reason' % target)
print 'Rebuilding %s for an unknown reason' % target
if __name__ == '__main__':
import sys
+4
View File
@@ -348,7 +348,11 @@ ifdef SHARED_LIBRARY
ifdef IS_COMPONENT
EXTRA_DSO_LDOPTS += -bundle
else
ifdef MOZ_IOS
_LOADER_PATH := @rpath
else
_LOADER_PATH := @executable_path
endif
EXTRA_DSO_LDOPTS += -dynamiclib -install_name $(_LOADER_PATH)/$(SHARED_LIBRARY) -compatibility_version 1 -current_version 1 -single_module
endif
endif
+9
View File
@@ -335,6 +335,8 @@ curses.h
cxxabi.h
DateTimeUtils.h
dbus/dbus.h
dbus/dbus-glib.h
dbus/dbus-glib-lowlevel.h
ddeml.h
Debug.h
dem.h
@@ -422,6 +424,7 @@ fstream
fstream.h
ft2build.h
fts.h
gconf/gconf-client.h
Gdiplus.h
gdk/gdk.h
gdk/gdkkeysyms.h
@@ -448,6 +451,7 @@ gtk/gtkx.h
gtk/gtkunixprint.h
HIToolbox/HIToolbox.h
hlink.h
ia64/sys/inline.h
Icons.h
iconv.h
ieeefp.h
@@ -1029,6 +1033,9 @@ X11/Xutil.h
zmouse.h
soundtouch/SoundTouch.h
soundtouch/SoundTouchFactory.h
#if MOZ_LIBAV_FFT==1
libavcodec/avfft.h
#endif
#if MOZ_SYSTEM_ZLIB==1
zlib.h
#endif
@@ -1046,7 +1053,9 @@ hunspell.hxx
#if MOZ_SYSTEM_BZ2==1
bzlib.h
#endif
#ifdef MOZ_ENABLE_GIO
gio/gio.h
#endif
sys/event.h
#ifdef MOZ_ENABLE_LIBPROXY
proxy.h
+3 -2
View File
@@ -7,7 +7,7 @@ from tempfile import mkdtemp
from shutil import rmtree
import mozunit
from collections import UserString
from UserString import UserString
# Create a controlled configuration for use by expandlibs
config_win = {
'AR': 'lib',
@@ -120,7 +120,8 @@ class ReplicateTests(type):
del dict[name]
return type.__new__(cls, clsName, bases, dict)
class TestCaseWithTmpDir(unittest.TestCase, metaclass=ReplicateTests):
class TestCaseWithTmpDir(unittest.TestCase):
__metaclass__ = ReplicateTests
def init(self):
self.tmpdir = os.path.abspath(mkdtemp(dir=os.curdir))
+21 -21
View File
@@ -28,9 +28,9 @@ class TestNsinstall(unittest.TestCase):
# Unicode strings means non-ASCII children can be deleted properly on
# Windows
if sys.stdin.encoding is None:
tmpdir = str(self.tmpdir)
tmpdir = unicode(self.tmpdir)
else:
tmpdir = str(self.tmpdir, sys.stdin.encoding)
tmpdir = unicode(self.tmpdir, sys.stdin.encoding)
rmtree(tmpdir)
# utility methods for tests
@@ -50,14 +50,14 @@ class TestNsinstall(unittest.TestCase):
"Test nsinstall -D <dir>"
testdir = os.path.join(self.tmpdir, "test")
self.assertEqual(nsinstall(["-D", testdir]), 0)
self.assertTrue(os.path.isdir(testdir))
self.assert_(os.path.isdir(testdir))
def test_nsinstall_basic(self):
"Test nsinstall <file> <dir>"
testfile = self.touch("testfile")
testdir = self.mkdirs("testdir")
self.assertEqual(nsinstall([testfile, testdir]), 0)
self.assertTrue(os.path.isfile(os.path.join(testdir, "testfile")))
self.assert_(os.path.isfile(os.path.join(testdir, "testfile")))
def test_nsinstall_basic_recursive(self):
"Test nsinstall <dir> <dest dir>"
@@ -76,12 +76,12 @@ class TestNsinstall(unittest.TestCase):
'-X', Xdir]), 0)
testdir = os.path.join(destdir, "sourcedir")
self.assertTrue(os.path.isdir(testdir))
self.assertTrue(os.path.isfile(os.path.join(testdir, "testfile")))
self.assertTrue(not os.path.exists(os.path.join(testdir, "Xfile")))
self.assertTrue(os.path.isdir(os.path.join(testdir, "copieddir")))
self.assertTrue(os.path.isfile(os.path.join(testdir, "copieddir", "testfile2")))
self.assertTrue(not os.path.exists(os.path.join(testdir, "Xdir")))
self.assert_(os.path.isdir(testdir))
self.assert_(os.path.isfile(os.path.join(testdir, "testfile")))
self.assert_(not os.path.exists(os.path.join(testdir, "Xfile")))
self.assert_(os.path.isdir(os.path.join(testdir, "copieddir")))
self.assert_(os.path.isfile(os.path.join(testdir, "copieddir", "testfile2")))
self.assert_(not os.path.exists(os.path.join(testdir, "Xdir")))
def test_nsinstall_multiple(self):
"Test nsinstall <three files> <dest dir>"
@@ -91,7 +91,7 @@ class TestNsinstall(unittest.TestCase):
testdir = self.mkdirs("testdir")
self.assertEqual(nsinstall(testfiles + [testdir]), 0)
for f in testfiles:
self.assertTrue(os.path.isfile(os.path.join(testdir,
self.assert_(os.path.isfile(os.path.join(testdir,
os.path.basename(f))))
def test_nsinstall_dir_exists(self):
@@ -99,7 +99,7 @@ class TestNsinstall(unittest.TestCase):
srcdir = self.mkdirs("test")
destdir = self.mkdirs("testdir/test")
self.assertEqual(nsinstall([srcdir, os.path.dirname(destdir)]), 0)
self.assertTrue(os.path.isdir(destdir))
self.assert_(os.path.isdir(destdir))
def test_nsinstall_t(self):
"Test that nsinstall -t works (preserve timestamp)"
@@ -110,7 +110,7 @@ class TestNsinstall(unittest.TestCase):
os.utime(testfile, (t, t))
self.assertEqual(nsinstall(["-t", testfile, testdir]), 0)
destfile = os.path.join(testdir, "testfile")
self.assertTrue(os.path.isfile(destfile))
self.assert_(os.path.isfile(destfile))
self.assertEqual(os.stat(testfile).st_mtime,
os.stat(destfile).st_mtime)
@@ -125,7 +125,7 @@ class TestNsinstall(unittest.TestCase):
self.assertEqual(nsinstall(["-m", "{0:04o}"
.format(mode), testfile, testdir]), 0)
destfile = os.path.join(testdir, "testfile")
self.assertTrue(os.path.isfile(destfile))
self.assert_(os.path.isfile(destfile))
self.assertEqual(os.stat(testfile).st_mode,
os.stat(destfile).st_mode)
@@ -136,25 +136,25 @@ class TestNsinstall(unittest.TestCase):
testdir = self.mkdirs("testdir")
destdir = os.path.join(testdir, "subdir")
self.assertEqual(nsinstall(["-d", testfile, destdir]), 0)
self.assertTrue(os.path.isdir(os.path.join(destdir, "testfile")))
self.assert_(os.path.isdir(os.path.join(destdir, "testfile")))
if RUN_NON_ASCII_TESTS:
def test_nsinstall_non_ascii(self):
"Test that nsinstall handles non-ASCII files"
filename = "\u2325\u3452\u2415\u5081"
filename = u"\u2325\u3452\u2415\u5081"
testfile = self.touch(filename)
testdir = self.mkdirs("\u4241\u1D04\u1414")
testdir = self.mkdirs(u"\u4241\u1D04\u1414")
self.assertEqual(nsinstall([testfile.encode("utf-8"),
testdir.encode("utf-8")]), 0)
destfile = os.path.join(testdir, filename)
self.assertTrue(os.path.isfile(destfile))
self.assert_(os.path.isfile(destfile))
def test_nsinstall_non_ascii_subprocess(self):
"Test that nsinstall as a subprocess handles non-ASCII files"
filename = "\u2325\u3452\u2415\u5081"
filename = u"\u2325\u3452\u2415\u5081"
testfile = self.touch(filename)
testdir = self.mkdirs("\u4241\u1D04\u1414")
testdir = self.mkdirs(u"\u4241\u1D04\u1414")
# We don't use subprocess because it can't handle Unicode on
# Windows <http://bugs.python.org/issue1759845>. mozprocess calls
# CreateProcessW directly so it's perfect.
@@ -166,7 +166,7 @@ class TestNsinstall(unittest.TestCase):
self.assertEqual(rv, 0)
destfile = os.path.join(testdir, filename)
self.assertTrue(os.path.isfile(destfile))
self.assert_(os.path.isfile(destfile))
#TODO: implement -R, -l, -L and test them!
+11 -12
View File
@@ -11,7 +11,6 @@ import sys
import random
import copy
from string import letters
from functools import reduce
'''
Test case infrastructure for MozZipFile.
@@ -39,7 +38,7 @@ leafs = (
'firstdir/oneleaf',
'seconddir/twoleaf',
'thirddir/with/sub/threeleaf')
_lengths = [n * 64 for n in [16, 64, 80]]
_lengths = map(lambda n: n * 64, [16, 64, 80])
lengths = 3
writes = 5
@@ -72,7 +71,7 @@ def getid(descs):
def getContent(length):
'Get pseudo random content of given length.'
rv = [None] * length
for i in range(length):
for i in xrange(length):
rv[i] = random.choice(letters)
return ''.join(rv)
@@ -134,13 +133,13 @@ class TestExtensiveStored(unittest.TestCase):
def _verifyZip(self):
zf = zipfile.ZipFile(self.f)
badEntry = zf.testzip()
self.assertFalse(badEntry, badEntry)
self.failIf(badEntry, badEntry)
zlist = zf.namelist()
zlist.sort()
vlist = list(self.ref.keys())
vlist = self.ref.keys()
vlist.sort()
self.assertEqual(zlist, vlist)
for leaf, content in self.ref.items():
for leaf, content in self.ref.iteritems():
zcontent = zf.read(leaf)
self.assertEqual(content, zcontent)
@@ -159,16 +158,16 @@ class TestExtensiveStored(unittest.TestCase):
open(self.leaf('stage', leaf), 'w').write(content)
# all leafs in all lengths
atomics = list(prod(range(len(leafs)), range(lengths)))
atomics = list(prod(xrange(len(leafs)), xrange(lengths)))
# populate TestExtensiveStore with testcases
for w in range(writes):
for w in xrange(writes):
# Don't iterate over all files for the the first n passes,
# those are redundant as long as w < lengths.
# There are symmetries in the trailing end, too, but I don't know
# how to reduce those out right now.
nonatomics = [list(prod(list(range(min(i,len(leafs)))), range(lengths)))
for i in range(1, w+1)] + [atomics]
nonatomics = [list(prod(range(min(i,len(leafs))), xrange(lengths)))
for i in xrange(1, w+1)] + [atomics]
for descs in prod(*nonatomics):
suffix = getid(descs)
dicts = [dict(leaf=leaf, length=length) for leaf, length in descs]
@@ -182,9 +181,9 @@ for w in range(writes):
# and then write all atomics again.
# This should catch more or less all artifacts generated
# by the final ordering step when closing the jar.
files = [list(prod([i], range(lengths))) for i in range(len(leafs))]
files = [list(prod([i], xrange(lengths))) for i in xrange(len(leafs))]
allfiles = reduce(lambda l,r:l+r,
[list(prod(*files[:(i+1)])) for i in range(len(leafs))])
[list(prod(*files[:(i+1)])) for i in xrange(len(leafs))])
for first in allfiles:
testbasename = 'test{0}_'.format(getid(first))
+1 -1
View File
@@ -22,4 +22,4 @@ SRCDIR=$(dirname $0)
TOPSRCDIR="$SRCDIR"
export OLD_CONFIGURE="$SRCDIR"/old-configure
which python3 > /dev/null && exec python3 "$TOPSRCDIR/configure.py" "$@" || exec python "$TOPSRCDIR/configure.py" "$@"
which python2.7 > /dev/null && exec python2.7 "$TOPSRCDIR/configure.py" "$@" || exec python "$TOPSRCDIR/configure.py" "$@"
+22 -17
View File
@@ -10,11 +10,13 @@ import subprocess
import sys
import textwrap
base_dir = os.path.abspath(os.path.dirname(__file__))
sys.path.insert(0, os.path.join(base_dir, 'python', 'mozbuild'))
from mozbuild.configure import ConfigureSandbox
from mozbuild.util import (
indented_repr,
encode,
)
@@ -34,24 +36,20 @@ def config_status(config):
# Ideally, all the backend and frontend code would handle the booleans, but
# there are so many things involved, that it's easier to keep config.status
# untouched for now.
def sanitized_values(v):
def sanitized_bools(v):
if v is True:
return '1'
if v is False:
return ''
if isinstance(v, dict):
return {key: sanitized_values(value) for key, value in v.items()}
if isinstance(v, (list, tuple)):
return [sanitized_values(value) for value in v]
return v
sanitized_config = {}
sanitized_config['substs'] = {
key: sanitized_values(value) for key, value in config.items()
if key not in ('DEFINES', 'non_global_defines', 'TOPSRCDIR', 'TOPOBJDIR')
k: sanitized_bools(v) for k, v in config.iteritems()
if k not in ('DEFINES', 'non_global_defines', 'TOPSRCDIR', 'TOPOBJDIR')
}
sanitized_config['defines'] = {
key: sanitized_values(value) for key, value in config['DEFINES'].items()
k: sanitized_bools(v) for k, v in config['DEFINES'].iteritems()
}
sanitized_config['non_global_defines'] = config['non_global_defines']
sanitized_config['topsrcdir'] = config['TOPSRCDIR']
@@ -62,16 +60,19 @@ def config_status(config):
# here, when we're able to skip configure tests/use cached results/not rely
# on autoconf.
print("Creating config.status", file=sys.stderr)
with codecs.open('config.status', 'w', encoding='utf-8', errors='replace') as fh:
encoding = 'mbcs' if sys.platform == 'win32' else 'utf-8'
with codecs.open('config.status', 'w', encoding) as fh:
fh.write(textwrap.dedent('''\
#!%(python)s
# coding=%(encoding)s
from __future__ import unicode_literals
''') % {'python': config['PYTHON'], 'encoding': 'utf-8'})
from mozbuild.util import encode
encoding = '%(encoding)s'
''') % {'python': config['PYTHON'], 'encoding': encoding})
# A lot of the build backend code is currently expecting byte
# strings and breaks in subtle ways with unicode strings. (bug 1296508)
for k, v in sanitized_config.items():
fh.write('%s = %s\n' % (k, indented_repr(v)))
for k, v in sanitized_config.iteritems():
fh.write('%s = encode(%s, encoding)\n' % (k, indented_repr(v)))
fh.write("__all__ = ['topobjdir', 'topsrcdir', 'defines', "
"'non_global_defines', 'substs', 'mozconfig']")
@@ -87,14 +88,18 @@ def config_status(config):
# executable permissions.
os.chmod('config.status', 0o755)
if config.get('MOZ_BUILD_APP') != 'js' or config.get('JS_STANDALONE'):
os.environ['WRITE_MOZINFO'] = '1'
os.environ[b'WRITE_MOZINFO'] = b'1'
from mozbuild.config_status import config_status
# Some values in sanitized_config also have more complex types, such as
# EnumString and tuples. Converting string subclasses to plain strings
# and tuples to lists keeps this code path consistent with the
# generated config.status file, which serializes iterables as lists.
return config_status(args=[], **sanitized_config)
# EnumString, which using when calling config_status would currently
# break the build, as well as making it inconsistent with re-running
# config.status. Fortunately, EnumString derives from unicode, so it's
# covered by converting unicode strings.
# A lot of the build backend code is currently expecting byte strings
# and breaks in subtle ways with unicode strings.
return config_status(args=[], **encode(sanitized_config, encoding))
return 0
+1516 -2871
View File
File diff suppressed because it is too large. Load diff
+44 -102
View File
@@ -133,7 +133,7 @@ extern "C" {
**
** Since [version 3.6.18] ([dateof:3.6.18]),
** SQLite source code has been stored in the
** <a href="http://fossil-scm.org/">Fossil configuration management
** <a href="http://www.fossil-scm.org/">Fossil configuration management
** system</a>. ^The SQLITE_SOURCE_ID macro evaluates to
** a string which identifies a particular check-in of SQLite
** within its configuration management system. ^The SQLITE_SOURCE_ID
@@ -146,9 +146,9 @@ extern "C" {
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
** [sqlite_version()] and [sqlite_source_id()].
*/
#define SQLITE_VERSION "3.50.1"
#define SQLITE_VERSION_NUMBER 3050001
#define SQLITE_SOURCE_ID "2025-06-06 14:52:32 b77dc5e0f596d2140d9ac682b2893ff65d3a4140aa86067a3efebe29dc914c95"
#define SQLITE_VERSION "3.49.1"
#define SQLITE_VERSION_NUMBER 3049001
#define SQLITE_SOURCE_ID "2025-02-18 13:38:58 873d4e274b4988d260ba8354a9718324a1c26187a4ab4c1cc0227c03d0f10e70"
/*
** CAPI3REF: Run-Time Library Version Numbers
@@ -1163,12 +1163,6 @@ struct sqlite3_io_methods {
** the value that M is to be set to. Before returning, the 32-bit signed
** integer is overwritten with the previous value of M.
**
** <li>[[SQLITE_FCNTL_BLOCK_ON_CONNECT]]
** The [SQLITE_FCNTL_BLOCK_ON_CONNECT] opcode is used to configure the
** VFS to block when taking a SHARED lock to connect to a wal mode database.
** This is used to implement the functionality associated with
** SQLITE_SETLK_BLOCK_ON_CONNECT.
**
** <li>[[SQLITE_FCNTL_DATA_VERSION]]
** The [SQLITE_FCNTL_DATA_VERSION] opcode is used to detect changes to
** a database file. The argument is a pointer to a 32-bit unsigned integer.
@@ -1265,7 +1259,6 @@ struct sqlite3_io_methods {
#define SQLITE_FCNTL_CKSM_FILE 41
#define SQLITE_FCNTL_RESET_CACHE 42
#define SQLITE_FCNTL_NULL_IO 43
#define SQLITE_FCNTL_BLOCK_ON_CONNECT 44
/* deprecated names */
#define SQLITE_GET_LOCKPROXYFILE SQLITE_FCNTL_GET_LOCKPROXYFILE
@@ -1996,16 +1989,13 @@ struct sqlite3_mem_methods {
**
** [[SQLITE_CONFIG_LOOKASIDE]] <dt>SQLITE_CONFIG_LOOKASIDE</dt>
** <dd> ^(The SQLITE_CONFIG_LOOKASIDE option takes two arguments that determine
** the default size of [lookaside memory] on each [database connection].
** the default size of lookaside memory on each [database connection].
** The first argument is the
** size of each lookaside buffer slot ("sz") and the second is the number of
** slots allocated to each database connection ("cnt").)^
** ^(SQLITE_CONFIG_LOOKASIDE sets the <i>default</i> lookaside size.
** The [SQLITE_DBCONFIG_LOOKASIDE] option to [sqlite3_db_config()] can
** be used to change the lookaside configuration on individual connections.)^
** The [-DSQLITE_DEFAULT_LOOKASIDE] option can be used to change the
** default lookaside configuration at compile-time.
** </dd>
** size of each lookaside buffer slot and the second is the number of
** slots allocated to each database connection.)^ ^(SQLITE_CONFIG_LOOKASIDE
** sets the <i>default</i> lookaside size. The [SQLITE_DBCONFIG_LOOKASIDE]
** option to [sqlite3_db_config()] can be used to change the lookaside
** configuration on individual connections.)^ </dd>
**
** [[SQLITE_CONFIG_PCACHE2]] <dt>SQLITE_CONFIG_PCACHE2</dt>
** <dd> ^(The SQLITE_CONFIG_PCACHE2 option takes a single argument which is
@@ -2242,50 +2232,31 @@ struct sqlite3_mem_methods {
** [[SQLITE_DBCONFIG_LOOKASIDE]]
** <dt>SQLITE_DBCONFIG_LOOKASIDE</dt>
** <dd> The SQLITE_DBCONFIG_LOOKASIDE option is used to adjust the
** configuration of the [lookaside memory allocator] within a database
** configuration of the lookaside memory allocator within a database
** connection.
** The arguments to the SQLITE_DBCONFIG_LOOKASIDE option are <i>not</i>
** in the [DBCONFIG arguments|usual format].
** The SQLITE_DBCONFIG_LOOKASIDE option takes three arguments, not two,
** so that a call to [sqlite3_db_config()] that uses SQLITE_DBCONFIG_LOOKASIDE
** should have a total of five parameters.
** <ol>
** <li><p>The first argument ("buf") is a
** ^The first argument (the third parameter to [sqlite3_db_config()] is a
** pointer to a memory buffer to use for lookaside memory.
** The first argument may be NULL in which case SQLite will allocate the
** lookaside buffer itself using [sqlite3_malloc()].
** <li><P>The second argument ("sz") is the
** size of each lookaside buffer slot. Lookaside is disabled if "sz"
** is less than 8. The "sz" argument should be a multiple of 8 less than
** 65536. If "sz" does not meet this constraint, it is reduced in size until
** it does.
** <li><p>The third argument ("cnt") is the number of slots. Lookaside is disabled
** if "cnt"is less than 1. The "cnt" value will be reduced, if necessary, so
** that the product of "sz" and "cnt" does not exceed 2,147,418,112. The "cnt"
** parameter is usually chosen so that the product of "sz" and "cnt" is less
** than 1,000,000.
** </ol>
** <p>If the "buf" argument is not NULL, then it must
** point to a memory buffer with a size that is greater than
** or equal to the product of "sz" and "cnt".
** The buffer must be aligned to an 8-byte boundary.
** The lookaside memory
** ^The first argument after the SQLITE_DBCONFIG_LOOKASIDE verb
** may be NULL in which case SQLite will allocate the
** lookaside buffer itself using [sqlite3_malloc()]. ^The second argument is the
** size of each lookaside buffer slot. ^The third argument is the number of
** slots. The size of the buffer in the first argument must be greater than
** or equal to the product of the second and third arguments. The buffer
** must be aligned to an 8-byte boundary. ^If the second argument to
** SQLITE_DBCONFIG_LOOKASIDE is not a multiple of 8, it is internally
** rounded down to the next smaller multiple of 8. ^(The lookaside memory
** configuration for a database connection can only be changed when that
** connection is not currently using lookaside memory, or in other words
** when the value returned by [SQLITE_DBSTATUS_LOOKASIDE_USED] is zero.
** when the "current value" returned by
** [sqlite3_db_status](D,[SQLITE_DBSTATUS_LOOKASIDE_USED],...) is zero.
** Any attempt to change the lookaside memory configuration when lookaside
** memory is in use leaves the configuration unchanged and returns
** [SQLITE_BUSY].
** If the "buf" argument is NULL and an attempt
** to allocate memory based on "sz" and "cnt" fails, then
** lookaside is silently disabled.
** <p>
** The [SQLITE_CONFIG_LOOKASIDE] configuration option can be used to set the
** default lookaside configuration at initialization. The
** [-DSQLITE_DEFAULT_LOOKASIDE] option can be used to set the default lookaside
** configuration at compile-time. Typical values for lookaside are 1200 for
** "sz" and 40 to 100 for "cnt".
** </dd>
** [SQLITE_BUSY].)^</dd>
**
** [[SQLITE_DBCONFIG_ENABLE_FKEY]]
** <dt>SQLITE_DBCONFIG_ENABLE_FKEY</dt>
@@ -3022,44 +2993,6 @@ SQLITE_API int sqlite3_busy_handler(sqlite3*,int(*)(void*,int),void*);
*/
SQLITE_API int sqlite3_busy_timeout(sqlite3*, int ms);
/*
** CAPI3REF: Set the Setlk Timeout
** METHOD: sqlite3
**
** This routine is only useful in SQLITE_ENABLE_SETLK_TIMEOUT builds. If
** the VFS supports blocking locks, it sets the timeout in ms used by
** eligible locks taken on wal mode databases by the specified database
** handle. In non-SQLITE_ENABLE_SETLK_TIMEOUT builds, or if the VFS does
** not support blocking locks, this function is a no-op.
**
** Passing 0 to this function disables blocking locks altogether. Passing
** -1 to this function requests that the VFS blocks for a long time -
** indefinitely if possible. The results of passing any other negative value
** are undefined.
**
** Internally, each SQLite database handle store two timeout values - the
** busy-timeout (used for rollback mode databases, or if the VFS does not
** support blocking locks) and the setlk-timeout (used for blocking locks
** on wal-mode databases). The sqlite3_busy_timeout() method sets both
** values, this function sets only the setlk-timeout value. Therefore,
** to configure separate busy-timeout and setlk-timeout values for a single
** database handle, call sqlite3_busy_timeout() followed by this function.
**
** Whenever the number of connections to a wal mode database falls from
** 1 to 0, the last connection takes an exclusive lock on the database,
** then checkpoints and deletes the wal file. While it is doing this, any
** new connection that tries to read from the database fails with an
** SQLITE_BUSY error. Or, if the SQLITE_SETLK_BLOCK_ON_CONNECT flag is
** passed to this API, the new connection blocks until the exclusive lock
** has been released.
*/
SQLITE_API int sqlite3_setlk_timeout(sqlite3*, int ms, int flags);
/*
** CAPI3REF: Flags for sqlite3_setlk_timeout()
*/
#define SQLITE_SETLK_BLOCK_ON_CONNECT 0x01
/*
** CAPI3REF: Convenience Routines For Running Queries
** METHOD: sqlite3
@@ -5175,7 +5108,7 @@ SQLITE_API const void *sqlite3_column_decltype16(sqlite3_stmt*,int);
** other than [SQLITE_ROW] before any subsequent invocation of
** sqlite3_step(). Failure to reset the prepared statement using
** [sqlite3_reset()] would result in an [SQLITE_MISUSE] return from
** sqlite3_step(). But after [version 3.6.23.1] ([dateof:3.6.23.1]),
** sqlite3_step(). But after [version 3.6.23.1] ([dateof:3.6.23.1],
** sqlite3_step() began
** calling [sqlite3_reset()] automatically in this circumstance rather
** than returning [SQLITE_MISUSE]. This is not considered a compatibility
@@ -7071,8 +7004,6 @@ SQLITE_API int sqlite3_autovacuum_pages(
**
** ^The second argument is a pointer to the function to invoke when a
** row is updated, inserted or deleted in a rowid table.
** ^The update hook is disabled by invoking sqlite3_update_hook()
** with a NULL pointer as the second parameter.
** ^The first argument to the callback is a copy of the third argument
** to sqlite3_update_hook().
** ^The second callback argument is one of [SQLITE_INSERT], [SQLITE_DELETE],
@@ -11555,10 +11486,9 @@ SQLITE_API void sqlite3session_table_filter(
** is inserted while a session object is enabled, then later deleted while
** the same session object is disabled, no INSERT record will appear in the
** changeset, even though the delete took place while the session was disabled.
** Or, if one field of a row is updated while a session is enabled, and
** then another field of the same row is updated while the session is disabled,
** the resulting changeset will contain an UPDATE change that updates both
** fields.
** Or, if one field of a row is updated while a session is disabled, and
** another field of the same row is updated while the session is enabled, the
** resulting changeset will contain an UPDATE change that updates both fields.
*/
SQLITE_API int sqlite3session_changeset(
sqlite3_session *pSession, /* Session object */
@@ -11630,9 +11560,8 @@ SQLITE_API sqlite3_int64 sqlite3session_changeset_size(sqlite3_session *pSession
** database zFrom the contents of the two compatible tables would be
** identical.
**
** Unless the call to this function is a no-op as described above, it is an
** error if database zFrom does not exist or does not contain the required
** compatible table.
** It an error if database zFrom does not exist or does not contain the
** required compatible table.
**
** If the operation is successful, SQLITE_OK is returned. Otherwise, an SQLite
** error code. In this case, if argument pzErrMsg is not NULL, *pzErrMsg
@@ -11767,7 +11696,7 @@ SQLITE_API int sqlite3changeset_start_v2(
** The following flags may passed via the 4th parameter to
** [sqlite3changeset_start_v2] and [sqlite3changeset_start_v2_strm]:
**
** <dt>SQLITE_CHANGESETSTART_INVERT <dd>
** <dt>SQLITE_CHANGESETAPPLY_INVERT <dd>
** Invert the changeset while iterating through it. This is equivalent to
** inverting a changeset using sqlite3changeset_invert() before applying it.
** It is an error to specify this flag with a patchset.
@@ -12082,6 +12011,19 @@ SQLITE_API int sqlite3changeset_concat(
void **ppOut /* OUT: Buffer containing output changeset */
);
/*
** CAPI3REF: Upgrade the Schema of a Changeset/Patchset
*/
SQLITE_API int sqlite3changeset_upgrade(
sqlite3 *db,
const char *zDb,
int nIn, const void *pIn, /* Input changeset */
int *pnOut, void **ppOut /* OUT: Inverse of input */
);
/*
** CAPI3REF: Changegroup Handle
**
+161 -161
View File
@@ -2397,7 +2397,7 @@ var Debugger =
/***/ function(module, exports, __webpack_require__) {
/* 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,
* 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/. */
var React = __webpack_require__(2);
@@ -30019,166 +30019,166 @@ var Debugger =
/* 266 */
/***/ function(module, exports, __webpack_require__) {
(function(){
var crypt = __webpack_require__(267),
utf8 = __webpack_require__(268).utf8,
isBuffer = __webpack_require__(269),
bin = __webpack_require__(268).bin,
// The core
md5 = function (message, options) {
// Convert to byte array
if (message.constructor == String)
if (options && options.encoding === 'binary')
message = bin.stringToBytes(message);
else
message = utf8.stringToBytes(message);
else if (isBuffer(message))
message = Array.prototype.slice.call(message, 0);
else if (!Array.isArray(message))
message = message.toString();
// else, assume byte array already
var m = crypt.bytesToWords(message),
l = message.length * 8,
a = 1732584193,
b = -271733879,
c = -1732584194,
d = 271733878;
// Swap endian
for (var i = 0; i < m.length; i++) {
m[i] = ((m[i] << 8) | (m[i] >>> 24)) & 0x00FF00FF |
((m[i] << 24) | (m[i] >>> 8)) & 0xFF00FF00;
}
// Padding
m[l >>> 5] |= 0x80 << (l % 32);
m[(((l + 64) >>> 9) << 4) + 14] = l;
// Method shortcuts
var FF = md5._ff,
GG = md5._gg,
HH = md5._hh,
II = md5._ii;
for (var i = 0; i < m.length; i += 16) {
var aa = a,
bb = b,
cc = c,
dd = d;
a = FF(a, b, c, d, m[i+ 0], 7, -680876936);
d = FF(d, a, b, c, m[i+ 1], 12, -389564586);
c = FF(c, d, a, b, m[i+ 2], 17, 606105819);
b = FF(b, c, d, a, m[i+ 3], 22, -1044525330);
a = FF(a, b, c, d, m[i+ 4], 7, -176418897);
d = FF(d, a, b, c, m[i+ 5], 12, 1200080426);
c = FF(c, d, a, b, m[i+ 6], 17, -1473231341);
b = FF(b, c, d, a, m[i+ 7], 22, -45705983);
a = FF(a, b, c, d, m[i+ 8], 7, 1770035416);
d = FF(d, a, b, c, m[i+ 9], 12, -1958414417);
c = FF(c, d, a, b, m[i+10], 17, -42063);
b = FF(b, c, d, a, m[i+11], 22, -1990404162);
a = FF(a, b, c, d, m[i+12], 7, 1804603682);
d = FF(d, a, b, c, m[i+13], 12, -40341101);
c = FF(c, d, a, b, m[i+14], 17, -1502002290);
b = FF(b, c, d, a, m[i+15], 22, 1236535329);
a = GG(a, b, c, d, m[i+ 1], 5, -165796510);
d = GG(d, a, b, c, m[i+ 6], 9, -1069501632);
c = GG(c, d, a, b, m[i+11], 14, 643717713);
b = GG(b, c, d, a, m[i+ 0], 20, -373897302);
a = GG(a, b, c, d, m[i+ 5], 5, -701558691);
d = GG(d, a, b, c, m[i+10], 9, 38016083);
c = GG(c, d, a, b, m[i+15], 14, -660478335);
b = GG(b, c, d, a, m[i+ 4], 20, -405537848);
a = GG(a, b, c, d, m[i+ 9], 5, 568446438);
d = GG(d, a, b, c, m[i+14], 9, -1019803690);
c = GG(c, d, a, b, m[i+ 3], 14, -187363961);
b = GG(b, c, d, a, m[i+ 8], 20, 1163531501);
a = GG(a, b, c, d, m[i+13], 5, -1444681467);
d = GG(d, a, b, c, m[i+ 2], 9, -51403784);
c = GG(c, d, a, b, m[i+ 7], 14, 1735328473);
b = GG(b, c, d, a, m[i+12], 20, -1926607734);
a = HH(a, b, c, d, m[i+ 5], 4, -378558);
d = HH(d, a, b, c, m[i+ 8], 11, -2022574463);
c = HH(c, d, a, b, m[i+11], 16, 1839030562);
b = HH(b, c, d, a, m[i+14], 23, -35309556);
a = HH(a, b, c, d, m[i+ 1], 4, -1530992060);
d = HH(d, a, b, c, m[i+ 4], 11, 1272893353);
c = HH(c, d, a, b, m[i+ 7], 16, -155497632);
b = HH(b, c, d, a, m[i+10], 23, -1094730640);
a = HH(a, b, c, d, m[i+13], 4, 681279174);
d = HH(d, a, b, c, m[i+ 0], 11, -358537222);
c = HH(c, d, a, b, m[i+ 3], 16, -722521979);
b = HH(b, c, d, a, m[i+ 6], 23, 76029189);
a = HH(a, b, c, d, m[i+ 9], 4, -640364487);
d = HH(d, a, b, c, m[i+12], 11, -421815835);
c = HH(c, d, a, b, m[i+15], 16, 530742520);
b = HH(b, c, d, a, m[i+ 2], 23, -995338651);
a = II(a, b, c, d, m[i+ 0], 6, -198630844);
d = II(d, a, b, c, m[i+ 7], 10, 1126891415);
c = II(c, d, a, b, m[i+14], 15, -1416354905);
b = II(b, c, d, a, m[i+ 5], 21, -57434055);
a = II(a, b, c, d, m[i+12], 6, 1700485571);
d = II(d, a, b, c, m[i+ 3], 10, -1894986606);
c = II(c, d, a, b, m[i+10], 15, -1051523);
b = II(b, c, d, a, m[i+ 1], 21, -2054922799);
a = II(a, b, c, d, m[i+ 8], 6, 1873313359);
d = II(d, a, b, c, m[i+15], 10, -30611744);
c = II(c, d, a, b, m[i+ 6], 15, -1560198380);
b = II(b, c, d, a, m[i+13], 21, 1309151649);
a = II(a, b, c, d, m[i+ 4], 6, -145523070);
d = II(d, a, b, c, m[i+11], 10, -1120210379);
c = II(c, d, a, b, m[i+ 2], 15, 718787259);
b = II(b, c, d, a, m[i+ 9], 21, -343485551);
a = (a + aa) >>> 0;
b = (b + bb) >>> 0;
c = (c + cc) >>> 0;
d = (d + dd) >>> 0;
}
return crypt.endian([a, b, c, d]);
};
// Auxiliary functions
md5._ff = function (a, b, c, d, x, s, t) {
var n = a + (b & c | ~b & d) + (x >>> 0) + t;
return ((n << s) | (n >>> (32 - s))) + b;
};
md5._gg = function (a, b, c, d, x, s, t) {
var n = a + (b & d | c & ~d) + (x >>> 0) + t;
return ((n << s) | (n >>> (32 - s))) + b;
};
md5._hh = function (a, b, c, d, x, s, t) {
var n = a + (b ^ c ^ d) + (x >>> 0) + t;
return ((n << s) | (n >>> (32 - s))) + b;
};
md5._ii = function (a, b, c, d, x, s, t) {
var n = a + (c ^ (b | ~d)) + (x >>> 0) + t;
return ((n << s) | (n >>> (32 - s))) + b;
};
// Package private blocksize
md5._blocksize = 16;
md5._digestsize = 16;
module.exports = function (message, options) {
if (message === undefined || message === null)
throw new Error('Illegal argument ' + message);
var digestbytes = crypt.wordsToBytes(md5(message, options));
return options && options.asBytes ? digestbytes :
options && options.asString ? bin.bytesToString(digestbytes) :
crypt.bytesToHex(digestbytes);
};
})();
(function(){
var crypt = __webpack_require__(267),
utf8 = __webpack_require__(268).utf8,
isBuffer = __webpack_require__(269),
bin = __webpack_require__(268).bin,
// The core
md5 = function (message, options) {
// Convert to byte array
if (message.constructor == String)
if (options && options.encoding === 'binary')
message = bin.stringToBytes(message);
else
message = utf8.stringToBytes(message);
else if (isBuffer(message))
message = Array.prototype.slice.call(message, 0);
else if (!Array.isArray(message))
message = message.toString();
// else, assume byte array already
var m = crypt.bytesToWords(message),
l = message.length * 8,
a = 1732584193,
b = -271733879,
c = -1732584194,
d = 271733878;
// Swap endian
for (var i = 0; i < m.length; i++) {
m[i] = ((m[i] << 8) | (m[i] >>> 24)) & 0x00FF00FF |
((m[i] << 24) | (m[i] >>> 8)) & 0xFF00FF00;
}
// Padding
m[l >>> 5] |= 0x80 << (l % 32);
m[(((l + 64) >>> 9) << 4) + 14] = l;
// Method shortcuts
var FF = md5._ff,
GG = md5._gg,
HH = md5._hh,
II = md5._ii;
for (var i = 0; i < m.length; i += 16) {
var aa = a,
bb = b,
cc = c,
dd = d;
a = FF(a, b, c, d, m[i+ 0], 7, -680876936);
d = FF(d, a, b, c, m[i+ 1], 12, -389564586);
c = FF(c, d, a, b, m[i+ 2], 17, 606105819);
b = FF(b, c, d, a, m[i+ 3], 22, -1044525330);
a = FF(a, b, c, d, m[i+ 4], 7, -176418897);
d = FF(d, a, b, c, m[i+ 5], 12, 1200080426);
c = FF(c, d, a, b, m[i+ 6], 17, -1473231341);
b = FF(b, c, d, a, m[i+ 7], 22, -45705983);
a = FF(a, b, c, d, m[i+ 8], 7, 1770035416);
d = FF(d, a, b, c, m[i+ 9], 12, -1958414417);
c = FF(c, d, a, b, m[i+10], 17, -42063);
b = FF(b, c, d, a, m[i+11], 22, -1990404162);
a = FF(a, b, c, d, m[i+12], 7, 1804603682);
d = FF(d, a, b, c, m[i+13], 12, -40341101);
c = FF(c, d, a, b, m[i+14], 17, -1502002290);
b = FF(b, c, d, a, m[i+15], 22, 1236535329);
a = GG(a, b, c, d, m[i+ 1], 5, -165796510);
d = GG(d, a, b, c, m[i+ 6], 9, -1069501632);
c = GG(c, d, a, b, m[i+11], 14, 643717713);
b = GG(b, c, d, a, m[i+ 0], 20, -373897302);
a = GG(a, b, c, d, m[i+ 5], 5, -701558691);
d = GG(d, a, b, c, m[i+10], 9, 38016083);
c = GG(c, d, a, b, m[i+15], 14, -660478335);
b = GG(b, c, d, a, m[i+ 4], 20, -405537848);
a = GG(a, b, c, d, m[i+ 9], 5, 568446438);
d = GG(d, a, b, c, m[i+14], 9, -1019803690);
c = GG(c, d, a, b, m[i+ 3], 14, -187363961);
b = GG(b, c, d, a, m[i+ 8], 20, 1163531501);
a = GG(a, b, c, d, m[i+13], 5, -1444681467);
d = GG(d, a, b, c, m[i+ 2], 9, -51403784);
c = GG(c, d, a, b, m[i+ 7], 14, 1735328473);
b = GG(b, c, d, a, m[i+12], 20, -1926607734);
a = HH(a, b, c, d, m[i+ 5], 4, -378558);
d = HH(d, a, b, c, m[i+ 8], 11, -2022574463);
c = HH(c, d, a, b, m[i+11], 16, 1839030562);
b = HH(b, c, d, a, m[i+14], 23, -35309556);
a = HH(a, b, c, d, m[i+ 1], 4, -1530992060);
d = HH(d, a, b, c, m[i+ 4], 11, 1272893353);
c = HH(c, d, a, b, m[i+ 7], 16, -155497632);
b = HH(b, c, d, a, m[i+10], 23, -1094730640);
a = HH(a, b, c, d, m[i+13], 4, 681279174);
d = HH(d, a, b, c, m[i+ 0], 11, -358537222);
c = HH(c, d, a, b, m[i+ 3], 16, -722521979);
b = HH(b, c, d, a, m[i+ 6], 23, 76029189);
a = HH(a, b, c, d, m[i+ 9], 4, -640364487);
d = HH(d, a, b, c, m[i+12], 11, -421815835);
c = HH(c, d, a, b, m[i+15], 16, 530742520);
b = HH(b, c, d, a, m[i+ 2], 23, -995338651);
a = II(a, b, c, d, m[i+ 0], 6, -198630844);
d = II(d, a, b, c, m[i+ 7], 10, 1126891415);
c = II(c, d, a, b, m[i+14], 15, -1416354905);
b = II(b, c, d, a, m[i+ 5], 21, -57434055);
a = II(a, b, c, d, m[i+12], 6, 1700485571);
d = II(d, a, b, c, m[i+ 3], 10, -1894986606);
c = II(c, d, a, b, m[i+10], 15, -1051523);
b = II(b, c, d, a, m[i+ 1], 21, -2054922799);
a = II(a, b, c, d, m[i+ 8], 6, 1873313359);
d = II(d, a, b, c, m[i+15], 10, -30611744);
c = II(c, d, a, b, m[i+ 6], 15, -1560198380);
b = II(b, c, d, a, m[i+13], 21, 1309151649);
a = II(a, b, c, d, m[i+ 4], 6, -145523070);
d = II(d, a, b, c, m[i+11], 10, -1120210379);
c = II(c, d, a, b, m[i+ 2], 15, 718787259);
b = II(b, c, d, a, m[i+ 9], 21, -343485551);
a = (a + aa) >>> 0;
b = (b + bb) >>> 0;
c = (c + cc) >>> 0;
d = (d + dd) >>> 0;
}
return crypt.endian([a, b, c, d]);
};
// Auxiliary functions
md5._ff = function (a, b, c, d, x, s, t) {
var n = a + (b & c | ~b & d) + (x >>> 0) + t;
return ((n << s) | (n >>> (32 - s))) + b;
};
md5._gg = function (a, b, c, d, x, s, t) {
var n = a + (b & d | c & ~d) + (x >>> 0) + t;
return ((n << s) | (n >>> (32 - s))) + b;
};
md5._hh = function (a, b, c, d, x, s, t) {
var n = a + (b ^ c ^ d) + (x >>> 0) + t;
return ((n << s) | (n >>> (32 - s))) + b;
};
md5._ii = function (a, b, c, d, x, s, t) {
var n = a + (c ^ (b | ~d)) + (x >>> 0) + t;
return ((n << s) | (n >>> (32 - s))) + b;
};
// Package private blocksize
md5._blocksize = 16;
md5._digestsize = 16;
module.exports = function (message, options) {
if (message === undefined || message === null)
throw new Error('Illegal argument ' + message);
var digestbytes = crypt.wordsToBytes(md5(message, options));
return options && options.asBytes ? digestbytes :
options && options.asString ? bin.bytesToString(digestbytes) :
crypt.bytesToHex(digestbytes);
};
})();
/***/ },
+14
View File
@@ -612,6 +612,7 @@ menuseparator {
}
.autocomplete .results * {
-moz-user-select: none;
user-select: none;
}
@@ -772,6 +773,7 @@ menuseparator {
}
.tree {
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
-o-user-select: none;
user-select: none;
@@ -818,6 +820,7 @@ html[dir="rtl"] .tree .node > div {
}
.sources-panel * {
-moz-user-select: none;
user-select: none;
}
@@ -831,6 +834,7 @@ html[dir="rtl"] .tree .node > div {
display: flex;
align-items: baseline;
justify-content: space-between;
-moz-user-select: none;
user-select: none;
}
@@ -912,6 +916,7 @@ html[dir="rtl"] .worker svg {
.tree {
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
-o-user-select: none;
user-select: none;
@@ -961,6 +966,7 @@ html[dir="rtl"] .worker svg {
right: 1px;
opacity: 1;
z-index: 100;
-moz-user-select: none;
user-select: none;
}
@@ -973,6 +979,7 @@ html[dir="rtl"] .source-footer .command-bar {
}
.source-footer .command-bar * {
-moz-user-select: none;
user-select: none;
}
@@ -1179,6 +1186,7 @@ html[dir="rtl"] .editor-mount {
background-color: var(--theme-tab-toolbar-background);
font-weight: lighter;
z-index: 100;
-moz-user-select: none;
user-select: none;
}
@@ -1205,6 +1213,7 @@ html[dir="rtl"] .editor-mount {
outline-width: 0;
}
.breakpoints-list * {
-moz-user-select: none;
user-select: none;
}
@@ -1387,6 +1396,7 @@ html .arrow.expanded svg {
*/
.frames ul li * {
-moz-user-select: none;
user-select: none;
}
@@ -1439,6 +1449,7 @@ html .arrow.expanded svg {
width: 100%;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
-o-user-select: none;
user-select: none;
@@ -1464,6 +1475,7 @@ html .arrow.expanded svg {
}
.right-siderbar * {
-moz-user-select: none;
user-select: none;
}
@@ -1538,6 +1550,7 @@ html[dir="rtl"] .command-bar .stepOut {
font-style: italic;
text-align: center;
padding: 0.5em;
-moz-user-select: none;
user-select: none;
}
@@ -1559,6 +1572,7 @@ span.pause-exceptions.all {
}
.source-header * {
-moz-user-select: none;
user-select: none;
}
+1 -1
View File
@@ -2,7 +2,7 @@
* 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/. */
:root{
user-select: none;
-moz-user-select: none;
}
#options-panel-container {
Loaded 100 of 12456 files, more files were not shown because too many files have changed in this diff. Show more