Skip to content

Commit

Permalink
fix: support gcc13
Browse files Browse the repository at this point in the history
Signed-off-by: Hosung Kim [email protected]

Signed-off-by: Daeyeon Jeong <[email protected]>
  • Loading branch information
hs0225 authored and daeyeon committed Jul 17, 2023
1 parent b1589ea commit b3a1008
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 24 deletions.
10 changes: 4 additions & 6 deletions src/api-exception.cc
Original file line number Diff line number Diff line change
Expand Up @@ -82,18 +82,16 @@ v8::TryCatch::~TryCatch() {
}

void* v8::TryCatch::operator new(size_t) {
LWNODE_UNIMPLEMENT;
return new TryCatch(nullptr);
std::abort();
}
void* v8::TryCatch::operator new[](size_t) {
LWNODE_UNIMPLEMENT;
return new TryCatch(nullptr);
std::abort();
}
void v8::TryCatch::operator delete(void*, size_t) {
LWNODE_UNIMPLEMENT;
std::abort();
}
void v8::TryCatch::operator delete[](void*, size_t) {
LWNODE_UNIMPLEMENT;
std::abort();
}

bool v8::TryCatch::HasCaught() const {
Expand Down
27 changes: 10 additions & 17 deletions src/api-handles.cc
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,10 @@ HandleScope::~HandleScope() {
}

void* HandleScope::operator new(size_t) {
LWNODE_UNIMPLEMENT;
// TODO: abort : only stack is available
return new HandleScope(nullptr);
std::abort();
}
void* HandleScope::operator new[](size_t) {
LWNODE_UNIMPLEMENT;
return new HandleScope(nullptr);
std::abort();
}
void HandleScope::operator delete(void*, size_t) {
LWNODE_UNIMPLEMENT;
Expand Down Expand Up @@ -120,18 +117,16 @@ i::Address* EscapableHandleScope::Escape(i::Address* escape_value) {
}

void* EscapableHandleScope::operator new(size_t) {
LWNODE_UNIMPLEMENT;
return new EscapableHandleScope(nullptr);
std::abort();
}
void* EscapableHandleScope::operator new[](size_t) {
LWNODE_UNIMPLEMENT;
return new EscapableHandleScope(nullptr);
std::abort();
}
void EscapableHandleScope::operator delete(void*, size_t) {
LWNODE_UNIMPLEMENT;
std::abort();
}
void EscapableHandleScope::operator delete[](void*, size_t) {
LWNODE_UNIMPLEMENT;
std::abort();
}

SealHandleScope::SealHandleScope(Isolate* isolate)
Expand All @@ -147,18 +142,16 @@ SealHandleScope::~SealHandleScope() {
}

void* SealHandleScope::operator new(size_t) {
LWNODE_UNIMPLEMENT;
return new SealHandleScope(nullptr);
std::abort();
}
void* SealHandleScope::operator new[](size_t) {
LWNODE_UNIMPLEMENT;
return new SealHandleScope(nullptr);
std::abort();
}
void SealHandleScope::operator delete(void*, size_t) {
LWNODE_UNIMPLEMENT;
std::abort();
}
void SealHandleScope::operator delete[](void*, size_t) {
LWNODE_UNIMPLEMENT;
std::abort();
}

void Context::Enter() {
Expand Down
2 changes: 1 addition & 1 deletion src/api/utils/logger/logger-impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ Logger& Logger::flush() {

void StdOut::flush(std::stringstream& stream,
std::shared_ptr<Output::Config> config) {
std::cerr << stream.str();
fprintf(stderr, "%s", stream.str().c_str());
}

// --- Option ---
Expand Down

0 comments on commit b3a1008

Please sign in to comment.