Chromium Code Reviews| Index: src/debug.cc |
| diff --git a/src/debug.cc b/src/debug.cc |
| index 91af9ccc1bab32cb351006da1d51de108c6a006e..b862c51b0f26a5308f5bbe1266b0b21f6cf31c33 100644 |
| --- a/src/debug.cc |
| +++ b/src/debug.cc |
| @@ -874,8 +874,9 @@ bool Debug::Load() { |
| // Check for caught exceptions. |
| if (caught_exception) return false; |
| - // Debugger loaded. |
| - debug_context_ = context; |
| + // Debugger loaded, create debugger context global handle. |
| + debug_context_ = Handle<Context>::cast( |
|
Sven Panne
2013/04/09 07:08:33
I don't fully understand why this is necessary...
Michael Starzinger
2013/04/09 13:29:18
As discussed offline, this creates a persistent ha
|
| + isolate_->global_handles()->Create(*context)); |
| return true; |
| } |
| @@ -891,7 +892,7 @@ void Debug::Unload() { |
| DestroyScriptCache(); |
| // Clear debugger context global handle. |
| - Isolate::Current()->global_handles()->Destroy( |
| + isolate_->global_handles()->Destroy( |
| reinterpret_cast<Object**>(debug_context_.location())); |
| debug_context_ = Handle<Context>(); |
| } |