Chromium Code Reviews| Index: src/ic.cc |
| =================================================================== |
| --- src/ic.cc (revision 993) |
| +++ src/ic.cc (working copy) |
| @@ -355,14 +355,19 @@ |
| // If performing debug step into then flood this function with one-shot |
| // break points if it is called from where step into was requested. |
| if (Debug::StepInActive() && fp() == Debug::step_in_fp()) { |
| + // Protect the result in a handle as the debugger can allocate and might |
| + //cause GC. |
|
Mads Ager (chromium)
2008/12/18 09:37:11
space after //
|
| + HandleScope scope; |
| + Handle<Object> result_handle(result); |
| // Don't allow step into functions in the native context. |
| if (JSFunction::cast(result)->context()->global() != |
| Top::context()->builtins()) { |
| - HandleScope scope; |
| Handle<SharedFunctionInfo> shared(JSFunction::cast(result)->shared()); |
| Debug::FloodWithOneShot(shared); |
| } |
| + return *result_handle; |
| } |
| + |
| return result; |
| } |