summaryrefslogtreecommitdiff
path: root/runtime/inspector.rs
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2021-01-18 20:18:42 -0500
committerBert Belder <bertbelder@gmail.com>2021-01-19 18:40:30 -0800
commit9312d48e69f3edc951144c6a5e5e3e2cde0d0db9 (patch)
treed06b52b40e8a031d6371cd8568387ba54f527038 /runtime/inspector.rs
parent4bf98ab239f1e377b4023b475c1aa1ff9bfc939e (diff)
upgrade: rusty_v8 0.16.0, v8 8.9.255.3 (#9180)
Diffstat (limited to 'runtime/inspector.rs')
-rw-r--r--runtime/inspector.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/runtime/inspector.rs b/runtime/inspector.rs
index 0a2a236f2..08493c5de 100644
--- a/runtime/inspector.rs
+++ b/runtime/inspector.rs
@@ -405,7 +405,7 @@ enum PollState {
pub struct DenoInspector {
v8_inspector_client: v8::inspector::V8InspectorClientBase,
- v8_inspector: v8::UniqueRef<v8::inspector::V8Inspector>,
+ v8_inspector: v8::UniquePtr<v8::inspector::V8Inspector>,
sessions: RefCell<InspectorSessions>,
flags: RefCell<InspectorFlags>,
waker: Arc<InspectorWaker>,
@@ -417,13 +417,13 @@ pub struct DenoInspector {
impl Deref for DenoInspector {
type Target = v8::inspector::V8Inspector;
fn deref(&self) -> &Self::Target {
- &self.v8_inspector
+ self.v8_inspector.as_ref().unwrap()
}
}
impl DerefMut for DenoInspector {
fn deref_mut(&mut self) -> &mut Self::Target {
- &mut self.v8_inspector
+ self.v8_inspector.as_mut().unwrap()
}
}
@@ -494,8 +494,6 @@ impl DenoInspector {
let mut self_ = new_box_with(|self_ptr| {
let v8_inspector_client =
v8::inspector::V8InspectorClientBase::new::<Self>();
- let v8_inspector =
- v8::inspector::V8Inspector::create(scope, unsafe { &mut *self_ptr });
let sessions = InspectorSessions::new(self_ptr, new_websocket_rx);
let flags = InspectorFlags::new();
@@ -519,7 +517,7 @@ impl DenoInspector {
Self {
v8_inspector_client,
- v8_inspector,
+ v8_inspector: Default::default(),
sessions,
flags,
waker,
@@ -528,6 +526,8 @@ impl DenoInspector {
debugger_url,
}
});
+ self_.v8_inspector =
+ v8::inspector::V8Inspector::create(scope, &mut *self_).into();
// Tell the inspector about the global context.
let context = v8::Local::new(scope, context);