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
Copy file name to clipboardExpand all lines: docs/Deep Dive/Architecture/JSWrappers.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -190,6 +190,7 @@ bool JSStyleSheetOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> han
190
190
```
191
191
192
192
Generally, using opaque roots as a way of keeping JavaScript wrappers involve two steps:
193
+
193
194
1. Add opaque roots in `visitAdditionalChildren`.
194
195
2. Return true in `isReachableFromOpaqueRoots` when relevant opaque roots are found.
195
196
@@ -242,6 +243,7 @@ The second step can be achived by adding `CustomIsReachable` to the IDL file and
242
243
implementing `JS*Owner::isReachableFromOpaqueRoots` in JS*Custom.cpp file.
243
244
Alternatively and more preferably, `GenerateIsReachable` can be added to IDL file to automatically generate this code
244
245
with the following values:
246
+
245
247
* No value - Adds the result of calling `root(T*)` on the underlying C++ object of type T as the opaque root.
246
248
* `Impl` - Adds the underlying C++ object as the opaque root.
247
249
* `ReachableFromDOMWindow` - Adds a [`DOMWindow`](https://github.com/WebKit/WebKit/blob/main/Source/WebCore/page/DOMWindow.h)
@@ -323,10 +325,12 @@ There are a few ways to create a pending activity on an [active DOM objects](htt
323
325
324
326
When the relevant Web standards says to [queue a task](https://html.spec.whatwg.org/multipage/webappapis.html#queue-a-task) to do some work,
325
327
one of the following member functions of [`ActiveDOMObject`](https://github.com/WebKit/WebKit/blob/main/Source/WebCore/dom/ActiveDOMObject.h) should be used:
0 commit comments