Browse Source

Fixing [[Configurable]] check for accessors

Sebastien Ros 11 years ago
parent
commit
aec69fb32b
1 changed files with 2 additions and 4 deletions
  1. 2 4
      Jint/Native/Object/ObjectInstance.cs

+ 2 - 4
Jint/Native/Object/ObjectInstance.cs

@@ -554,11 +554,9 @@ namespace Jint.Native.Object
                 {
                 {
                     if (!current.Configurable.HasValue || !current.Configurable.Value.AsBoolean())
                     if (!current.Configurable.HasValue || !current.Configurable.Value.AsBoolean())
                     {
                     {
-                        if ((desc.Set.HasValue && desc.Set.Value != Undefined.Instance &&
-                            !ExpressionInterpreter.SameValue(desc.Set.Value, current.Set.HasValue ? current.Set.Value : Undefined.Instance))
+                        if ((desc.Set.HasValue && !ExpressionInterpreter.SameValue(desc.Set.Value, current.Set.HasValue ? current.Set.Value : Undefined.Instance))
                             ||
                             ||
-                            (desc.Get.HasValue && desc.Get.Value != Undefined.Instance &&
-                             !ExpressionInterpreter.SameValue(desc.Get.Value, current.Get.Value)))
+                            (desc.Get.HasValue && !ExpressionInterpreter.SameValue(desc.Get.Value, current.Get.HasValue ? current.Get.Value : Undefined.Instance)))
                         {
                         {
                             if (throwOnError)
                             if (throwOnError)
                             {
                             {