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

Upgrade to V8 12.1.285.6 #1374

Merged
merged 14 commits into from Jan 5, 2024
Merged

Upgrade to V8 12.1.285.6 #1374

merged 14 commits into from Jan 5, 2024

Conversation

littledivy
Copy link
Member

@littledivy littledivy commented Dec 8, 2023

Changes:

  • v8::ScriptCompiler size increased by 3 words with v8::ScriptCompiler::CompilationDetails. @littledivy
  • v8::ObjectTemplate::SetAccessor & v8::ObjectTemplate::SetAccessorProperty signature changed and also deprecated. @littledivy
  • v8::Context::SetContinuationPreservedEmbedderData deprecated. Use v8::Isolate::GetContinuationPreservedEmbedderData instead. @littledivy
  • GetStalledTopLevelAwaitMessage deprecated. Use GetStalledTopLevelAwaitMessages instead. @littledivy
  • v8::Isolate::AttachCppHeap deprecated. Set the heap on Isolate creation using CreateParams instead. @littledivy
  • v8::ScriptOrigin deprecated. Use constructor without the isolate. @bartlomieju
  • v8::SnapshotCreator is deprecated. Use the version that passes CreateParams instead. @bartlomieju
  • v8::Isolate assertion failures. @littledivy

#1373 but without denobot force pushing over our changes :)

@littledivy
Copy link
Member Author

littledivy commented Jan 5, 2024

  1. [exceptions] Unify pending and scheduled exceptions

Reset no longer clears exception if it was rethrown. The test had to be adjusted for the same.

  1. [api] Allow passing CppHeap on Isolate creation

AttachCppHeap was deprecated but the alternative of passing CppHeap via Isolate CreateParams hard crashes (SIGSEGV). There are no tests for this in V8 and it seems the Chromium CL is also crashing. For now I've just suppressed the deprecation warning until the crash is fixed in V8.

  1. v8::Serializer impl must not throw more than one exception.

I changed get_shared_buffer_id() to not throw and return None. V8 internally calls data clone error when it's the SAB is not clonable.

Comment on lines +104 to +105
// TODO(littledivy): remove
_scope: &mut HandleScope<'s, ()>,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do it in this PR?

tests/test_api.rs Outdated Show resolved Hide resolved
@littledivy littledivy merged commit 3de6823 into denoland:main Jan 5, 2024
8 checks passed
@littledivy littledivy deleted the v8_12.1 branch January 5, 2024 13:20
static_assert(sizeof(v8::ScriptCompiler::Source) ==
align_to<size_t>(sizeof(size_t) * 9 + sizeof(int) * 2),
"Source size mismatch");
static_assert(sizeof(v8::ScriptCompiler::CompilationDetails) ==
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

32-bit build fails here:

   ../../../src/binding.cc:59:15: error: static assertion failed due to requirement 'sizeof(v8::ScriptCompiler::CompilationDetails) == sizeof(unsigned int) * 3': CompilationDetails size mismatch
      59 | static_assert(sizeof(v8::ScriptCompiler::CompilationDetails) ==
         |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      60 |                   sizeof(size_t) * 3,
         |                   ~~~~~~~~~~~~~~~~~~
   ../../../src/binding.cc:59:62: note: expression evaluates to '20 == 12'
      59 | static_assert(sizeof(v8::ScriptCompiler::CompilationDetails) ==
         |               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
      60 |                   sizeof(size_t) * 3,
         |                   ~~~~~~~~~~~~~~~~~~
   1 error generated.

example of full log here:

https://build.opensuse.org/package/live_build_log/devel:languages:javascript/rusty_v8/openSUSE_Tumbleweed/i586

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants