Ejemplo n.º 1
0
bool V8::Dispose() {
    Isolate *isolate = Isolate::Current();
    if (isolate != NULL && isolate->IsDefaultIsolate()) {
        fprintf(stderr, "Use v8::Isolate::Dispose() for a non-default isolate.\n");
        return false;
    }
    V8::TearDown();
    return true;
}
Ejemplo n.º 2
0
void V8::TearDown() {
    Isolate *isolate = Isolate::Current();
    ASSERT(isolate->IsDefaultIsolate());

    if (!has_been_set_up_ || has_been_disposed_) return;

    // The isolate has to be torn down before clearing the LOperand
    // caches so that the optimizing compiler thread (if running)
    // doesn't see an inconsistent view of the lithium instructions.
    isolate->TearDown();
    delete isolate;

    is_running_ = false;
    has_been_disposed_ = true;
}