Commit 11822099 authored by Jon Coppeard's avatar Jon Coppeard
Browse files

Bug 1813487 - Add barriers on ExportNameVector type r=sfink

This makes it so you can just call trace() on it. The barriers should not end
up being triggered anyway.

Differential Revision: https://phabricator.services.mozilla.com/D168227
parent a0e90133
Loading
Loading
Loading
Loading
+1 −4
Original line number Original line Diff line number Diff line
@@ -594,10 +594,7 @@ void ModuleNamespaceObject::ProxyHandler::trace(JSTracer* trc,
  auto& self = proxy->as<ModuleNamespaceObject>();
  auto& self = proxy->as<ModuleNamespaceObject>();


  if (self.hasExports()) {
  if (self.hasExports()) {
    for (JSAtom*& name : self.mutableExports()) {
    self.mutableExports().trace(trc);
      TraceManuallyBarrieredEdge(trc, &name,
                                 "ModuleNamespaceObject export name");
    }
  }
  }


  if (self.hasBindings()) {
  if (self.hasBindings()) {
+2 −4
Original line number Original line Diff line number Diff line
@@ -188,10 +188,8 @@ class IndirectBindingMap {


// Vector of atoms representing the names exported from a module namespace.
// Vector of atoms representing the names exported from a module namespace.
//
//
// Barriers are not required because this is either used as a root, or a
// This is used both on the stack and in the heap.
// non-mutable field of ModuleNamespaceObject. Don't change this without adding
using ExportNameVector = GCVector<HeapPtr<JSAtom*>, 0, SystemAllocPolicy>;
// barriers.
using ExportNameVector = GCVector<JSAtom*, 0, SystemAllocPolicy>;


class ModuleNamespaceObject : public ProxyObject {
class ModuleNamespaceObject : public ProxyObject {
 public:
 public: