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

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

Issue 1180713005: DevTools: speculative fix of crash in PageDebuggerAgent::restore (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/inspector/PageDebuggerAgent.h ('k') | 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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 87
88 void PageDebuggerAgent::enable(ErrorString* errorString) 88 void PageDebuggerAgent::enable(ErrorString* errorString)
89 { 89 {
90 if (!canExecuteScripts()) { 90 if (!canExecuteScripts()) {
91 *errorString = "Script execution is prohibited"; 91 *errorString = "Script execution is prohibited";
92 return; 92 return;
93 } 93 }
94 InspectorDebuggerAgent::enable(errorString); 94 InspectorDebuggerAgent::enable(errorString);
95 } 95 }
96 96
97 void PageDebuggerAgent::restore()
98 {
99 if (canExecuteScripts())
100 InspectorDebuggerAgent::restore();
101 }
102
97 void PageDebuggerAgent::enable() 103 void PageDebuggerAgent::enable()
98 { 104 {
99 ASSERT(canExecuteScripts()); 105 ASSERT(canExecuteScripts());
100 InspectorDebuggerAgent::enable(); 106 InspectorDebuggerAgent::enable();
101 m_instrumentingAgents->setPageDebuggerAgent(this); 107 m_instrumentingAgents->setPageDebuggerAgent(this);
102 } 108 }
103 109
104 void PageDebuggerAgent::disable() 110 void PageDebuggerAgent::disable()
105 { 111 {
106 InspectorDebuggerAgent::disable(); 112 InspectorDebuggerAgent::disable();
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 RefPtrWillBeRawPtr<LocalFrame> protect(frame); 224 RefPtrWillBeRawPtr<LocalFrame> protect(frame);
219 InspectorDebuggerAgent::runScript(errorString, scriptId, executionContextId, objectGroup, doNotPauseOnExceptionsAndMuteConsole, result, exceptionDetails); 225 InspectorDebuggerAgent::runScript(errorString, scriptId, executionContextId, objectGroup, doNotPauseOnExceptionsAndMuteConsole, result, exceptionDetails);
220 226
221 if (frame) 227 if (frame)
222 InspectorInstrumentation::didEvaluateScript(cookie); 228 InspectorInstrumentation::didEvaluateScript(cookie);
223 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "Update Counters", TRACE_EVENT_SCOPE_THREAD, "data", InspectorUpdateCountersEvent::data( )); 229 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "Update Counters", TRACE_EVENT_SCOPE_THREAD, "data", InspectorUpdateCountersEvent::data( ));
224 230
225 } 231 }
226 232
227 } // namespace blink 233 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/inspector/PageDebuggerAgent.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698