Bug 1546331 Comment 11 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

From what I can see in the source related to the stack trace, we have a `WorkerPrivate` instance, that is freed through reference counting by:

```NS_INLINE_DECL_REFCOUNTING(WorkerPrivate)``` [1]

and then accessed through a raw pointer in

```class UnregisterDebuggerMainThreadRunnable final : public mozilla::Runnable {
  WorkerPrivate* mWorkerPrivate;``` [3]

As the ref-counting on `WorkerPrivate` has been introduced quite recently in [2], I assume, that not all pointers to such objects have been uplifted  to be RefPtr and some of them may therefore outlive the instance. We should therefore check all `WorkerPrivate*` variables in our classes.

[1] https://searchfox.org/mozilla-central/source/dom/workers/WorkerPrivate.h#109
[2] introduced by https://bugzilla.mozilla.org/show_bug.cgi?id=1435263 part 17
[3] https://searchfox.org/mozilla-central/source/dom/workers/WorkerDebuggerManager.cpp#46
From what I can see in the source related to the stack trace, we have a `WorkerPrivate` instance, that is freed through reference counting by:

```NS_INLINE_DECL_REFCOUNTING(WorkerPrivate)``` [1]

and then accessed through a raw pointer in

```
class UnregisterDebuggerMainThreadRunnable final : public mozilla::Runnable {
  WorkerPrivate* mWorkerPrivate;
``` [3]

As the ref-counting on `WorkerPrivate` has been introduced quite recently in [2], I assume, that not all pointers to such objects have been uplifted  to be RefPtr and some of them may therefore outlive the instance. We should therefore check all `WorkerPrivate*` variables in our classes.

[1] https://searchfox.org/mozilla-central/source/dom/workers/WorkerPrivate.h#109
[2] introduced by https://bugzilla.mozilla.org/show_bug.cgi?id=1435263 part 17
[3] https://searchfox.org/mozilla-central/source/dom/workers/WorkerDebuggerManager.cpp#46
From what I can see in the source related to the stack trace, we have a `WorkerPrivate` instance, that is freed through reference counting by:

```NS_INLINE_DECL_REFCOUNTING(WorkerPrivate)``` [1]

and then accessed through a raw pointer in [3]

```
class UnregisterDebuggerMainThreadRunnable final : public mozilla::Runnable {
  WorkerPrivate* mWorkerPrivate;
```

As the ref-counting on `WorkerPrivate` has been introduced quite recently in [2], I assume, that not all pointers to such objects have been uplifted  to be RefPtr and some of them may therefore outlive the instance. We should therefore check all `WorkerPrivate*` variables in our classes.

[1] https://searchfox.org/mozilla-central/source/dom/workers/WorkerPrivate.h#109
[2] introduced by https://bugzilla.mozilla.org/show_bug.cgi?id=1435263 part 17
[3] https://searchfox.org/mozilla-central/source/dom/workers/WorkerDebuggerManager.cpp#46

Back to Bug 1546331 Comment 11