Exemplo n.º 1
0
 public static unsafe bool SetProperty(
     JSContextPtr cx,
     JSHandleObject obj,
     string name,
     JSHandleValue vp
     ) {
     fixed(char *pName = name)
     return(SetUCProperty(cx, obj, (IntPtr)pName, (uint)name.Length, vp));
 }
Exemplo n.º 2
0
        public static JSHandleObject FromValue(Rooted <JS.Value> rval)
        {
            // Assert that we can actually convert the value into an object pointer.
            var ptr = rval.Value.AsObject;
            // Now get a handle to the value
            JSHandleValue v = rval;

            // HACK: Now take the value handle and turn it into an object handle.
            // This is valid because JS.Value type tagging is at the end of the 8 bytes.
            return(new JSHandleObject(v.AddressOfTarget));
        }
Exemplo n.º 3
0
 public bool SetProperty(JSContextPtr context, string name, JSHandleValue value)
 {
     return(JSAPI.SetProperty(context, TransientSelf(), name, value));
 }