mirror of
https://github.com/denoland/deno.git
synced 2024-12-23 15:49:44 -05:00
upgrade: rusty_v8 0.16.0, v8 8.9.255.3 (#9180)
This commit is contained in:
parent
4bf98ab239
commit
9312d48e69
4 changed files with 25 additions and 37 deletions
4
Cargo.lock
generated
4
Cargo.lock
generated
|
@ -2221,9 +2221,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "rusty_v8"
|
||||
version = "0.15.0"
|
||||
version = "0.16.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "901a9566b56ddfd49c504fdce35f27d8a6b29088facfd480ab79e95de3f836a1"
|
||||
checksum = "a50f63f3030b5a676b9f6e7d53bf1f880904973c2350a3f034dbf82facca0b4f"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
"cargo_gn",
|
||||
|
|
|
@ -20,7 +20,7 @@ lazy_static = "1.4.0"
|
|||
libc = "0.2.82"
|
||||
log = "0.4.13"
|
||||
pin-project = "1.0.4"
|
||||
rusty_v8 = "0.15.0"
|
||||
rusty_v8 = "0.16.0"
|
||||
serde = { version = "1.0.116", features = ["derive"] }
|
||||
serde_json = { version = "1.0.61", features = ["preserve_order"] }
|
||||
smallvec = "1.6.1"
|
||||
|
|
|
@ -59,24 +59,18 @@ pub fn script_origin<'a>(
|
|||
s: &mut v8::HandleScope<'a>,
|
||||
resource_name: v8::Local<'a, v8::String>,
|
||||
) -> v8::ScriptOrigin<'a> {
|
||||
let resource_line_offset = v8::Integer::new(s, 0);
|
||||
let resource_column_offset = v8::Integer::new(s, 0);
|
||||
let resource_is_shared_cross_origin = v8::Boolean::new(s, false);
|
||||
let script_id = v8::Integer::new(s, 123);
|
||||
let source_map_url = v8::String::new(s, "").unwrap();
|
||||
let resource_is_opaque = v8::Boolean::new(s, true);
|
||||
let is_wasm = v8::Boolean::new(s, false);
|
||||
let is_module = v8::Boolean::new(s, false);
|
||||
v8::ScriptOrigin::new(
|
||||
s,
|
||||
resource_name.into(),
|
||||
resource_line_offset,
|
||||
resource_column_offset,
|
||||
resource_is_shared_cross_origin,
|
||||
script_id,
|
||||
0,
|
||||
0,
|
||||
false,
|
||||
123,
|
||||
source_map_url.into(),
|
||||
resource_is_opaque,
|
||||
is_wasm,
|
||||
is_module,
|
||||
true,
|
||||
false,
|
||||
false,
|
||||
)
|
||||
}
|
||||
|
||||
|
@ -84,24 +78,18 @@ pub fn module_origin<'a>(
|
|||
s: &mut v8::HandleScope<'a>,
|
||||
resource_name: v8::Local<'a, v8::String>,
|
||||
) -> v8::ScriptOrigin<'a> {
|
||||
let resource_line_offset = v8::Integer::new(s, 0);
|
||||
let resource_column_offset = v8::Integer::new(s, 0);
|
||||
let resource_is_shared_cross_origin = v8::Boolean::new(s, false);
|
||||
let script_id = v8::Integer::new(s, 123);
|
||||
let source_map_url = v8::String::new(s, "").unwrap();
|
||||
let resource_is_opaque = v8::Boolean::new(s, true);
|
||||
let is_wasm = v8::Boolean::new(s, false);
|
||||
let is_module = v8::Boolean::new(s, true);
|
||||
v8::ScriptOrigin::new(
|
||||
s,
|
||||
resource_name.into(),
|
||||
resource_line_offset,
|
||||
resource_column_offset,
|
||||
resource_is_shared_cross_origin,
|
||||
script_id,
|
||||
0,
|
||||
0,
|
||||
false,
|
||||
123,
|
||||
source_map_url.into(),
|
||||
resource_is_opaque,
|
||||
is_wasm,
|
||||
is_module,
|
||||
true,
|
||||
false,
|
||||
true,
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue