| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 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 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 357 if (!scope.initialize()) { | 357 if (!scope.initialize()) { |
| 358 callback->sendFailure(errorString); | 358 callback->sendFailure(errorString); |
| 359 return; | 359 return; |
| 360 } | 360 } |
| 361 | 361 |
| 362 std::unique_ptr<v8::Local<v8::Value>[]> argv = nullptr; | 362 std::unique_ptr<v8::Local<v8::Value>[]> argv = nullptr; |
| 363 int argc = 0; | 363 int argc = 0; |
| 364 if (optionalArguments.isJust()) { | 364 if (optionalArguments.isJust()) { |
| 365 protocol::Array<protocol::Runtime::CallArgument>* arguments = | 365 protocol::Array<protocol::Runtime::CallArgument>* arguments = |
| 366 optionalArguments.fromJust(); | 366 optionalArguments.fromJust(); |
| 367 argc = arguments->length(); | 367 argc = static_cast<int>(arguments->length()); |
| 368 argv.reset(new v8::Local<v8::Value>[argc]); | 368 argv.reset(new v8::Local<v8::Value>[argc]); |
| 369 for (int i = 0; i < argc; ++i) { | 369 for (int i = 0; i < argc; ++i) { |
| 370 v8::Local<v8::Value> argumentValue; | 370 v8::Local<v8::Value> argumentValue; |
| 371 if (!scope.injectedScript() | 371 if (!scope.injectedScript() |
| 372 ->resolveCallArgument(&errorString, arguments->get(i)) | 372 ->resolveCallArgument(&errorString, arguments->get(i)) |
| 373 .ToLocal(&argumentValue)) { | 373 .ToLocal(&argumentValue)) { |
| 374 callback->sendFailure(errorString); | 374 callback->sendFailure(errorString); |
| 375 return; | 375 return; |
| 376 } | 376 } |
| 377 argv[i] = argumentValue; | 377 argv[i] = argumentValue; |
| (...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 721 } | 721 } |
| 722 | 722 |
| 723 bool V8RuntimeAgentImpl::reportMessage(V8ConsoleMessage* message, | 723 bool V8RuntimeAgentImpl::reportMessage(V8ConsoleMessage* message, |
| 724 bool generatePreview) { | 724 bool generatePreview) { |
| 725 message->reportToFrontend(&m_frontend, m_session, generatePreview); | 725 message->reportToFrontend(&m_frontend, m_session, generatePreview); |
| 726 m_frontend.flush(); | 726 m_frontend.flush(); |
| 727 return m_inspector->hasConsoleMessageStorage(m_session->contextGroupId()); | 727 return m_inspector->hasConsoleMessageStorage(m_session->contextGroupId()); |
| 728 } | 728 } |
| 729 | 729 |
| 730 } // namespace v8_inspector | 730 } // namespace v8_inspector |
| OLD | NEW |