1. [[exceptions] Unify pending and scheduled exceptions](https://chromium-review.googlesource.com/c/v8/v8/+/5050065)
Reset no longer clears exception if it was rethrown. The test had to be adjusted for the same.
2. [[api] Allow passing CppHeap on Isolate creation](https://chromium-review.googlesource.com/c/v8/v8/+/4989254)
`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](https://chromium-review.googlesource.com/c/chromium/src/+/4992764) is also crashing. For now I've just suppressed the deprecation warning until the crash is fixed in V8.
3. 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.
Other changes:
- `v8::ScriptCompiler` size increased by 3 words with `v8::ScriptCompiler::CompilationDetails`.
- `v8::ObjectTemplate::SetAccessor` & `v8::ObjectTemplate::SetAccessorProperty` signature changed and also deprecated.
- `v8::Context::SetContinuationPreservedEmbedderData` deprecated. Use `v8::Isolate::GetContinuationPreservedEmbedderData` instead.
- `GetStalledTopLevelAwaitMessage` deprecated. Use `GetStalledTopLevelAwaitMessages` instead.
- `v8::Isolate::AttachCppHeap` deprecated. Set the heap on Isolate creation using CreateParams instead.
- `v8::ScriptOrigin` deprecated. Use constructor without the isolate.
- `v8::SnapshotCreator` is deprecated. Use the version that passes CreateParams instead.
- `v8::Isolate` assertion failures.
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
This change allows the customization of the behavior of
v8::Object::GetOwnPropertyNames() and v8::Object::GetPropertyNames() by
accepting all the options that the raw V8 API supports.
Signed-off-by: Darshan Sen <raisinten@gmail.com>
This commit adds calls to v8::V8::dispose and v8::V8::shutdown_platform
to the hello_world.rs example.
The motivation for adding this is that it was not obvious to me that I
needed to have the Isolate in a separate scope. If there is not, the
platform will have been shutdown before the Isolate's Drop function
is called at the end of the function where the scope ends. Drop will in
turn call Dispose on the V8 Isolate, which calls Isolate::Deinit, and
Deinit calls tracing_cpu_profilers.reset() which will call
~TracingCpuProfilerImpl which has a call to V8::GetCurrentPlatform()
which will produce the following error:
Fatal error in ../../../v8/src/init/v8.cc, line 144
Debug check failed: platform.
FailureMessage Object: 0x7fff45b03700Illegal instruction (core dumped)
Having an example might safe others some time if they run into the same
issue.