| 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 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 335 return; | 335 return; |
| 336 RefPtr<JSONObject> object; | 336 RefPtr<JSONObject> object; |
| 337 if (!parsedObjectId->asObject(&object)) | 337 if (!parsedObjectId->asObject(&object)) |
| 338 return; | 338 return; |
| 339 int boundId = 0; | 339 int boundId = 0; |
| 340 if (!object->getNumber("id", &boundId)) | 340 if (!object->getNumber("id", &boundId)) |
| 341 return; | 341 return; |
| 342 m_native->unbind(boundId); | 342 m_native->unbind(boundId); |
| 343 } | 343 } |
| 344 | 344 |
| 345 v8::Local<v8::Value> InjectedScript::commandLineAPI() |
| 346 { |
| 347 V8FunctionCall function(m_client, context(), v8Value(), "commandLineAPI"); |
| 348 bool hadException = false; |
| 349 return function.call(hadException, false); |
| 350 } |
| 351 |
| 345 PassRefPtr<Array<CallFrame>> InjectedScript::wrapCallFrames(v8::Local<v8::Object
> callFrames, int asyncOrdinal) | 352 PassRefPtr<Array<CallFrame>> InjectedScript::wrapCallFrames(v8::Local<v8::Object
> callFrames, int asyncOrdinal) |
| 346 { | 353 { |
| 347 v8::HandleScope handles(m_isolate); | 354 v8::HandleScope handles(m_isolate); |
| 348 V8FunctionCall function(m_client, context(), v8Value(), "wrapCallFrames"); | 355 V8FunctionCall function(m_client, context(), v8Value(), "wrapCallFrames"); |
| 349 function.appendArgument(callFrames); | 356 function.appendArgument(callFrames); |
| 350 function.appendArgument(asyncOrdinal); | 357 function.appendArgument(asyncOrdinal); |
| 351 bool hadException = false; | 358 bool hadException = false; |
| 352 v8::Local<v8::Value> callFramesValue = callFunctionWithEvalEnabled(function,
hadException); | 359 v8::Local<v8::Value> callFramesValue = callFunctionWithEvalEnabled(function,
hadException); |
| 353 ASSERT(!hadException); | 360 ASSERT(!hadException); |
| 354 RefPtr<JSONValue> result = toJSONValue(context(), callFramesValue); | 361 RefPtr<JSONValue> result = toJSONValue(context(), callFramesValue); |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 521 *result = JSONString::create(String::format("Object has too long ref
erence chain(must not be longer than %d)", JSONValue::maxDepth)); | 528 *result = JSONString::create(String::format("Object has too long ref
erence chain(must not be longer than %d)", JSONValue::maxDepth)); |
| 522 } | 529 } |
| 523 } | 530 } |
| 524 | 531 |
| 525 void InjectedScript::dispose() | 532 void InjectedScript::dispose() |
| 526 { | 533 { |
| 527 m_manager->discardInjectedScript(m_contextId); | 534 m_manager->discardInjectedScript(m_contextId); |
| 528 } | 535 } |
| 529 | 536 |
| 530 } // namespace blink | 537 } // namespace blink |
| OLD | NEW |