You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit ecf2ebb
Browse filesBrowse the repository at this point in the historyBrowse files
build(runtime): build the leak probe into debug runtimes only
LeakProbe.cpp and the ObjectManager accessor it reads are compiled only
with APPLICATION_IN_DEBUG, next to the inspector sources, so the release
runtime carries none of it. ns:runtime keeps findLeakCycles in every
build; in a release build it throws. The "wrapperLifetime": {
"leakProbe": true } opt-in is gone: a release build has no probe to
enable.
Copy file name to clipboardExpand all lines: docs/ns-builtin-modules.md
+3-4Lines changed: 3 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -105,7 +105,7 @@ wrapper.
105
105
|`getConfig(key)`| Returns the current value of a config key. Throws `TypeError` on an unknown key. Readable from any isolate. |
106
106
|`getWrapperLifetimeStats()`| Wrapper lifetime counters for the calling isolate (see [Wrapper lifetime](#wrapper-lifetime)). A fresh object on every call. |
107
107
|`getWrapperClassCounts()`| Per Java class name (`<unknown>` for a link whose class was never recorded), the calling isolate's live `wrappers`, the `canaries` among them and the canary `states`, which include those made only for a weak-collection key (see [Wrapper lifetime](#wrapper-lifetime)). |
108
-
|`findLeakCycles()`| Experimental and slow, debuggable builds or `"wrapperLifetime": { "leakProbe": true }` only: joins a V8 heap snapshot and a Java heap dump to find the JS ↔ Java cycles canary mode keeps alive (see [Wrapper lifetime](#wrapper-lifetime)). |
108
+
|`findLeakCycles()`| Experimental and slow, debug builds only (release builds throw): joins a V8 heap snapshot and a Java heap dump to find the JS ↔ Java cycles canary mode keeps alive (see [Wrapper lifetime](#wrapper-lifetime)). |
109
109
|`escapeException(x)`| Returns an `Error` branded so that, when it is thrown back across a native callback boundary, the native caller receives the original native exception `x` carries rather than the runtime's wrapper exception. Idempotent: a branded error is returned unchanged. Throws `TypeError` when called with no argument. The global `interop.escapeException` is this same function (see [Legacy globals](#legacy-globals)). |
110
110
111
111
*Platform note (Android):* the original exception is the Java throwable `x`
@@ -280,9 +280,8 @@ twice before the dump, so objects only weak entries hold are gone and not
280
280
counted. In `"resurrecting"` mode the report is empty and no dump is taken:
281
281
resurrection breaks these cycles.
282
282
283
-
The probe is available in debuggable builds, or with
284
-
`"wrapperLifetime": { "leakProbe": true }` in the app config; elsewhere it
285
-
throws. It suspends the whole process for the dump, writes the Java heap to
283
+
The probe is built into debug runtimes only; in a release build the function
284
+
exists but throws `findLeakCycles is available in debug builds only`. It suspends the whole process for the dump, writes the Java heap to
286
285
the app's cache directory (deleted once parsed, and swept by the next probe if
287
286
the process died first) and builds graphs of both heaps in native memory, so
288
287
it takes seconds; on the main thread that can trip an ANR. The snapshot and
0 commit comments