Index: src/runtime.cc |
=================================================================== |
--- src/runtime.cc (revision 1573) |
+++ src/runtime.cc (working copy) |
@@ -4432,8 +4432,10 @@ |
context_ext = Handle<JSObject>(Top::context()->global()); |
} |
- // Set the property, but ignore if read_only variable. |
- if ((attributes & READ_ONLY) == 0) { |
+ // Set the property, but ignore if read_only variable on the context |
+ // extension object itself. |
+ if ((attributes & READ_ONLY) == 0 || |
+ (context_ext->GetLocalPropertyAttribute(*name) == ABSENT)) { |
Handle<Object> set = SetProperty(context_ext, name, value, attributes); |
if (set.is_null()) { |
// Failure::Exception is converted to a null handle in the |