Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(216)

Unified Diff: Source/WebCore/inspector/ConsoleMessage.cpp

Issue 8806015: Changes to support a second VM. (Closed) Base URL: svn://svn.chromium.org/dash/experimental/chrome/src/webkit-full
Patch Set: . Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/WebCore/inspector/ConsoleMessage.cpp
diff --git a/Source/WebCore/inspector/ConsoleMessage.cpp b/Source/WebCore/inspector/ConsoleMessage.cpp
index 62d6394f601e99d25d999bd7ffe615db2fa75d23..1ce21c98729fbbc867fb76fab29bf34a6900dead 100644
--- a/Source/WebCore/inspector/ConsoleMessage.cpp
+++ b/Source/WebCore/inspector/ConsoleMessage.cpp
@@ -139,20 +139,10 @@ void ConsoleMessage::addToFrontend(InspectorFrontend::Console* frontend, Injecte
jsonObj->setString("text", m_message);
if (m_source == NetworkMessageSource && !m_requestId.isEmpty())
jsonObj->setString("networkRequestId", m_requestId);
- if (m_arguments && m_arguments->argumentCount()) {
- InjectedScript injectedScript = injectedScriptManager->injectedScriptFor(m_arguments->globalState());
- if (!injectedScript.hasNoValue()) {
- RefPtr<InspectorArray> jsonArgs = InspectorArray::create();
- for (unsigned i = 0; i < m_arguments->argumentCount(); ++i) {
- RefPtr<InspectorValue> inspectorValue = injectedScript.wrapObject(m_arguments->argumentAt(i), "console");
- if (!inspectorValue) {
- ASSERT_NOT_REACHED();
- return;
- }
- jsonArgs->pushValue(inspectorValue);
- }
- jsonObj->setArray("parameters", jsonArgs);
- }
+ if (m_arguments) {
+ RefPtr<InspectorArray> jsonArgs = m_arguments->wrap(injectedScriptManager);
+ if (jsonArgs)
+ jsonObj->setArray("parameters", jsonArgs.release());
}
if (m_callStack)
jsonObj->setArray("stackTrace", m_callStack->buildInspectorArray());
@@ -189,9 +179,7 @@ bool ConsoleMessage::isEqual(ConsoleMessage* msg) const
void ConsoleMessage::windowCleared(DOMWindow* window)
{
- if (!m_arguments)
- return;
- if (domWindowFromScriptState(m_arguments->globalState()) != window)
+ if (!m_arguments || m_arguments->domWindow() != window)
return;
if (!m_message)
m_message = "<message collected>";

Powered by Google App Engine
This is Rietveld 408576698