Commit graph

8 commits

Author SHA1 Message Date
CarePackage17
f682f9d6f5
Enable LinuxSampler to be used on Android (#37784)
This enables `background_hang_monitor` to work on Android. Relevant
Zulip thread: [#general > Android stack walking questions @
💬](https://servo.zulipchat.com/#narrow/channel/263398-general/topic/Android.20stack.20walking.20questions/near/526369883)


Testing: Manually tested on a Pixel 6a with Android 16 with following
page:
```html
<!DOCTYPE html>
<html>
    <head>
        <title>Infinite Loop Test</title>
    </head>
    <body>
        Will it print? That is the question.
    </body>
    <script>
        console.log("hello. you're about to loop infinitely.");

        while (true) {
            //do nothing, just block the thread
        }
    </script>
</html>
```
Fixes: #23136

---------

Signed-off-by: CarePackage17 <5157010+CarePackage17@users.noreply.github.com>
2025-06-30 17:17:50 +00:00
Josh Matthews
6b12499077
Only compile platform samplers when cargo feature enabled (#35312)
* background_hang_monitor: Only compile platform samplers when cargo feature enabled.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

* background_hang_monitor: Make nix dependency optional.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

---------

Signed-off-by: Josh Matthews <josh@joshmatthews.net>
2025-02-06 06:53:08 +00:00
A. Wilcox
0e56241c1b
background_hang_monitor: Add musl compatibility (#33153)
musl does not have libunwind readily available; even if it did, it has
no concept of ucontext (needing an external lib).  Similar to ohos,
disable the background hang monitor and use the DummySampler.

Signed-off-by: A. Wilcox <AWilcox@Wilcox-Tech.com>
2024-08-21 21:38:28 +00:00
Jonathan Schwender
3aef023368
ohos: Fix x86_64-unknown-linux-ohos (#33029)
* ohos: Fix compilation for x86_64

Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>

* ohos: Use the SDK compiler-wrapper

When compiling for x86_64-unknown-linux-ohos without the compiler
wrapper, for some reason mozjs_sys will be refercing a wrong mangled symbol
resulting in the following error when loading the .so at runtime:

```
_ZNSt3__111this_thread9sleep_forERKNS_6chrono8durationIxNS_5ratioILl1ELl1000000000EEEEE: symbol not found
```

This problem does not occur when compiling for aarch64 or when using the compiler wrapper.
In this case the correct symbol
`_ZNSt4__n111this_thread9sleep_forERKNS_6chrono8durationIxNS_5ratioILl1ELl1000000000EEEEE`
is referenced.
It's unclear why manually passing the flags via CFLAGS / CXXFLAGS does not work.

Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>

---------

Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
2024-08-14 01:30:04 +00:00
Samson
711dbbd4af
remove extern crate (#30311)
* remove extern crate

* Update components/script_plugins/lib.rs

Co-authored-by: Martin Robinson <mrobinson@igalia.com>

---------

Co-authored-by: Martin Robinson <mrobinson@igalia.com>
2023-09-08 12:11:31 +00:00
Gregory Terzian
7bc29205ef add linux sampler 2019-03-29 23:05:44 -04:00
Jan Andre Ikenmeyer
f1f409ffb6
Update MPL license to https (part 5) 2018-11-27 19:09:17 +01:00
Gregory Terzian
4eb785cdc0 introduce a background-hang-monitor:
Mac-Os implementation of a thread sampler,
Linux and Windows skeleton implementations.
2018-11-26 14:15:33 +08:00