Chromium Code Reviews| Index: src/v8natives.js |
| diff --git a/src/v8natives.js b/src/v8natives.js |
| index 50a2774d122072654cabadc5b8e0a9d8a4f81921..afa18cb4ddc20d0df8b0f9a29cfa075329edb8ec 100644 |
| --- a/src/v8natives.js |
| +++ b/src/v8natives.js |
| @@ -615,7 +615,9 @@ function DefineOwnProperty(obj, p, desc, should_throw) { |
| } else { |
| flag |= READ_ONLY; |
| } |
| - %DefineOrRedefineDataProperty(obj, p, desc.getValue(), flag); |
| + var value = |
|
Rico
2010/12/10 10:42:35
Maybe add a comment that states that this actually
Kevin Millikin (Chromium)
2010/12/10 11:08:23
I would actually suggest writing it just like the
Lasse Reichstein
2010/12/10 11:21:45
Changed to:
var value; // Default value is undef
Kevin Millikin (Chromium)
2010/12/10 11:28:20
I still think that's too cute. This is a long fun
Lasse Reichstein
2010/12/10 11:37:51
True, good point.
I'll make a new CL and make it
|
| + desc.hasValue() ? desc.getValue() : (current && current.getValue()); |
| + %DefineOrRedefineDataProperty(obj, p, value, flag); |
| } else { |
| if (desc.hasGetter() && IS_FUNCTION(desc.getGet())) { |
| %DefineOrRedefineAccessorProperty(obj, p, GETTER, desc.getGet(), flag); |