forked from rogchap/v8go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexport_test.go
33 lines (26 loc) · 820 Bytes
/
export_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// Copyright 2019 Roger Chapman and the v8go contributors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package v8go
// RegisterCallback is exported for testing only.
func (i *Isolate) RegisterCallback(cb FunctionCallback) int {
return i.registerCallback(cb)
}
// GetCallback is exported for testing only.
func (i *Isolate) GetCallback(ref int) FunctionCallback {
return i.getCallback(ref)
}
// Register is exported for testing only.
func (c *Context) Register() {
c.register()
}
// Deregister is exported for testing only.
func (c *Context) Deregister() {
c.deregister()
}
// GetContext is exported for testing only.
var GetContext = getContext
// Ref is exported for testing only.
func (c *Context) Ref() int {
return c.ref
}