Skip to content

Commit

Permalink
doc cached standard objects
Browse files Browse the repository at this point in the history
  • Loading branch information
HalidOdat committed Oct 1, 2020
1 parent 91d0572 commit 5804418
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions boa/src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ use crate::{
};
use std::result::Result as StdResult;

/// Store a builtin constructor (such as `Object`) and its corresponding prototype.
#[derive(Debug, Clone)]
pub struct StandardConstructor {
pub(crate) constructor: GcObject,
Expand Down Expand Up @@ -54,6 +55,7 @@ impl StandardConstructor {
}
}

/// Cached core standard objects.
#[derive(Debug, Clone, Default)]
pub struct StandardObjects {
object: StandardConstructor,
Expand Down Expand Up @@ -639,6 +641,7 @@ impl Context {
&self.well_known_symbols
}

/// Return the core standard objects.
#[inline]
pub fn standard_objects(&self) -> &StandardObjects {
&self.standard_objects
Expand Down

0 comments on commit 5804418

Please sign in to comment.