Skip to content
Commit bb16545b authored by Philip Chimento's avatar Philip Chimento 🚮 Committed by Philip Chimento
Browse files

js: Implement barriers correctly in structs

Fundamental was the only class that didn't have the IMPLEMENTS_BARRIERS
flag set. In SpiderMonkey 38 it's required on all classes that have a
trace hook.

In addition, in order to implement barriers correctly we need to make sure
that JS::Heap's constructor and destructor are called. In most cases we do
this by making the containing struct a C++ struct, and calling its
constructor and destructor. In the case of GjsContext (a GObject struct)
and GjsCoveragePrivate (a GObject private struct) we can't do that, so
instead we use placement new on the JS::Heap member.

https://bugzilla.gnome.org/show_bug.cgi?id=776966
parent 51bae18d
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment