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 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
235 PassRefPtr<Array<CallFrame> > InjectedScript::wrapCallFrames(const ScriptValue& callFrames, int asyncOrdinal) | 235 PassRefPtr<Array<CallFrame> > InjectedScript::wrapCallFrames(const ScriptValue& callFrames, int asyncOrdinal) |
236 { | 236 { |
237 ASSERT(!isEmpty()); | 237 ASSERT(!isEmpty()); |
238 ScriptFunctionCall function(injectedScriptObject(), "wrapCallFrames"); | 238 ScriptFunctionCall function(injectedScriptObject(), "wrapCallFrames"); |
239 function.appendArgument(callFrames); | 239 function.appendArgument(callFrames); |
240 function.appendArgument(asyncOrdinal); | 240 function.appendArgument(asyncOrdinal); |
241 bool hadException = false; | 241 bool hadException = false; |
242 ScriptValue callFramesValue = callFunctionWithEvalEnabled(function, hadExcep tion); | 242 ScriptValue callFramesValue = callFunctionWithEvalEnabled(function, hadExcep tion); |
243 ASSERT(!hadException); | 243 ASSERT(!hadException); |
244 RefPtr<JSONValue> result = callFramesValue.toJSONValue(scriptState()); | 244 RefPtr<JSONValue> result = callFramesValue.toJSONValue(scriptState()); |
245 if (result->type() == JSONValue::TypeArray) | 245 if (result && result->type() == JSONValue::TypeArray) |
aandrey
2014/06/18 10:41:55
Looks like this is the only place in this file whe
| |
246 return Array<CallFrame>::runtimeCast(result); | 246 return Array<CallFrame>::runtimeCast(result); |
247 return Array<CallFrame>::create(); | 247 return Array<CallFrame>::create(); |
248 } | 248 } |
249 | 249 |
250 PassRefPtr<TypeBuilder::Runtime::RemoteObject> InjectedScript::wrapObject(const ScriptValue& value, const String& groupName, bool generatePreview) const | 250 PassRefPtr<TypeBuilder::Runtime::RemoteObject> InjectedScript::wrapObject(const ScriptValue& value, const String& groupName, bool generatePreview) const |
251 { | 251 { |
252 ASSERT(!isEmpty()); | 252 ASSERT(!isEmpty()); |
253 ScriptFunctionCall wrapFunction(injectedScriptObject(), "wrapObject"); | 253 ScriptFunctionCall wrapFunction(injectedScriptObject(), "wrapObject"); |
254 wrapFunction.appendArgument(value); | 254 wrapFunction.appendArgument(value); |
255 wrapFunction.appendArgument(groupName); | 255 wrapFunction.appendArgument(groupName); |
(...skipping 76 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 |