| Index: src/ast.cc
|
| ===================================================================
|
| --- src/ast.cc (revision 6724)
|
| +++ src/ast.cc (working copy)
|
| @@ -618,7 +618,9 @@
|
| cell_ = Handle<JSGlobalPropertyCell>::null();
|
| LookupResult lookup;
|
| global->Lookup(*name, &lookup);
|
| - if (lookup.IsProperty() && lookup.type() == NORMAL) {
|
| + if (lookup.IsProperty() &&
|
| + lookup.type() == NORMAL &&
|
| + lookup.holder() == *global) {
|
| cell_ = Handle<JSGlobalPropertyCell>(global->GetPropertyCell(&lookup));
|
| if (cell_->value()->IsJSFunction()) {
|
| Handle<JSFunction> candidate(JSFunction::cast(cell_->value()));
|
|
|