コード例 #1
0
ファイル: SymbolPrototype.cs プロジェクト: rockyjvec/SpaceJS
        private JsValue ToPrimitive(JsValue thisObject, JsValue[] arguments)
        {
            if (thisObject.IsSymbol())
            {
                return(thisObject);
            }

            // Steps 3. and 4.
            var o = thisObject.AsInstance <SymbolInstance>();

            if (ReferenceEquals(o, null))
            {
                ExceptionHelper.ThrowTypeError(Engine);
            }

            return(o.SymbolData);
        }