| Index: src/ast.cc
|
| diff --git a/src/ast.cc b/src/ast.cc
|
| index f34c7bb24aac7d500016acb4d62a846eadf82ce1..e0bca67aab1bd32545fd2d1c498c459934fb15f5 100644
|
| --- a/src/ast.cc
|
| +++ b/src/ast.cc
|
| @@ -565,11 +565,16 @@ bool Call::ComputeTarget(Handle<Map> type, Handle<String> name) {
|
| type->LookupDescriptor(NULL, *name, &lookup);
|
| if (lookup.IsFound()) {
|
| switch (lookup.type()) {
|
| - case CONSTANT_FUNCTION:
|
| + case CONSTANT: {
|
| // We surely know the target for a constant function.
|
| - target_ =
|
| - Handle<JSFunction>(lookup.GetConstantFunctionFromMap(*type));
|
| - return true;
|
| + Handle<Object> constant(lookup.GetConstantFromMap(*type),
|
| + type->GetIsolate());
|
| + if (constant->IsJSFunction()) {
|
| + target_ = Handle<JSFunction>::cast(constant);
|
| + return true;
|
| + }
|
| + // Fall through.
|
| + }
|
| case NORMAL:
|
| case FIELD:
|
| case CALLBACKS:
|
|
|