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) 2013 Google Inc. All rights reserved. | 3 * Copyright (C) 2013 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 1165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1176 m_state->setBoolean(DebuggerAgentState::promiseTrackerEnabled, true); | 1176 m_state->setBoolean(DebuggerAgentState::promiseTrackerEnabled, true); |
1177 promiseTracker().setEnabled(true); | 1177 promiseTracker().setEnabled(true); |
1178 } | 1178 } |
1179 | 1179 |
1180 void InspectorDebuggerAgent::disablePromiseTracker(ErrorString*) | 1180 void InspectorDebuggerAgent::disablePromiseTracker(ErrorString*) |
1181 { | 1181 { |
1182 m_state->setBoolean(DebuggerAgentState::promiseTrackerEnabled, false); | 1182 m_state->setBoolean(DebuggerAgentState::promiseTrackerEnabled, false); |
1183 promiseTracker().setEnabled(false); | 1183 promiseTracker().setEnabled(false); |
1184 } | 1184 } |
1185 | 1185 |
1186 void InspectorDebuggerAgent::getPromises(ErrorString*, RefPtr<Array<PromiseDetai
ls> >& promises) | 1186 void InspectorDebuggerAgent::getPromises(ErrorString* errorString, RefPtr<Array<
PromiseDetails> >& promises) |
1187 { | 1187 { |
1188 if (!promiseTracker().isEnabled()) | 1188 if (!promiseTracker().isEnabled()) { |
| 1189 *errorString = "Promise tracking is disabled"; |
1189 return; | 1190 return; |
| 1191 } |
1190 promises = promiseTracker().promises(); | 1192 promises = promiseTracker().promises(); |
1191 } | 1193 } |
1192 | 1194 |
1193 void InspectorDebuggerAgent::scriptExecutionBlockedByCSP(const String& directive
Text) | 1195 void InspectorDebuggerAgent::scriptExecutionBlockedByCSP(const String& directive
Text) |
1194 { | 1196 { |
1195 if (scriptDebugServer().pauseOnExceptionsState() != ScriptDebugServer::DontP
auseOnExceptions) { | 1197 if (scriptDebugServer().pauseOnExceptionsState() != ScriptDebugServer::DontP
auseOnExceptions) { |
1196 RefPtr<JSONObject> directive = JSONObject::create(); | 1198 RefPtr<JSONObject> directive = JSONObject::create(); |
1197 directive->setString("directiveText", directiveText); | 1199 directive->setString("directiveText", directiveText); |
1198 breakProgram(InspectorFrontend::Debugger::Reason::CSPViolation, directiv
e.release()); | 1200 breakProgram(InspectorFrontend::Debugger::Reason::CSPViolation, directiv
e.release()); |
1199 } | 1201 } |
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1505 visitor->trace(m_injectedScriptManager); | 1507 visitor->trace(m_injectedScriptManager); |
1506 visitor->trace(m_listener); | 1508 visitor->trace(m_listener); |
1507 visitor->trace(m_asyncCallStackTracker); | 1509 visitor->trace(m_asyncCallStackTracker); |
1508 #if ENABLE(OILPAN) | 1510 #if ENABLE(OILPAN) |
1509 visitor->trace(m_promiseTracker); | 1511 visitor->trace(m_promiseTracker); |
1510 #endif | 1512 #endif |
1511 InspectorBaseAgent::trace(visitor); | 1513 InspectorBaseAgent::trace(visitor); |
1512 } | 1514 } |
1513 | 1515 |
1514 } // namespace blink | 1516 } // namespace blink |
OLD | NEW |