From 6409d8b112421247897dfc2192a206908bb2a32a Mon Sep 17 00:00:00 2001 From: Bert Belder Date: Mon, 7 Sep 2020 20:31:27 +0200 Subject: [PATCH] Upgrade V8 to 8.7.75 (#462) --- README.md | 2 +- build | 2 +- buildtools | 2 +- tests/test_api.rs | 27 +++++++++++++++++++++------ third_party/jinja2 | 2 +- third_party/markupsafe | 2 +- third_party/zlib | 2 +- tools/clang | 2 +- tools/upgrade_v8.sh | 4 ++-- v8 | 2 +- 10 files changed, 31 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 00387a52..ec6f4355 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Rusty V8 Binding -V8 Version: 8.6.334 +V8 Version: 8.7.75 [![ci](https://github.com/denoland/rusty_v8/workflows/ci/badge.svg?branch=master)](https://github.com/denoland/rusty_v8/actions) [![crates](https://img.shields.io/crates/v/rusty_v8.svg)](https://crates.io/crates/rusty_v8) diff --git a/build b/build index f9d174a0..6298d554 160000 --- a/build +++ b/build @@ -1 +1 @@ -Subproject commit f9d174a05aa7588a89616aed121e5f8ca12687ae +Subproject commit 6298d5546af5135b25e29a601b8414d0a16ecafb diff --git a/buildtools b/buildtools index deee1e07..c3628b70 160000 --- a/buildtools +++ b/buildtools @@ -1 +1 @@ -Subproject commit deee1e0703b6f42c3cd2ba848a988dc54ac02212 +Subproject commit c3628b70bf849930a678ef1fd4429c4543461188 diff --git a/tests/test_api.rs b/tests/test_api.rs index 46a258d2..773829e7 100644 --- a/tests/test_api.rs +++ b/tests/test_api.rs @@ -3397,20 +3397,35 @@ fn heap_statistics() { let mut s = v8::HeapStatistics::default(); isolate.get_heap_statistics(&mut s); - assert!(s.heap_size_limit() > 0); - assert!(s.total_heap_size() > 0); - assert!(s.total_global_handles_size() >= s.used_global_handles_size()); + assert!(s.used_heap_size() > 0); - assert!(s.heap_size_limit() >= s.used_heap_size()); - assert!(s.peak_malloced_memory() >= s.malloced_memory()); + assert!(s.total_heap_size() > 0); + assert!(s.total_heap_size() >= s.used_heap_size()); + assert!(s.heap_size_limit() > 0); + assert!(s.heap_size_limit() >= s.total_heap_size()); + + assert!(s.malloced_memory() > 0); + assert!(s.peak_malloced_memory() > 0); + // This invariant broke somewhere between V8 versions 8.6.337 and 8.7.25. + // TODO(piscisaureus): re-enable this assertion when the underlying V8 bug is + // fixed. + // assert!(s.peak_malloced_memory() >= s.malloced_memory()); + + assert_eq!(s.used_global_handles_size(), 0); + assert_eq!(s.total_global_handles_size(), 0); assert_eq!(s.number_of_native_contexts(), 0); let scope = &mut v8::HandleScope::new(isolate); let context = v8::Context::new(scope); let scope = &mut v8::ContextScope::new(scope, context); - let _ = eval(scope, "").unwrap(); + + let local = eval(scope, "").unwrap(); + let _global = v8::Global::new(scope, local); scope.get_heap_statistics(&mut s); + + assert_ne!(s.used_global_handles_size(), 0); + assert_ne!(s.total_global_handles_size(), 0); assert_ne!(s.number_of_native_contexts(), 0); } diff --git a/third_party/jinja2 b/third_party/jinja2 index 3f90fa05..61cfe2ac 160000 --- a/third_party/jinja2 +++ b/third_party/jinja2 @@ -1 +1 @@ -Subproject commit 3f90fa05c85718505e28c9c3426c1ba52843b9b7 +Subproject commit 61cfe2ac6c9108534c43b4039a95a0980251f266 diff --git a/third_party/markupsafe b/third_party/markupsafe index 8f45f5cf..f2fb0f21 160000 --- a/third_party/markupsafe +++ b/third_party/markupsafe @@ -1 +1 @@ -Subproject commit 8f45f5cfa0009d2a70589bcda0349b8cb2b72783 +Subproject commit f2fb0f21ef1e1d4ffd43be8c63fc3d4928dea7ab diff --git a/third_party/zlib b/third_party/zlib index 7492de9a..aec16ef7 160000 --- a/third_party/zlib +++ b/third_party/zlib @@ -1 +1 @@ -Subproject commit 7492de9a52f656b070f41968e39a6efa603590d5 +Subproject commit aec16ef74550b35e0c7a8ad630194e06cdfef82f diff --git a/tools/clang b/tools/clang index 8a232eb2..03bacc32 160000 --- a/tools/clang +++ b/tools/clang @@ -1 +1 @@ -Subproject commit 8a232eb21c25d1901794b418b8aeaae772e3cd0f +Subproject commit 03bacc323567b1f522fdf52f03a315b587da1826 diff --git a/tools/upgrade_v8.sh b/tools/upgrade_v8.sh index 2c1d7e18..8f522afd 100644 --- a/tools/upgrade_v8.sh +++ b/tools/upgrade_v8.sh @@ -1,8 +1,8 @@ # WARNING: This is not an automated tool! This is just some commands to copy and # paste manually to upgrade V8. -export BRANCH=20200806_rusty_v8 -export COMMITDATE=2020-08-05T17:03:41.000Z +export BRANCH=20200907_rusty_v8 +export COMMITDATE=2020-09-07T05:03:42.000Z git submodule update -f git submodule foreach 'git remote rm upstream; true' && diff --git a/v8 b/v8 index ce4c3060..3e2d6551 160000 --- a/v8 +++ b/v8 @@ -1 +1 @@ -Subproject commit ce4c3060f6fbfd5ed410de314f7e83a66fd792d9 +Subproject commit 3e2d6551eed76b7bdafb278b44c630965a840da8