| Index: src/api.cc | 
| =================================================================== | 
| --- src/api.cc	(revision 2498) | 
| +++ src/api.cc	(working copy) | 
| @@ -2480,7 +2480,7 @@ | 
| return NULL; | 
| } | 
|  | 
| -  // Unaligned native pointer | 
| +  // Unaligned native pointer. | 
| return reinterpret_cast<void*>(i::Proxy::cast(pointer)->proxy()); | 
| } | 
|  | 
| @@ -2492,12 +2492,12 @@ | 
| // Aligned pointer, store as is. | 
| obj->SetInternalField(index, as_object); | 
| } else { | 
| -    // Currently internal fields are used by DOM wrappers which | 
| -    // only get GCed by the mark-sweep collector, | 
| -    // so let's put proxy into old space. | 
| -    i::Proxy* proxy = *i::Factory::NewProxy(reinterpret_cast<i::Address>(value), | 
| -                                            i::TENURED); | 
| -    obj->SetInternalField(index, proxy); | 
| +    // Currently internal fields are used by DOM wrappers which only | 
| +    // get garbage collected by the mark-sweep collector, so we | 
| +    // pretenure the proxy. | 
| +    i::Handle<i::Proxy> proxy = | 
| +        i::Factory::NewProxy(reinterpret_cast<i::Address>(value), i::TENURED); | 
| +    if (!proxy.is_null()) obj->SetInternalField(index, *proxy); | 
| } | 
| } | 
|  | 
|  |