diff --git a/.gn b/.gn index 78704bff..d81db032 100644 --- a/.gn +++ b/.gn @@ -50,4 +50,10 @@ default_args = { # This is problematic for Deno, which has separate "runtime" and "typescript # compiler" snapshots, and sometimes uses them both at the same time. v8_enable_shared_ro_heap = false + + # V8 introduced a bug in 11.1 that causes the External Pointer Table to never + # be cleaned which causes resource exhaustion. Disabling pointer compression + # makes sure that the EPT is not used. + # https://bugs.chromium.org/p/v8/issues/detail?id=13640&q=garbage%20collection&can=2 + v8_enable_pointer_compression = false } diff --git a/src/binding.cc b/src/binding.cc index e790c6b6..6f7f5695 100644 --- a/src/binding.cc +++ b/src/binding.cc @@ -2913,14 +2913,6 @@ void v8__HeapProfiler__TakeHeapSnapshot(v8::Isolate* isolate, const_cast(snapshot)->Delete(); } -// This is necessary for v8__internal__GetIsolateFromHeapObject() to be -// reliable enough for our purposes. -#if UINTPTR_MAX == 0xffffffffffffffff && \ - !(defined V8_SHARED_RO_HEAP or defined V8_COMPRESS_POINTERS) -#error V8 must be built with either the 'v8_enable_pointer_compression' or \ -'v8_enable_shared_ro_heap' feature enabled. -#endif - v8::Isolate* v8__internal__GetIsolateFromHeapObject(const v8::Data& data) { namespace i = v8::internal; i::Object object(reinterpret_cast(data));