Ejemplo n.º 1
0
  ~PromiseResolverTask()
  {
    MOZ_COUNT_DTOR(PromiseResolverTask);

    JSContext* cx = nsContentUtils::GetSafeJSContext();

    /* It's safe to use unsafeGet() here: the unsafeness comes from the
     * possibility of updating the value of mJSObject without triggering the
     * barriers.  However if the value will always be marked, post barriers
     * unnecessary. */
    JS_RemoveValueRootRT(JS_GetRuntime(cx), mValue.unsafeGet());
  }
Ejemplo n.º 2
0
ArrayBufferInputStream::~ArrayBufferInputStream()
{
  if (mRt) {
    JS_RemoveValueRootRT(mRt, &mArrayBuffer);
  }
}