diff --git a/Jint/Native/Function/FunctionInstance.cs b/Jint/Native/Function/FunctionInstance.cs
index 0670f6f135..44ec6525ac 100644
--- a/Jint/Native/Function/FunctionInstance.cs
+++ b/Jint/Native/Function/FunctionInstance.cs
@@ -257,7 +257,7 @@ internal Realm GetFunctionRealm(JsValue obj)
return GetFunctionRealm(bindFunctionInstance.BoundTargetFunction);
}
- if (obj is ProxyInstance proxyInstance)
+ if (obj is JsProxy proxyInstance)
{
if (proxyInstance._handler is null)
{
diff --git a/Jint/Native/Json/JsonSerializer.cs b/Jint/Native/Json/JsonSerializer.cs
index 3f2deb79a9..fe17770993 100644
--- a/Jint/Native/Json/JsonSerializer.cs
+++ b/Jint/Native/Json/JsonSerializer.cs
@@ -285,7 +285,7 @@ private static bool CanSerializesAsArray(ObjectInstance value)
return true;
}
- if (value is ProxyInstance proxyInstance && CanSerializesAsArray(proxyInstance._target))
+ if (value is JsProxy proxyInstance && CanSerializesAsArray(proxyInstance._target))
{
return true;
}
diff --git a/Jint/Native/Object/ObjectPrototype.cs b/Jint/Native/Object/ObjectPrototype.cs
index 6dfa827509..9dbaa826df 100644
--- a/Jint/Native/Object/ObjectPrototype.cs
+++ b/Jint/Native/Object/ObjectPrototype.cs
@@ -269,7 +269,7 @@ internal JsValue ToObjectString(JsValue thisObject, JsValue[] arguments)
}
else
{
- tag = (o is ProxyInstance ? ObjectClass.Object : o.Class).ToString();
+ tag = (o is JsProxy ? ObjectClass.Object : o.Class).ToString();
}
}
diff --git a/Jint/Native/Proxy/ProxyInstance.cs b/Jint/Native/Proxy/JsProxy.cs
similarity index 99%
rename from Jint/Native/Proxy/ProxyInstance.cs
rename to Jint/Native/Proxy/JsProxy.cs
index db0f721663..463cf05529 100644
--- a/Jint/Native/Proxy/ProxyInstance.cs
+++ b/Jint/Native/Proxy/JsProxy.cs
@@ -5,7 +5,7 @@
namespace Jint.Native.Proxy
{
- internal sealed class ProxyInstance : ObjectInstance, IConstructor, ICallable
+ internal sealed class JsProxy : ObjectInstance, IConstructor, ICallable
{
internal ObjectInstance _target;
internal ObjectInstance? _handler;
@@ -27,7 +27,7 @@ internal sealed class ProxyInstance : ObjectInstance, IConstructor, ICallable
private static readonly JsString KeyFunctionRevoke = new JsString("revoke");
private static readonly JsString KeyIsArray = new JsString("isArray");
- public ProxyInstance(
+ public JsProxy(
Engine engine,
ObjectInstance target,
ObjectInstance handler)
diff --git a/Jint/Native/Proxy/ProxyConstructor.cs b/Jint/Native/Proxy/ProxyConstructor.cs
index 4d0950337d..d06fdcd237 100644
--- a/Jint/Native/Proxy/ProxyConstructor.cs
+++ b/Jint/Native/Proxy/ProxyConstructor.cs
@@ -50,7 +50,7 @@ public override ObjectInstance Construct(JsValue[] arguments, JsValue newTarget)
///
/// https://tc39.es/ecma262/#sec-proxy-target-handler
///
- public ProxyInstance Construct(JsValue target, JsValue handler)
+ public JsProxy Construct(JsValue target, JsValue handler)
{
return ProxyCreate(target, handler);
}
@@ -78,7 +78,7 @@ JsValue Revoke(JsValue thisObject, JsValue[] arguments)
///
/// https://tc39.es/ecma262/#sec-proxycreate
///
- private ProxyInstance ProxyCreate(JsValue target, JsValue handler)
+ private JsProxy ProxyCreate(JsValue target, JsValue handler)
{
if (target is not ObjectInstance targetObject)
{
@@ -92,7 +92,7 @@ private ProxyInstance ProxyCreate(JsValue target, JsValue handler)
return null;
}
- var p = new ProxyInstance(Engine, targetObject, targetHandler);
+ var p = new JsProxy(Engine, targetObject, targetHandler);
return p;
}
}