Skip to content

Commit 20b5398

Browse files
committed
Fix broken lists in JSWrappers.md and MemoryManagement.md
1 parent 818ec1e commit 20b5398

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

docs/Deep Dive/Architecture/JSWrappers.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ bool JSStyleSheetOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> han
190190
```
191191
192192
Generally, using opaque roots as a way of keeping JavaScript wrappers involve two steps:
193+
193194
1. Add opaque roots in `visitAdditionalChildren`.
194195
2. Return true in `isReachableFromOpaqueRoots` when relevant opaque roots are found.
195196
@@ -242,6 +243,7 @@ The second step can be achived by adding `CustomIsReachable` to the IDL file and
242243
implementing `JS*Owner::isReachableFromOpaqueRoots` in JS*Custom.cpp file.
243244
Alternatively and more preferably, `GenerateIsReachable` can be added to IDL file to automatically generate this code
244245
with the following values:
246+
245247
* No value - Adds the result of calling `root(T*)` on the underlying C++ object of type T as the opaque root.
246248
* `Impl` - Adds the underlying C++ object as the opaque root.
247249
* `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
323325
324326
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,
325327
one of the following member functions of [`ActiveDOMObject`](https://github.com/WebKit/WebKit/blob/main/Source/WebCore/dom/ActiveDOMObject.h) should be used:
328+
326329
* [`queueTaskKeepingObjectAlive`](https://github.com/WebKit/WebKit/blob/64cdede660d9eaea128fd151281f4715851c4fe2/Source/WebCore/dom/ActiveDOMObject.h#L106)
327330
* [`queueCancellableTaskKeepingObjectAlive`](https://github.com/WebKit/WebKit/blob/64cdede660d9eaea128fd151281f4715851c4fe2/Source/WebCore/dom/ActiveDOMObject.h#L114)
328331
* [`queueTaskToDispatchEvent`](https://github.com/WebKit/WebKit/blob/64cdede660d9eaea128fd151281f4715851c4fe2/Source/WebCore/dom/ActiveDOMObject.h#L124)
329332
* [`queueCancellableTaskToDispatchEvent`](https://github.com/WebKit/WebKit/blob/64cdede660d9eaea128fd151281f4715851c4fe2/Source/WebCore/dom/ActiveDOMObject.h#L130)
333+
330334
These functions will automatically create a pending activity until a newly enqueued task is executed.
331335
332336
Alternatively, [`makePendingActivity`](https://github.com/WebKit/WebKit/blob/64cdede660d9eaea128fd151281f4715851c4fe2/Source/WebCore/dom/ActiveDOMObject.h#L97)

docs/Deep Dive/MemoryManagement.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,7 @@ void HTMLTextFormControlElement::scheduleSelectEvent()
324324

325325
Alternatively, we can make it inherit from an [active DOM object](https://github.com/WebKit/WebKit/blob/main/Source/WebCore/dom/ActiveDOMObject.h),
326326
and use one of the following functions to enqueue a task or an event:
327+
327328
- [`queueTaskKeepingObjectAlive`](https://github.com/WebKit/WebKit/blob/297c01a143f649b34544f0cb7a555decf6ecbbfd/Source/WebCore/dom/ActiveDOMObject.h#L107)
328329
- [`queueCancellableTaskKeepingObjectAlive`](https://github.com/WebKit/WebKit/blob/297c01a143f649b34544f0cb7a555decf6ecbbfd/Source/WebCore/dom/ActiveDOMObject.h#L115)
329330
- [`queueTaskToDispatchEvent`](https://github.com/WebKit/WebKit/blob/297c01a143f649b34544f0cb7a555decf6ecbbfd/Source/WebCore/dom/ActiveDOMObject.h#L124)

0 commit comments

Comments
 (0)