mirror of
https://github.com/denoland/rusty_v8.git
synced 2025-02-01 20:24:56 -05:00
ddc8062644
The `get_current_context()` and `get_entered_or_microtask_context()` methods now return `Option<Local<Context>>` to reflect that an isolate may not have entered any context. They're also moved from `Isolate` to `struct Entered` because it turns out that the underlying V8 API calls actually create new local handles, hence they should only be used inside an active HandleScope. The `InContext` trait has been removed. A test exercising `ContextScope` and the `get_*_context()` methods mentioned above was added. Closes: #248.
18 lines
1.5 KiB
Text
18 lines
1.5 KiB
Text
error[E0277]: the trait bound `rusty_v8::scope::Entered<'_, rusty_v8::scope::CallbackScope>: rusty_v8::scope_traits::ToLocal<'_>` is not satisfied
|
|
--> $DIR/handle_scope_escape_to_nowhere.rs:7:43
|
|
|
|
|
7 | let _hs = v8::EscapableHandleScope::new(cs.enter());
|
|
| ^^^^^^^^^^ the trait `rusty_v8::scope_traits::ToLocal<'_>` is not implemented for `rusty_v8::scope::Entered<'_, rusty_v8::scope::CallbackScope>`
|
|
|
|
|
::: $WORKSPACE/src/handle_scope.rs:71:8
|
|
|
|
|
71 | P: ToLocalOrReturnsLocal<'p>,
|
|
| ------------------------- required by this bound in `rusty_v8::handle_scope::EscapableHandleScope::new`
|
|
|
|
|
= help: the following implementations were found:
|
|
<rusty_v8::scope::Entered<'s, rusty_v8::function::FunctionCallbackInfo> as rusty_v8::scope_traits::ToLocal<'s>>
|
|
<rusty_v8::scope::Entered<'s, rusty_v8::function::PropertyCallbackInfo> as rusty_v8::scope_traits::ToLocal<'s>>
|
|
<rusty_v8::scope::Entered<'s, rusty_v8::handle_scope::EscapableHandleScope, P> as rusty_v8::scope_traits::ToLocal<'s>>
|
|
<rusty_v8::scope::Entered<'s, rusty_v8::handle_scope::HandleScope, P> as rusty_v8::scope_traits::ToLocal<'s>>
|
|
<rusty_v8::scope::Entered<'s, rusty_v8::scope::ContextScope, P> as rusty_v8::scope_traits::ToLocal<'p>>
|
|
= note: required because of the requirements on the impl of `rusty_v8::scope_traits::ToLocalOrReturnsLocal<'_>` for `rusty_v8::scope::Entered<'_, rusty_v8::scope::CallbackScope>`
|