Skip to content

Commit

Permalink
Switch make_data parameter from this to new_target
Browse files Browse the repository at this point in the history
  • Loading branch information
johnyob committed Nov 24, 2023
1 parent 07e2356 commit 4707868
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions boa_engine/src/class.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
//! const LENGTH: usize = 1;
//!
//! // This is what is called when we do `new Animal()` to construct the inner data of the class.
//! fn make_data(_this: &JsValue, args: &[JsValue], context: &mut Context) -> JsResult<Self> {
//! fn make_data(_new_target: &JsValue, args: &[JsValue], context: &mut Context) -> JsResult<Self> {
//! // This is equivalent to `String(arg)`.
//! let kind = args.get_or_undefined(0).to_string(context)?;
//!
Expand Down Expand Up @@ -91,7 +91,7 @@ pub trait Class: NativeObject + Sized {
/// Creates the internal data for an instance of this class.
///
/// This method can also be called the "native constructor" of this class.
fn make_data(this: &JsValue, args: &[JsValue], context: &mut Context) -> JsResult<Self>;
fn make_data(new_target: &JsValue, args: &[JsValue], context: &mut Context) -> JsResult<Self>;

/// Initializes the properties and methods of this class.
fn init(class: &mut ClassBuilder<'_>) -> JsResult<()>;
Expand Down

0 comments on commit 4707868

Please sign in to comment.