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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 InjectedScript::InjectedScript() | 50 InjectedScript::InjectedScript() |
51 : InjectedScriptBase("InjectedScript") | 51 : InjectedScriptBase("InjectedScript") |
52 { | 52 { |
53 } | 53 } |
54 | 54 |
55 InjectedScript::InjectedScript(ScriptValue injectedScriptObject, InspectedStateA
ccessCheck accessCheck) | 55 InjectedScript::InjectedScript(ScriptValue injectedScriptObject, InspectedStateA
ccessCheck accessCheck) |
56 : InjectedScriptBase("InjectedScript", injectedScriptObject, accessCheck) | 56 : InjectedScriptBase("InjectedScript", injectedScriptObject, accessCheck) |
57 { | 57 { |
58 } | 58 } |
59 | 59 |
60 void InjectedScript::evaluate(ErrorString* errorString, const String& expression
, const String& objectGroup, bool includeCommandLineAPI, bool returnByValue, boo
l generatePreview, RefPtr<TypeBuilder::Runtime::RemoteObject>* result, TypeBuild
er::OptOutput<bool>* wasThrown) | 60 void InjectedScript::evaluate(ErrorString* errorString, const String& expression
, const String& objectGroup, bool includeCommandLineAPI, bool returnByValue, boo
l generatePreview, RefPtr<TypeBuilder::Runtime::RemoteObject>* result, TypeBuild
er::OptOutput<bool>* wasThrown, RefPtr<TypeBuilder::Debugger::ExceptionDetails>*
exceptionDetails) |
61 { | 61 { |
62 ScriptFunctionCall function(injectedScriptObject(), "evaluate"); | 62 ScriptFunctionCall function(injectedScriptObject(), "evaluate"); |
63 function.appendArgument(expression); | 63 function.appendArgument(expression); |
64 function.appendArgument(objectGroup); | 64 function.appendArgument(objectGroup); |
65 function.appendArgument(includeCommandLineAPI); | 65 function.appendArgument(includeCommandLineAPI); |
66 function.appendArgument(returnByValue); | 66 function.appendArgument(returnByValue); |
67 function.appendArgument(generatePreview); | 67 function.appendArgument(generatePreview); |
68 makeEvalCall(errorString, function, result, wasThrown); | 68 makeEvalCall(errorString, function, result, wasThrown, exceptionDetails); |
69 } | 69 } |
70 | 70 |
71 void InjectedScript::callFunctionOn(ErrorString* errorString, const String& obje
ctId, const String& expression, const String& arguments, bool returnByValue, boo
l generatePreview, RefPtr<TypeBuilder::Runtime::RemoteObject>* result, TypeBuild
er::OptOutput<bool>* wasThrown) | 71 void InjectedScript::callFunctionOn(ErrorString* errorString, const String& obje
ctId, const String& expression, const String& arguments, bool returnByValue, boo
l generatePreview, RefPtr<TypeBuilder::Runtime::RemoteObject>* result, TypeBuild
er::OptOutput<bool>* wasThrown) |
72 { | 72 { |
73 ScriptFunctionCall function(injectedScriptObject(), "callFunctionOn"); | 73 ScriptFunctionCall function(injectedScriptObject(), "callFunctionOn"); |
74 function.appendArgument(objectId); | 74 function.appendArgument(objectId); |
75 function.appendArgument(expression); | 75 function.appendArgument(expression); |
76 function.appendArgument(arguments); | 76 function.appendArgument(arguments); |
77 function.appendArgument(returnByValue); | 77 function.appendArgument(returnByValue); |
78 function.appendArgument(generatePreview); | 78 function.appendArgument(generatePreview); |
79 makeEvalCall(errorString, function, result, wasThrown); | 79 makeEvalCall(errorString, function, result, wasThrown); |
80 } | 80 } |
81 | 81 |
82 void InjectedScript::evaluateOnCallFrame(ErrorString* errorString, const ScriptV
alue& callFrames, const Vector<ScriptValue>& asyncCallStacks, const String& call
FrameId, const String& expression, const String& objectGroup, bool includeComman
dLineAPI, bool returnByValue, bool generatePreview, RefPtr<RemoteObject>* result
, TypeBuilder::OptOutput<bool>* wasThrown) | 82 void InjectedScript::evaluateOnCallFrame(ErrorString* errorString, const ScriptV
alue& callFrames, const Vector<ScriptValue>& asyncCallStacks, const String& call
FrameId, const String& expression, const String& objectGroup, bool includeComman
dLineAPI, bool returnByValue, bool generatePreview, RefPtr<RemoteObject>* result
, TypeBuilder::OptOutput<bool>* wasThrown, RefPtr<TypeBuilder::Debugger::Excepti
onDetails>* exceptionDetails) |
83 { | 83 { |
84 ScriptFunctionCall function(injectedScriptObject(), "evaluateOnCallFrame"); | 84 ScriptFunctionCall function(injectedScriptObject(), "evaluateOnCallFrame"); |
85 function.appendArgument(callFrames); | 85 function.appendArgument(callFrames); |
86 function.appendArgument(asyncCallStacks); | 86 function.appendArgument(asyncCallStacks); |
87 function.appendArgument(callFrameId); | 87 function.appendArgument(callFrameId); |
88 function.appendArgument(expression); | 88 function.appendArgument(expression); |
89 function.appendArgument(objectGroup); | 89 function.appendArgument(objectGroup); |
90 function.appendArgument(includeCommandLineAPI); | 90 function.appendArgument(includeCommandLineAPI); |
91 function.appendArgument(returnByValue); | 91 function.appendArgument(returnByValue); |
92 function.appendArgument(generatePreview); | 92 function.appendArgument(generatePreview); |
93 makeEvalCall(errorString, function, result, wasThrown); | 93 makeEvalCall(errorString, function, result, wasThrown, exceptionDetails); |
94 } | 94 } |
95 | 95 |
96 void InjectedScript::restartFrame(ErrorString* errorString, const ScriptValue& c
allFrames, const String& callFrameId, RefPtr<JSONObject>* result) | 96 void InjectedScript::restartFrame(ErrorString* errorString, const ScriptValue& c
allFrames, const String& callFrameId, RefPtr<JSONObject>* result) |
97 { | 97 { |
98 ScriptFunctionCall function(injectedScriptObject(), "restartFrame"); | 98 ScriptFunctionCall function(injectedScriptObject(), "restartFrame"); |
99 function.appendArgument(callFrames); | 99 function.appendArgument(callFrames); |
100 function.appendArgument(callFrameId); | 100 function.appendArgument(callFrameId); |
101 RefPtr<JSONValue> resultValue; | 101 RefPtr<JSONValue> resultValue; |
102 makeCall(function, &resultValue); | 102 makeCall(function, &resultValue); |
103 if (resultValue) { | 103 if (resultValue) { |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
317 ASSERT(!hadException); | 317 ASSERT(!hadException); |
318 } | 318 } |
319 | 319 |
320 ScriptValue InjectedScript::nodeAsScriptValue(Node* node) | 320 ScriptValue InjectedScript::nodeAsScriptValue(Node* node) |
321 { | 321 { |
322 return InjectedScriptHost::nodeAsScriptValue(scriptState(), node); | 322 return InjectedScriptHost::nodeAsScriptValue(scriptState(), node); |
323 } | 323 } |
324 | 324 |
325 } // namespace WebCore | 325 } // namespace WebCore |
326 | 326 |
OLD | NEW |