Chromium Code Reviews| Index: third_party/WebKit/Source/core/inspector/InspectorConsoleAgent.cpp |
| diff --git a/third_party/WebKit/Source/core/inspector/InspectorConsoleAgent.cpp b/third_party/WebKit/Source/core/inspector/InspectorConsoleAgent.cpp |
| index 7e72022e58528498aa272e343de10939844c4147..60c6302fc9df97cc6d5ff2d516bfcbf3ce86572b 100644 |
| --- a/third_party/WebKit/Source/core/inspector/InspectorConsoleAgent.cpp |
| +++ b/third_party/WebKit/Source/core/inspector/InspectorConsoleAgent.cpp |
| @@ -196,12 +196,14 @@ void InspectorConsoleAgent::sendConsoleMessageToFrontend(ConsoleMessage* console |
| jsonObj->setNetworkRequestId(IdentifiersFactory::requestId(consoleMessage->requestIdentifier())); |
| RefPtrWillBeRawPtr<ScriptArguments> arguments = consoleMessage->scriptArguments(); |
| if (arguments && arguments->argumentCount()) { |
| - InjectedScript* injectedScript = m_injectedScriptManager->injectedScriptFor(arguments->scriptState()); |
| + // v8::HandleScope handles(arguments->scriptState()->isolate()); |
|
dgozman
2016/01/27 02:36:37
commented code
pfeldman
2016/01/27 16:56:20
Done.
|
| + ScriptState::Scope scope(arguments->scriptState()); |
|
dgozman
2016/01/27 02:36:37
Perhaps, handlescope should be enough?
pfeldman
2016/01/27 16:56:20
It is not, fetching the v8Value required entered c
|
| + InjectedScript* injectedScript = m_injectedScriptManager->injectedScriptFor(arguments->scriptState()->context()); |
| if (injectedScript) { |
| RefPtr<TypeBuilder::Array<TypeBuilder::Runtime::RemoteObject> > jsonArgs = TypeBuilder::Array<TypeBuilder::Runtime::RemoteObject>::create(); |
| if (consoleMessage->type() == TableMessageType && generatePreview && arguments->argumentCount()) { |
| - ScriptValue table = arguments->argumentAt(0); |
| - ScriptValue columns = arguments->argumentCount() > 1 ? arguments->argumentAt(1) : ScriptValue(); |
| + v8::Local<v8::Value> table = arguments->argumentAt(0).v8Value(); |
| + v8::Local<v8::Value> columns = arguments->argumentCount() > 1 ? arguments->argumentAt(1).v8Value() : v8::Local<v8::Value>(); |
| RefPtr<TypeBuilder::Runtime::RemoteObject> inspectorValue = injectedScript->wrapTable(table, columns); |
| if (!inspectorValue) { |
| ASSERT_NOT_REACHED(); |
| @@ -210,7 +212,7 @@ void InspectorConsoleAgent::sendConsoleMessageToFrontend(ConsoleMessage* console |
| jsonArgs->addItem(inspectorValue); |
| } else { |
| for (unsigned i = 0; i < arguments->argumentCount(); ++i) { |
| - RefPtr<TypeBuilder::Runtime::RemoteObject> inspectorValue = injectedScript->wrapObject(arguments->argumentAt(i), "console", generatePreview); |
| + RefPtr<TypeBuilder::Runtime::RemoteObject> inspectorValue = injectedScript->wrapObject(arguments->argumentAt(i).v8Value(), "console", generatePreview); |
| if (!inspectorValue) { |
| ASSERT_NOT_REACHED(); |
| return; |