Skip to content

Commit

Permalink
Fix Isolate embedder offset
Browse files Browse the repository at this point in the history
  • Loading branch information
littledivy committed Dec 5, 2023
1 parent 4b2117a commit df6ca16
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/isolate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@ impl Isolate {
// Byte offset inside `Isolate` where the isolate data slots are stored. This
// should be the same as the value of `kIsolateEmbedderDataOffset` which is
// defined in `v8-internal.h`.
const EMBEDDER_DATA_OFFSET: usize = size_of::<[*const (); 67]>();
const EMBEDDER_DATA_OFFSET: usize = size_of::<[*const (); 65]>();

// Isolate data slots used internally by rusty_v8.
const ANNEX_SLOT: u32 = 0;
Expand Down
4 changes: 2 additions & 2 deletions src/script.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ use std::ptr::null;

use crate::Context;
use crate::HandleScope;
use crate::Isolate;
use crate::Local;
use crate::Script;
use crate::String;
Expand Down Expand Up @@ -102,7 +101,8 @@ impl<'s> ScriptOrigin<'s> {
#[allow(clippy::too_many_arguments)]
#[inline(always)]
pub fn new(
scope: &mut HandleScope<'s, ()>,
// TODO(littledivy): remove
_scope: &mut HandleScope<'s, ()>,
resource_name: Local<'s, Value>,
resource_line_offset: i32,
resource_column_offset: i32,
Expand Down
3 changes: 0 additions & 3 deletions src/snapshot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@ use crate::isolate_create_params::raw;
use crate::scope::data::ScopeData;
use crate::support::char;
use crate::support::int;
use crate::support::intptr_t;
use crate::support::Allocated;
use crate::support::Allocation;
use crate::Context;
use crate::Data;
use crate::Isolate;
Expand All @@ -16,7 +14,6 @@ use std::borrow::Borrow;
use std::convert::TryFrom;
use std::mem::MaybeUninit;
use std::ops::Deref;
use std::ptr::null;

extern "C" {
fn v8__SnapshotCreator__CONSTRUCT(
Expand Down

0 comments on commit df6ca16

Please sign in to comment.