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 fba87e0
Browse filesBrowse the repository at this point in the historyBrowse files
- Remove the canary GC epilogue callback only if it was added: a
bootstrap that fails before ObjectManager::Init unwinds through
ReleaseAllRegistered.
- Resolve a fresh Java->JS argument again under the lock in canary mode:
a settle may have released its id after another thread wrapped and
dropped the object.
- Send every recorded id to the weakening batch, and treat a failed
batch's ids as weak: Java may have weakened some before failing.
- Stop AdoptCanary once its record is gone.
- Keep the lifetime watcher alive across a failure to report.
- Stop CallJSMethodNative overwriting a constructed instance's class with
a local ref of com.tns.Runtime's class; registration already records
the instance's class.
- Docs: where states are let go of, what weakened counts, which wrappers
refuse freeze, and <unknown> class names.
Copy file name to clipboardExpand all lines: docs/ns-builtin-modules.md
+9-5Lines changed: 9 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -104,7 +104,7 @@ wrapper.
104
104
|`setConfig(key, value)`| Sets a runtime config key. Throws `TypeError` on an unknown key, an invalid value, or (for process-wide keys) when called from a worker isolate. |
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
-
|`getWrapperClassCounts()`| Per Java class name, the calling isolate's live `wrappers`, the `canaries` among them and the canary `states` (see [Wrapper lifetime](#wrapper-lifetime)). |
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` (see [Wrapper lifetime](#wrapper-lifetime)). |
108
108
|`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)). |
109
109
110
110
*Platform note (Android):* the original exception is the Java throwable `x`
@@ -192,8 +192,9 @@ every build on cold paths only:
192
192
|`canaryRebuilds`|`"canary"` only: canaries built anew for a JS-extended instance whose previous canary died while Java kept the object |
193
193
194
194
In `"canary"` mode, `weakened` counts objects held weakly because their
195
-
canary died while they had JS state, and `collected` counts canaries whose
196
-
object had none, which Java no longer holds for JS.
195
+
canary died while they had a record (JS state, or a JS-extended instance),
196
+
and `collected` counts canaries whose object had none, which Java no longer
197
+
holds for JS.
197
198
198
199
`"canary"` is the resurrection-free model the iOS runtime and the Node-API
199
200
runtimes share. A wrapper in scope is a canary: a phantom-weak JS object that
@@ -210,7 +211,9 @@ dies with its JS references.
210
211
-**Java's side.** While a canary is alive, Java holds its object strongly.
211
212
When it dies, Java holds an object with state weakly and releases any other.
212
213
A thread watching those weak references tells the runtime when Java collects
213
-
an object, and its state is let go of on the runtime's thread.
214
+
an object, and its state is let go of under the isolate's lock: on the
0 commit comments