| 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 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 327 return; | 327 return; |
| 328 RefPtr<JSONObject> object; | 328 RefPtr<JSONObject> object; |
| 329 if (!parsedObjectId->asObject(&object)) | 329 if (!parsedObjectId->asObject(&object)) |
| 330 return; | 330 return; |
| 331 int boundId = 0; | 331 int boundId = 0; |
| 332 if (!object->getNumber("id", &boundId)) | 332 if (!object->getNumber("id", &boundId)) |
| 333 return; | 333 return; |
| 334 m_native->unbind(boundId); | 334 m_native->unbind(boundId); |
| 335 } | 335 } |
| 336 | 336 |
| 337 ScriptValue InjectedScript::librariesEventListeners(const String& objectId) |
| 338 { |
| 339 ScriptFunctionCall function(injectedScriptObject(), "librariesEventListeners
ByObjectId"); |
| 340 function.appendArgument(objectId); |
| 341 bool hadException = false; |
| 342 ScriptValue result = callFunctionWithEvalEnabled(function, hadException); |
| 343 if (!hadException) |
| 344 return result; |
| 345 return ScriptValue(); |
| 346 } |
| 347 |
| 348 |
| 337 PassRefPtr<Array<CallFrame>> InjectedScript::wrapCallFrames(v8::Local<v8::Object
> callFrames, int asyncOrdinal) | 349 PassRefPtr<Array<CallFrame>> InjectedScript::wrapCallFrames(v8::Local<v8::Object
> callFrames, int asyncOrdinal) |
| 338 { | 350 { |
| 339 ASSERT(!isEmpty()); | 351 ASSERT(!isEmpty()); |
| 340 ScriptFunctionCall function(injectedScriptObject(), "wrapCallFrames"); | 352 ScriptFunctionCall function(injectedScriptObject(), "wrapCallFrames"); |
| 341 function.appendArgument(callFrames); | 353 function.appendArgument(callFrames); |
| 342 function.appendArgument(asyncOrdinal); | 354 function.appendArgument(asyncOrdinal); |
| 343 bool hadException = false; | 355 bool hadException = false; |
| 344 ScriptValue callFramesValue = callFunctionWithEvalEnabled(function, hadExcep
tion); | 356 ScriptValue callFramesValue = callFunctionWithEvalEnabled(function, hadExcep
tion); |
| 345 ASSERT(!hadException); | 357 ASSERT(!hadException); |
| 346 RefPtr<JSONValue> result = toJSONValue(callFramesValue); | 358 RefPtr<JSONValue> result = toJSONValue(callFramesValue); |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 533 *exceptionDetails = TypeBuilder::Debugger::ExceptionDetails::create().se
tText(text); | 545 *exceptionDetails = TypeBuilder::Debugger::ExceptionDetails::create().se
tText(text); |
| 534 } else { | 546 } else { |
| 535 *result = toJSONValue(resultValue); | 547 *result = toJSONValue(resultValue); |
| 536 if (!*result) | 548 if (!*result) |
| 537 *result = JSONString::create(String::format("Object has too long ref
erence chain(must not be longer than %d)", JSONValue::maxDepth)); | 549 *result = JSONString::create(String::format("Object has too long ref
erence chain(must not be longer than %d)", JSONValue::maxDepth)); |
| 538 } | 550 } |
| 539 } | 551 } |
| 540 | 552 |
| 541 } // namespace blink | 553 } // namespace blink |
| 542 | 554 |
| OLD | NEW |