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 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 if (isEmpty() || !canAccessInspectedWindow()) | 214 if (isEmpty() || !canAccessInspectedWindow()) |
215 return 0; | 215 return 0; |
216 | 216 |
217 ScriptFunctionCall function(injectedScriptObject(), "nodeForObjectId"); | 217 ScriptFunctionCall function(injectedScriptObject(), "nodeForObjectId"); |
218 function.appendArgument(objectId); | 218 function.appendArgument(objectId); |
219 | 219 |
220 bool hadException = false; | 220 bool hadException = false; |
221 ScriptValue resultValue = callFunctionWithEvalEnabled(function, hadException
); | 221 ScriptValue resultValue = callFunctionWithEvalEnabled(function, hadException
); |
222 ASSERT(!hadException); | 222 ASSERT(!hadException); |
223 | 223 |
224 return InjectedScriptHost::scriptValueAsNode(resultValue); | 224 return InjectedScriptHost::scriptValueAsNode(scriptState(), resultValue); |
225 } | 225 } |
226 | 226 |
227 void InjectedScript::releaseObject(const String& objectId) | 227 void InjectedScript::releaseObject(const String& objectId) |
228 { | 228 { |
229 ScriptFunctionCall function(injectedScriptObject(), "releaseObject"); | 229 ScriptFunctionCall function(injectedScriptObject(), "releaseObject"); |
230 function.appendArgument(objectId); | 230 function.appendArgument(objectId); |
231 RefPtr<JSONValue> result; | 231 RefPtr<JSONValue> result; |
232 makeCall(function, &result); | 232 makeCall(function, &result); |
233 } | 233 } |
234 | 234 |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
332 ASSERT(!hadException); | 332 ASSERT(!hadException); |
333 } | 333 } |
334 | 334 |
335 ScriptValue InjectedScript::nodeAsScriptValue(Node* node) | 335 ScriptValue InjectedScript::nodeAsScriptValue(Node* node) |
336 { | 336 { |
337 return InjectedScriptHost::nodeAsScriptValue(scriptState(), node); | 337 return InjectedScriptHost::nodeAsScriptValue(scriptState(), node); |
338 } | 338 } |
339 | 339 |
340 } // namespace WebCore | 340 } // namespace WebCore |
341 | 341 |
OLD | NEW |