2
0

Realm.cs 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. using Jint.Native.Object;
  2. using Jint.Runtime.Environments;
  3. namespace Jint.Runtime
  4. {
  5. public sealed class Realm
  6. {
  7. // helps when debugging which nested realm we are in...
  8. #if DEBUG
  9. private static int globalId = 1;
  10. public Realm()
  11. {
  12. Id = globalId++;
  13. }
  14. internal int Id;
  15. #endif
  16. /// <summary>
  17. /// The intrinsic values used by code associated with this realm.
  18. /// </summary>
  19. public Intrinsics Intrinsics { get; internal set; }
  20. /// <summary>
  21. /// The global object for this realm.
  22. /// </summary>
  23. public ObjectInstance GlobalObject { get; internal set; }
  24. /// <summary>
  25. /// The global environment for this realm.
  26. /// </summary>
  27. public GlobalEnvironmentRecord GlobalEnv { get; internal set; }
  28. /// <summary>
  29. /// Field reserved for use by hosts that need to associate additional information with a Realm Record.
  30. /// </summary>
  31. public object HostDefined { get; set; }
  32. }
  33. }