diff --git a/js/src/vm/String.cpp b/js/src/vm/String.cpp index 064834ff27c..52c7edcbb5b 100644 --- a/js/src/vm/String.cpp +++ b/js/src/vm/String.cpp @@ -14,6 +14,7 @@ #include "gc/Marking.h" #include "js/UbiNode.h" +#include "vm/SPSProfiler.h" #include "jscntxtinlines.h" #include "jscompartmentinlines.h" @@ -554,6 +555,10 @@ JSRope::flattenInternal(ExclusiveContext* maybecx) JSFlatString* JSRope::flatten(ExclusiveContext* maybecx) { + mozilla::Maybe sps; + if (maybecx && maybecx->isJSContext()) + sps.emplace(maybecx->asJSContext()->runtime(), "JSRope::flatten"); + if (zone()->needsIncrementalBarrier()) return flattenInternal(maybecx); return flattenInternal(maybecx);