Exemple #1
0
		private static JSBool GlobalContextCallback(IntPtr cx, uint contextOp)
		{
			JSBool result = (_originalContextCallback != null) ? _originalContextCallback(cx, contextOp) : JSBool.JS_TRUE;
			if (result == JSBool.JS_TRUE)
			{
				switch (contextOp)
				{
					//case 0: // JSCONTEXT_NEW
					//	break;
					case 1: // JSCONTEXT_DESTROY
						foreach (var kwp in _windowContexts)
						{
							if (kwp.Value == cx)
							{
								_windowContexts.Remove(kwp.Key);
								break;
							}
						}
						break;
				}
			}
			return result;
		}
Exemple #2
0
        static unsafe JSBool global_resolve(
            JSContextPtr cx,
            JSHandleObject obj,
            JSHandleId id,
            ref JSObjectPtr objp
            )
        {
            JSBool resolved = false;

            objp = JSObjectPtr.Zero;

            if (!JSAPI.ResolveStandardClass(cx, obj, id, ref resolved))
            {
                return(false);
            }

            if (resolved)
            {
                objp = obj.Get();
                return(true);
            }

            return(true);
        }
Exemple #3
0
 public JSLogicalAnd(JSBool e1, JSBool e2)
 {
     this.e1 = e1;
     this.e2 = e2;
 }
Exemple #4
0
 public JSIfBool(JSBool conditional, JSBool ifResult, JSBool elseResult)
 {
     this.conditional = conditional;
     this.ifResult = ifResult;
     this.elseResult = elseResult;
 }
Exemple #5
0
 public JSAssignBool(JSBoolVar lhs,JSBool rhs)
 {
     this.lhs = lhs;
     this.rhs = rhs;
 }
Exemple #6
0
 public JSIfInt(JSBool conditional, JSInt ifResult, JSInt elseResult)
 {
     this.conditional = conditional;
     this.ifResult = ifResult;
     this.elseResult = elseResult;
 }