Index: src/v8natives.js |
diff --git a/src/v8natives.js b/src/v8natives.js |
index 3cb9dfd63e756f2e080596a586dbff80ccf673e3..0c88eb17a671e310aa2aa91ce02c2bba79d31f1f 100644 |
--- a/src/v8natives.js |
+++ b/src/v8natives.js |
@@ -938,7 +938,8 @@ function ObjectSeal(obj) { |
for (var i = 0; i < names.length; i++) { |
var name = names[i]; |
var desc = GetOwnProperty(obj, name); |
- if (desc.isConfigurable()) desc.setConfigurable(false); |
+ if (!desc.isConfigurable()) continue; |
+ desc.setConfigurable(false); |
Lasse Reichstein
2011/06/10 09:09:10
Make it
if (desc.isConfigurable()) {
...
}
i
Mads Ager (chromium)
2011/06/10 09:13:41
Done.
|
DefineOwnProperty(obj, name, desc, true); |
} |
return ObjectPreventExtension(obj); |
@@ -954,6 +955,7 @@ function ObjectFreeze(obj) { |
for (var i = 0; i < names.length; i++) { |
var name = names[i]; |
var desc = GetOwnProperty(obj, name); |
+ if (!desc.isWritable() && !desc.isConfigurable()) continue; |
Lasse Reichstein
2011/06/10 09:09:10
Ditto here: invert the condition and put the rest
Mads Ager (chromium)
2011/06/10 09:13:41
Done.
|
if (IsDataDescriptor(desc)) desc.setWritable(false); |
if (desc.isConfigurable()) desc.setConfigurable(false); |
DefineOwnProperty(obj, name, desc, true); |