diff --git a/deps/v8/include/v8-version.h b/deps/v8/include/v8-version.h index 7bbdf1cc3e6911..38950df2a4fa77 100644 --- a/deps/v8/include/v8-version.h +++ b/deps/v8/include/v8-version.h @@ -11,7 +11,7 @@ #define V8_MAJOR_VERSION 6 #define V8_MINOR_VERSION 2 #define V8_BUILD_NUMBER 414 -#define V8_PATCH_LEVEL 56 +#define V8_PATCH_LEVEL 57 // Use 1 for candidates and 0 otherwise. // (Boolean macro values are not supported by all preprocessors.) diff --git a/deps/v8/include/v8.h b/deps/v8/include/v8.h index a4ed3439494513..d964675407deb1 100644 --- a/deps/v8/include/v8.h +++ b/deps/v8/include/v8.h @@ -10251,7 +10251,7 @@ int64_t Isolate::AdjustAmountOfExternalAllocatedMemory( typedef internal::Internals I; int64_t* external_memory = reinterpret_cast( reinterpret_cast(this) + I::kExternalMemoryOffset); - const int64_t external_memory_limit = *reinterpret_cast( + int64_t* external_memory_limit = reinterpret_cast( reinterpret_cast(this) + I::kExternalMemoryLimitOffset); int64_t* external_memory_at_last_mc = reinterpret_cast(reinterpret_cast(this) + @@ -10269,7 +10269,11 @@ int64_t Isolate::AdjustAmountOfExternalAllocatedMemory( CheckMemoryPressure(); } - if (change_in_bytes > 0 && amount > external_memory_limit) { + if (change_in_bytes < 0) { + *external_memory_limit += change_in_bytes; + } + + if (change_in_bytes > 0 && amount > *external_memory_limit) { ReportExternalAllocationLimitReached(); } return *external_memory;