Search Apps Documentation Source Content File Folder Download Copy Actions Download State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

crossrealm source realm

Variables 4

var Closure

1var Closure func()
source

------------------------------------ SECURITY XXX: Closure and Closure2 below are exported package-level function-typed vars that any foreign realm can set via SetClosure / SetClosure2 and trigger via ExecuteClosure / ExecuteClosureCross. Closure2's signature is `func(realm)`, which means whoever sets it receives a realm value at invocation time — capability-bearing data stored in an exported package var, then handed back to caller-supplied code. THIS IS DELIBERATE VM-PARITY-TEST INFRASTRUCTURE — these vars exist to exercise the VM's handling of stored closures and cross- realm callbacks. DO NOT COPY THIS PATTERN IN PRODUCTION CODE. Real /r/ realms must never expose `func(realm)` (or any function-typed value capable of receiving cur) as an exported package var.

var Closure3

1var Closure3 func(_ int, rlm realm)
source

Closure3 mirrors Closure but for non-crossing-with-rlm closures — `func(_ int, rlm realm)`. Whoever sets Closure3 receives cur as a plain value (no realm boundary at invocation time), then can cross internally via cross(rlm).

var Object

1var Object any
source

-------------------------------------------------

Functions 32

func EntryPointWithCrossing

Action
1func EntryPointWithCrossing(_ int, rlm realm) (withCros *ownable.Ownable)
source

EntryPointWithCrossing is a non-crossing helper that forwards into the (cur realm)-crossing PrevRealmCrossing. Callers pass their own live cur; `cross(rlm)` does the actual cross.

func Exec

Action
1func Exec(cb func() string) string
source

This is a top function that doesn't switch realms.

func ExecCrossing

crossing Action
1func ExecCrossing(cur realm, cb func() string) string
source

This is a top function that does switch realms.

func Make1

Action
1func Make1() *p_crossrealm.Container
source

Make1 returns a local object wrapped by a p struct

Types 3

type Fooer

interface
1type Fooer interface {
2	Foo(realm)
3	Bar()
4}
source

type LocalStruct

struct
1type LocalStruct struct {
2	A int
3}
source

Methods on LocalStruct

func String

method on LocalStruct
1func (ls *LocalStruct) String() string
source

Imports 5

Source Files 3