1380030 fully.

1380030 - Remove color constants from public API and replace with an internal MarkColor enum.

1380030 - Simplify and refactor use of isMarked*() methods.

I only had one part of this before: Refactor isMarked() methods into separate methods for each color and any.
This commit is contained in:
win7-7 2026-01-16 06:53:16 +02:00 committed by wuggy
commit 9eede345ec
6 changed files with 25 additions and 23 deletions

View file

@ -335,7 +335,7 @@ Wrapper::wrappedObject(JSObject* wrapper)
// of black wrappers black but while it is in progress we can observe gray
// targets. Expose rather than returning a gray object in this case.
if (target) {
if (wrapper->isMarkedAny() && !wrapper->isMarkedGray())
if (wrapper->isMarkedBlack())
MOZ_ASSERT(JS::ObjectIsNotGray(target));
if (!wrapper->isMarkedGray())
JS::ExposeObjectToActiveJS(target);