From bb2938107319ba30ef9624ef22edde4897ca678b Mon Sep 17 00:00:00 2001 From: jedel1043 Date: Sun, 24 Sep 2023 19:28:28 -0600 Subject: [PATCH] Apply review --- boa_engine/src/builtins/options.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/boa_engine/src/builtins/options.rs b/boa_engine/src/builtins/options.rs index e821363f4c3..1e6b1bb3d33 100644 --- a/boa_engine/src/builtins/options.rs +++ b/boa_engine/src/builtins/options.rs @@ -2,10 +2,7 @@ use std::{fmt, str::FromStr}; -use crate::{ - object::{JsObject, ObjectData}, - Context, JsNativeError, JsResult, JsString, JsValue, -}; +use crate::{object::JsObject, Context, JsNativeError, JsResult, JsString, JsValue}; /// A type used as an option parameter for [`get_option`]. pub(crate) trait OptionType: Sized { @@ -87,7 +84,7 @@ pub(crate) fn get_options_object(options: &JsValue) -> JsResult { // If options is undefined, then JsValue::Undefined => { // a. Return OrdinaryObjectCreate(null). - Ok(JsObject::from_proto_and_data(None, ObjectData::ordinary())) + Ok(JsObject::with_null_proto()) } // 2. If Type(options) is Object, then JsValue::Object(obj) => {