Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deps: define missing operator delete functions #10356

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions deps/v8/src/api.cc
Original file line number Diff line number Diff line change
Expand Up @@ -598,6 +598,11 @@ HandleScope::~HandleScope() {
}


void HandleScope::operator delete(void*, size_t) {
base::OS::Abort();
}


int HandleScope::NumberOfHandles(Isolate* isolate) {
return i::HandleScope::NumberOfHandles(
reinterpret_cast<i::Isolate*>(isolate));
Expand All @@ -623,6 +628,11 @@ EscapableHandleScope::EscapableHandleScope(Isolate* v8_isolate) {
}


void EscapableHandleScope::operator delete(void*, size_t) {
base::OS::Abort();
}


i::Object** EscapableHandleScope::Escape(i::Object** escape_value) {
i::Heap* heap = reinterpret_cast<i::Isolate*>(GetIsolate())->heap();
Utils::ApiCheck(*escape_slot_ == heap->the_hole_value(),
Expand Down Expand Up @@ -658,6 +668,11 @@ SealHandleScope::~SealHandleScope() {
}


void SealHandleScope::operator delete(void*, size_t) {
base::OS::Abort();
}


void Context::Enter() {
i::Handle<i::Context> env = Utils::OpenHandle(this);
i::Isolate* isolate = env->GetIsolate();
Expand Down Expand Up @@ -1884,6 +1899,11 @@ v8::TryCatch::~TryCatch() {
}


void v8::TryCatch::operator delete(void*, size_t) {
base::OS::Abort();
}


bool v8::TryCatch::HasCaught() const {
return !reinterpret_cast<i::Object*>(exception_)->IsTheHole();
}
Expand Down Expand Up @@ -6449,6 +6469,11 @@ void Isolate::RemoveGCEpilogueCallback(GCEpilogueCallback callback) {
}


void Isolate::operator delete(void*, size_t) {
base::OS::Abort();
}


void V8::AddGCPrologueCallback(GCPrologueCallback callback, GCType gc_type) {
i::Isolate* isolate = i::Isolate::Current();
isolate->heap()->AddGCPrologueCallback(
Expand Down