Chromium Code Reviews| Index: src/execution.cc |
| diff --git a/src/execution.cc b/src/execution.cc |
| index db74492316103971ced0d1c27257ff1ecd1caed3..745a01512a5fd713478a8eb378d353782dbb1d86 100644 |
| --- a/src/execution.cc |
| +++ b/src/execution.cc |
| @@ -145,11 +145,16 @@ static Handle<Object> Invoke(bool construct, |
| } |
| -Handle<Object> Execution::Call(Handle<JSFunction> func, |
| +Handle<Object> Execution::Call(Handle<Object> callable, |
| Handle<Object> receiver, |
| int argc, |
| Object*** args, |
| bool* pending_exception) { |
| + if (!callable->IsJSFunction()) { |
| + callable = TryGetFunctionDelegate(callable, pending_exception); |
| + if (*pending_exception) return callable; |
| + } |
| + Handle<JSFunction> func(JSFunction::cast(*callable)); |
|
Kevin Millikin (Chromium)
2011/05/16 15:21:41
Should be
Handle<JSFunction> func = Handle<JSFunc
rossberg
2011/05/16 15:54:37
Done.
|
| return Invoke(false, func, receiver, argc, args, pending_exception); |
| } |