OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 } | 68 } |
69 | 69 |
70 const ScriptObject& InjectedScriptBase::injectedScriptObject() const | 70 const ScriptObject& InjectedScriptBase::injectedScriptObject() const |
71 { | 71 { |
72 return m_injectedScriptObject; | 72 return m_injectedScriptObject; |
73 } | 73 } |
74 | 74 |
75 ScriptValue InjectedScriptBase::callFunctionWithEvalEnabled(ScriptFunctionCall&
function, bool& hadException) const | 75 ScriptValue InjectedScriptBase::callFunctionWithEvalEnabled(ScriptFunctionCall&
function, bool& hadException) const |
76 { | 76 { |
77 ExecutionContext* executionContext = m_injectedScriptObject.scriptState()->e
xecutionContext(); | 77 ExecutionContext* executionContext = m_injectedScriptObject.scriptState()->e
xecutionContext(); |
78 InspectorInstrumentationCookie cookie = InspectorInstrumentation::willCallFu
nction(executionContext, name(), 1); | 78 InspectorInstrumentationCookie cookie = InspectorInstrumentation::willCallFu
nction(executionContext, 0, name(), 1); |
79 | 79 |
80 ScriptState* scriptState = m_injectedScriptObject.scriptState(); | 80 ScriptState* scriptState = m_injectedScriptObject.scriptState(); |
81 bool evalIsDisabled = false; | 81 bool evalIsDisabled = false; |
82 if (scriptState) { | 82 if (scriptState) { |
83 evalIsDisabled = !scriptState->evalEnabled(); | 83 evalIsDisabled = !scriptState->evalEnabled(); |
84 // Temporarily enable allow evals for inspector. | 84 // Temporarily enable allow evals for inspector. |
85 if (evalIsDisabled) | 85 if (evalIsDisabled) |
86 scriptState->setEvalEnabled(true); | 86 scriptState->setEvalEnabled(true); |
87 } | 87 } |
88 | 88 |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 if (!resultObj || !resultPair->getBoolean("wasThrown", &wasThrownVal)) { | 138 if (!resultObj || !resultPair->getBoolean("wasThrown", &wasThrownVal)) { |
139 *errorString = "Internal error: result is not a pair of value and wasThr
own flag"; | 139 *errorString = "Internal error: result is not a pair of value and wasThr
own flag"; |
140 return; | 140 return; |
141 } | 141 } |
142 *objectResult = TypeBuilder::Runtime::RemoteObject::runtimeCast(resultObj); | 142 *objectResult = TypeBuilder::Runtime::RemoteObject::runtimeCast(resultObj); |
143 *wasThrown = wasThrownVal; | 143 *wasThrown = wasThrownVal; |
144 } | 144 } |
145 | 145 |
146 } // namespace WebCore | 146 } // namespace WebCore |
147 | 147 |
OLD | NEW |