OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2011 Google Inc. All rights reserved. | 2 * Copyright (c) 2011 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 void MainThreadDebugger::interruptMainThreadAndRun(PassOwnPtr<InspectorTaskRunne
r::Task> task) | 117 void MainThreadDebugger::interruptMainThreadAndRun(PassOwnPtr<InspectorTaskRunne
r::Task> task) |
118 { | 118 { |
119 MutexLocker locker(creationMutex()); | 119 MutexLocker locker(creationMutex()); |
120 if (s_instance) | 120 if (s_instance) |
121 s_instance->m_taskRunner->interruptAndRun(task); | 121 s_instance->m_taskRunner->interruptAndRun(task); |
122 } | 122 } |
123 | 123 |
124 void MainThreadDebugger::runMessageLoopOnPause(v8::Local<v8::Context> context) | 124 void MainThreadDebugger::runMessageLoopOnPause(v8::Local<v8::Context> context) |
125 { | 125 { |
126 LocalFrame* frame = retrieveFrameWithGlobalObjectCheck(context); | 126 LocalFrame* frame = retrieveFrameWithGlobalObjectCheck(context); |
| 127 // Do not pause in Context of detached frame. |
| 128 if (!frame) |
| 129 return; |
127 LocalFrame* pausedFrame = frame->localFrameRoot(); | 130 LocalFrame* pausedFrame = frame->localFrameRoot(); |
128 // Wait for continue or step command. | 131 // Wait for continue or step command. |
129 m_clientMessageLoop->run(pausedFrame); | 132 m_clientMessageLoop->run(pausedFrame); |
130 } | 133 } |
131 | 134 |
132 void MainThreadDebugger::quitMessageLoopOnPause() | 135 void MainThreadDebugger::quitMessageLoopOnPause() |
133 { | 136 { |
134 m_clientMessageLoop->quitNow(); | 137 m_clientMessageLoop->quitNow(); |
135 } | 138 } |
136 | 139 |
137 } // namespace blink | 140 } // namespace blink |
OLD | NEW |