2 +----------------------------------------------------------------------+
4 +----------------------------------------------------------------------+
5 | Copyright (c) 2010-present Facebook, Inc. (http://www.facebook.com) |
6 +----------------------------------------------------------------------+
7 | This source file is subject to version 3.01 of the PHP license, |
8 | that is bundled with this package in the file LICENSE, and is |
9 | available through the world-wide-web at the following url: |
10 | http://www.php.net/license/3_01.txt |
11 | If you did not receive a copy of the PHP license and are unable to |
12 | obtain it through the world-wide-web, please send a note to |
13 | license@php.net so we can mail you a copy immediately. |
14 +----------------------------------------------------------------------+
17 #ifndef incl_HPHP_REQUEST_INJECTION_DATA_INL_H_
18 #error "Can only be included by request-injection-data.h"
22 ////////////////////////////////////////////////////////////////////////////////
24 inline int RequestInjectionData::getTimeout() const {
25 return m_timer
.m_timeoutSeconds
;
28 inline int RequestInjectionData::getCPUTimeout() const {
29 return m_cpuTimer
.m_timeoutSeconds
;
33 * Returns the amount of seconds until user callback is invoked
35 inline int RequestInjectionData::getUserTimeout() const {
36 return m_userTimeoutTimer
.m_timeoutSeconds
;
39 inline bool RequestInjectionData::getJit() const {
43 inline bool RequestInjectionData::isJittingDisabled() const {
44 return m_jittingDisabled
;
47 inline void RequestInjectionData::setJittingDisabled(bool flag
) {
48 m_jittingDisabled
= flag
;
51 inline bool RequestInjectionData::getJitFolding() const {
55 inline void RequestInjectionData::setJitFolding(bool flag
) {
59 #define HC(Opt, ...) \
60 inline bool RequestInjectionData::getSuppressHAC##Opt##Notices() const { \
61 return m_suppressHAC##Opt; \
63 inline void RequestInjectionData::setSuppressHAC##Opt##Notices(bool flag) { \
64 m_suppressHAC##Opt = flag; \
69 inline bool RequestInjectionData::getCoverage() const {
73 inline void RequestInjectionData::setCoverage(bool flag
) {
78 inline bool RequestInjectionData::getDebuggerAttached() {
79 return m_debuggerAttached
;
82 inline void RequestInjectionData::setDebuggerAttached(bool flag
) {
83 m_debuggerAttached
= flag
;
87 inline size_t RequestInjectionData::getDebuggerStackDepth() const {
88 return m_activeLineBreaks
.size();
91 inline bool RequestInjectionData::getDebuggerForceIntr() const {
94 // Force interrupts when over an active line.
95 getActiveLineBreak() != -1 ||
96 // Interrupts forced while stepping in.
98 // Step out forces interrupts after we have exited the function.
99 m_debuggerStepOut
== StepOutState::Out
;
102 inline bool RequestInjectionData::getDebuggerIntr() const {
103 return m_debuggerIntr
;
106 inline void RequestInjectionData::setDebuggerIntr(bool flag
) {
107 m_debuggerIntr
= flag
;
111 inline bool RequestInjectionData::getDebuggerStepIn() const {
112 return m_debuggerStepIn
;
115 inline void RequestInjectionData::setDebuggerStepIn(bool flag
) {
116 m_debuggerStepIn
= flag
;
120 inline RequestInjectionData::StepOutState
121 RequestInjectionData::getDebuggerStepOut() const {
122 return m_debuggerStepOut
;
125 inline void RequestInjectionData::setDebuggerStepOut(StepOutState state
) {
126 m_debuggerStepOut
= state
;
130 inline bool RequestInjectionData::getDebuggerNext() const {
131 return m_debuggerNext
;
134 inline void RequestInjectionData::setDebuggerNext(bool flag
) {
135 m_debuggerNext
= flag
;
139 inline int RequestInjectionData::getDebuggerFlowDepth() const {
140 return m_debuggerFlowDepth
;
143 inline void RequestInjectionData::setDebuggerFlowDepth(int depth
) {
144 m_debuggerFlowDepth
= depth
;
147 inline int RequestInjectionData::getActiveLineBreak() const {
148 return m_activeLineBreaks
.empty() ? -1 : m_activeLineBreaks
.top();
151 inline void RequestInjectionData::clearActiveLineBreak() {
152 if (m_activeLineBreaks
.empty()) return;
153 m_activeLineBreaks
.top() = -1;
157 inline void RequestInjectionData::setActiveLineBreak(int line
) {
159 if (m_activeLineBreaks
.empty()) return;
160 m_activeLineBreaks
.top() = line
;
164 inline void RequestInjectionData::popActiveLineBreak() {
165 if (m_activeLineBreaks
.empty()) return;
166 m_activeLineBreaks
.pop();
170 inline void RequestInjectionData::pushActiveLineBreak() {
171 m_activeLineBreaks
.push(-1);
175 inline const std::vector
<std::string
>&
176 RequestInjectionData::getIncludePaths() const {
177 return m_include_paths
;
180 inline const std::string
& RequestInjectionData::getDefaultMimeType() const {
181 return m_defaultMimeType
;
184 inline int64_t RequestInjectionData::getErrorReportingLevel() {
185 return m_errorReportingLevel
;
188 inline void RequestInjectionData::setErrorReportingLevel(int64_t level
) {
189 m_errorReportingLevel
= level
;
192 inline int64_t RequestInjectionData::getMemoryLimitNumeric() const {
193 return m_maxMemoryNumeric
;
196 inline const std::string
& RequestInjectionData::getVariablesOrder() const {
197 return m_variablesOrder
;
200 inline void RequestInjectionData::setVariablesOrder(const std::string
& order
) {
201 m_variablesOrder
= order
;
204 inline const std::string
& RequestInjectionData::getRequestOrder() const {
205 return m_requestOrder
;
208 inline void RequestInjectionData::setRequestOrder(const std::string
& order
) {
209 m_requestOrder
= order
;
212 inline int64_t RequestInjectionData::getSocketDefaultTimeout() const {
213 return m_socketDefaultTimeout
;
216 inline const std::string
& RequestInjectionData::getUserAgent() const {
220 inline void RequestInjectionData::setUserAgent(const std::string
& agent
) {
224 inline const std::string
& RequestInjectionData::getTimeZone() const {
228 inline void RequestInjectionData::setTimeZone(const std::string
& tz
) {
232 inline void RequestInjectionData::setSafeFileAccess(bool b
) {
233 m_safeFileAccess
= b
;
236 inline bool RequestInjectionData::hasSafeFileAccess() const {
237 return m_safeFileAccess
;
240 inline bool RequestInjectionData::hasHtmlErrors() const {
244 inline bool RequestInjectionData::logFunctionCalls() const {
245 return m_logFunctionCalls
;
247 ////////////////////////////////////////////////////////////////////////////////