Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jedel1043 committed Mar 3, 2022
1 parent fd8e0c6 commit 8e1aa3d
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion boa_engine/src/builtins/error/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ impl Error {
args: &[JsValue],
context: &mut Context,
) -> JsResult<JsValue> {
// 1. If NewTarget is undefined, let newTarget be the active functionerrore let newTarget be NewTarget.
// 1. If NewTarget is undefined, let newTarget be the active function object; else let newTarget be NewTarget.

// 2. Let O be ? OrdinaryCreateFromConstructor(newTarget, "%Error.prototype%", « [[ErrorData]] »).
let prototype =
Expand Down
2 changes: 0 additions & 2 deletions boa_engine/src/builtins/generator/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@ pub struct Generator {
impl BuiltIn for Generator {
const NAME: &'static str = "Generator";

const ATTRIBUTE: Attribute = Attribute::NON_ENUMERABLE.union(Attribute::CONFIGURABLE);

fn init(context: &mut Context) -> Option<JsValue> {
let _timer = Profiler::global().start_event(Self::NAME, "init");

Expand Down
4 changes: 1 addition & 3 deletions boa_engine/src/builtins/generator_function/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use crate::{
builtins::{function::Function, BuiltIn},
context::intrinsics::StandardConstructors,
object::{internal_methods::get_prototype_from_constructor, JsObject, ObjectData},
property::{Attribute, PropertyDescriptor},
property::PropertyDescriptor,
symbol::WellKnownSymbols,
value::JsValue,
Context, JsResult,
Expand All @@ -28,8 +28,6 @@ pub struct GeneratorFunction;
impl BuiltIn for GeneratorFunction {
const NAME: &'static str = "GeneratorFunction";

const ATTRIBUTE: Attribute = Attribute::NON_ENUMERABLE.union(Attribute::WRITABLE);

fn init(context: &mut Context) -> Option<JsValue> {
let _timer = Profiler::global().start_event(Self::NAME, "init");

Expand Down
2 changes: 1 addition & 1 deletion boa_engine/src/builtins/regexp/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ impl RegExp {
/// `22.2.3.2.1 RegExpAlloc ( newTarget )`
///
/// More information:
/// - [ECMAScript reference][spec]regexp
/// - [ECMAScript reference][spec]
///
/// [spec]: https://tc39.es/ecma262/#sec-regexpalloc
fn alloc(this: &JsValue, _: &[JsValue], context: &mut Context) -> JsResult<JsValue> {
Expand Down
2 changes: 1 addition & 1 deletion boa_engine/src/context/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ impl Default for Context {
// Add new builtIns to Context Realm
// At a later date this can be removed from here and called explicitly,
// but for now we almost always want these default builtins
context.create_intrinsics();
context.intrinsics.objects = IntrinsicObjects::init(&mut context);
context.create_intrinsics();
context
}
}
Expand Down

0 comments on commit 8e1aa3d

Please sign in to comment.