Index: src/v8natives.js |
diff --git a/src/v8natives.js b/src/v8natives.js |
index 3978e88685156e69ec1660f1ea76d2f8b845b3b9..8563c2e8672f8f71c4f38adf28b3ee2aa2fca703 100644 |
--- a/src/v8natives.js |
+++ b/src/v8natives.js |
@@ -1240,16 +1240,16 @@ function ObjectIsSealed(obj) { |
if (%IsJSProxy(obj)) { |
return false; |
} |
+ if (%IsExtensible(obj)) { |
+ return false; |
+ } |
var names = ObjectGetOwnPropertyNames(obj); |
for (var i = 0; i < names.length; i++) { |
var name = names[i]; |
var desc = GetOwnProperty(obj, name); |
if (desc.isConfigurable()) return false; |
} |
- if (!ObjectIsExtensible(obj)) { |
- return true; |
- } |
- return false; |
+ return true; |
} |
@@ -1261,6 +1261,9 @@ function ObjectIsFrozen(obj) { |
if (%IsJSProxy(obj)) { |
return false; |
} |
+ if (%IsExtensible(obj)) { |
+ return false; |
+ } |
var names = ObjectGetOwnPropertyNames(obj); |
for (var i = 0; i < names.length; i++) { |
var name = names[i]; |
@@ -1268,10 +1271,7 @@ function ObjectIsFrozen(obj) { |
if (IsDataDescriptor(desc) && desc.isWritable()) return false; |
if (desc.isConfigurable()) return false; |
} |
- if (!ObjectIsExtensible(obj)) { |
- return true; |
- } |
- return false; |
+ return true; |
} |