Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2010 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2010-2011 Google Inc. All rights reserved. | 3 * Copyright (C) 2010-2011 Google Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * | 8 * |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 54 using WebCore::TypeBuilder::Debugger::ScriptId; | 54 using WebCore::TypeBuilder::Debugger::ScriptId; |
| 55 using WebCore::TypeBuilder::Debugger::StackTrace; | 55 using WebCore::TypeBuilder::Debugger::StackTrace; |
| 56 using WebCore::TypeBuilder::Runtime::RemoteObject; | 56 using WebCore::TypeBuilder::Runtime::RemoteObject; |
| 57 | 57 |
| 58 namespace WebCore { | 58 namespace WebCore { |
| 59 | 59 |
| 60 namespace DebuggerAgentState { | 60 namespace DebuggerAgentState { |
| 61 static const char debuggerEnabled[] = "debuggerEnabled"; | 61 static const char debuggerEnabled[] = "debuggerEnabled"; |
| 62 static const char javaScriptBreakpoints[] = "javaScriptBreakopints"; | 62 static const char javaScriptBreakpoints[] = "javaScriptBreakopints"; |
| 63 static const char pauseOnExceptionsState[] = "pauseOnExceptionsState"; | 63 static const char pauseOnExceptionsState[] = "pauseOnExceptionsState"; |
| 64 static const char asyncCallStackDepth[] = "asyncCallStackDepth"; | |
| 64 | 65 |
| 65 // Breakpoint properties. | 66 // Breakpoint properties. |
| 66 static const char url[] = "url"; | 67 static const char url[] = "url"; |
| 67 static const char isRegex[] = "isRegex"; | 68 static const char isRegex[] = "isRegex"; |
| 68 static const char lineNumber[] = "lineNumber"; | 69 static const char lineNumber[] = "lineNumber"; |
| 69 static const char columnNumber[] = "columnNumber"; | 70 static const char columnNumber[] = "columnNumber"; |
| 70 static const char condition[] = "condition"; | 71 static const char condition[] = "condition"; |
| 71 static const char isAnti[] = "isAnti"; | 72 static const char isAnti[] = "isAnti"; |
| 72 static const char skipStackPattern[] = "skipStackPattern"; | 73 static const char skipStackPattern[] = "skipStackPattern"; |
| 73 static const char skipAllPauses[] = "skipAllPauses"; | 74 static const char skipAllPauses[] = "skipAllPauses"; |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 189 enable(); | 190 enable(); |
| 190 long pauseState = m_state->getLong(DebuggerAgentState::pauseOnExceptions State); | 191 long pauseState = m_state->getLong(DebuggerAgentState::pauseOnExceptions State); |
| 191 String error; | 192 String error; |
| 192 setPauseOnExceptionsImpl(&error, pauseState); | 193 setPauseOnExceptionsImpl(&error, pauseState); |
| 193 m_cachedSkipStackRegExp = compileSkipCallFramePattern(m_state->getString (DebuggerAgentState::skipStackPattern)); | 194 m_cachedSkipStackRegExp = compileSkipCallFramePattern(m_state->getString (DebuggerAgentState::skipStackPattern)); |
| 194 m_skipAllPauses = m_state->getBoolean(DebuggerAgentState::skipAllPauses) ; | 195 m_skipAllPauses = m_state->getBoolean(DebuggerAgentState::skipAllPauses) ; |
| 195 if (m_skipAllPauses && m_state->getBoolean(DebuggerAgentState::skipAllPa usesExpiresOnReload)) { | 196 if (m_skipAllPauses && m_state->getBoolean(DebuggerAgentState::skipAllPa usesExpiresOnReload)) { |
| 196 m_skipAllPauses = false; | 197 m_skipAllPauses = false; |
| 197 m_state->setBoolean(DebuggerAgentState::skipAllPauses, false); | 198 m_state->setBoolean(DebuggerAgentState::skipAllPauses, false); |
| 198 } | 199 } |
| 200 m_asyncCallStackTracker.setAsyncCallStackDepth(m_state->getLong(Debugger AgentState::asyncCallStackDepth)); | |
| 199 } | 201 } |
| 200 } | 202 } |
| 201 | 203 |
| 202 void InspectorDebuggerAgent::setFrontend(InspectorFrontend* frontend) | 204 void InspectorDebuggerAgent::setFrontend(InspectorFrontend* frontend) |
| 203 { | 205 { |
| 204 m_frontend = frontend->debugger(); | 206 m_frontend = frontend->debugger(); |
| 205 } | 207 } |
| 206 | 208 |
| 207 void InspectorDebuggerAgent::clearFrontend() | 209 void InspectorDebuggerAgent::clearFrontend() |
| 208 { | 210 { |
| (...skipping 715 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 924 *errorString = "Invalid regular expression"; | 926 *errorString = "Invalid regular expression"; |
| 925 return; | 927 return; |
| 926 } | 928 } |
| 927 } | 929 } |
| 928 m_state->setString(DebuggerAgentState::skipStackPattern, patternValue); | 930 m_state->setString(DebuggerAgentState::skipStackPattern, patternValue); |
| 929 m_cachedSkipStackRegExp = compiled.release(); | 931 m_cachedSkipStackRegExp = compiled.release(); |
| 930 } | 932 } |
| 931 | 933 |
| 932 void InspectorDebuggerAgent::setAsyncCallStackDepth(ErrorString*, int depth) | 934 void InspectorDebuggerAgent::setAsyncCallStackDepth(ErrorString*, int depth) |
| 933 { | 935 { |
| 936 m_state->setLong(DebuggerAgentState::asyncCallStackDepth, depth); | |
|
pfeldman
2013/12/10 17:20:54
You want to clear it in disable. Otherwise:
- ena
aandrey
2013/12/11 08:14:18
Done.
| |
| 934 m_asyncCallStackTracker.setAsyncCallStackDepth(depth); | 937 m_asyncCallStackTracker.setAsyncCallStackDepth(depth); |
| 935 } | 938 } |
| 936 | 939 |
| 937 void InspectorDebuggerAgent::scriptExecutionBlockedByCSP(const String& directive Text) | 940 void InspectorDebuggerAgent::scriptExecutionBlockedByCSP(const String& directive Text) |
| 938 { | 941 { |
| 939 if (scriptDebugServer().pauseOnExceptionsState() != ScriptDebugServer::DontP auseOnExceptions) { | 942 if (scriptDebugServer().pauseOnExceptionsState() != ScriptDebugServer::DontP auseOnExceptions) { |
| 940 RefPtr<JSONObject> directive = JSONObject::create(); | 943 RefPtr<JSONObject> directive = JSONObject::create(); |
| 941 directive->setString("directiveText", directiveText); | 944 directive->setString("directiveText", directiveText); |
| 942 breakProgram(InspectorFrontend::Debugger::Reason::CSPViolation, directiv e.release()); | 945 breakProgram(InspectorFrontend::Debugger::Reason::CSPViolation, directiv e.release()); |
| 943 } | 946 } |
| (...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1161 { | 1164 { |
| 1162 m_scripts.clear(); | 1165 m_scripts.clear(); |
| 1163 m_breakpointIdToDebugServerBreakpointIds.clear(); | 1166 m_breakpointIdToDebugServerBreakpointIds.clear(); |
| 1164 m_asyncCallStackTracker.clear(); | 1167 m_asyncCallStackTracker.clear(); |
| 1165 if (m_frontend) | 1168 if (m_frontend) |
| 1166 m_frontend->globalObjectCleared(); | 1169 m_frontend->globalObjectCleared(); |
| 1167 } | 1170 } |
| 1168 | 1171 |
| 1169 } // namespace WebCore | 1172 } // namespace WebCore |
| 1170 | 1173 |
| OLD | NEW |