Chromium Code Reviews| Index: src/runtime.cc |
| diff --git a/src/runtime.cc b/src/runtime.cc |
| index e914a3ae3291ee411b2c3a80122b2725c507fd90..52a0a7b3c7139051f384eb2beef1ebe620f13e05 100644 |
| --- a/src/runtime.cc |
| +++ b/src/runtime.cc |
| @@ -4091,6 +4091,13 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_DefineOrRedefineDataProperty) { |
| if (callback->IsAccessorInfo()) { |
| return isolate->heap()->undefined_value(); |
| } |
| + // TODO(mstarzinger): The __proto__ property should actually be a real |
| + // JavaScript accessor instead of a foreign callback. But for now we just |
| + // avoid changing the writability attribute of this property. |
| + Handle<String> proto_string = isolate->factory()->proto_string(); |
| + if (callback->IsForeign() && proto_string->Equals(*name)) { |
| + attr = static_cast<PropertyAttributes>(attr & ~READ_ONLY); |
|
rossberg
2013/03/04 16:04:42
As discussed offline, this should also filter DONT
Michael Starzinger
2013/03/04 16:24:58
Done.
|
| + } |
| // Avoid redefining foreign callback as data property, just use the stored |
| // setter to update the value instead. |
| // TODO(mstarzinger): So far this only works if property attributes don't |