Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(394)

Side by Side Diff: Source/core/inspector/MainThreadDebugger.cpp

Issue 1307313005: DevTools: fix crash in ClientMessageLoopAdapter::run (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698