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

Side by Side Diff: Source/core/inspector/InspectorConsoleAgent.cpp

Issue 517213003: Oilpan: fix build after r181083 (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Re-intro ~FrameConsole non-Oilpan Created 6 years, 3 months 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 unified diff | Download patch
OLDNEW
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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 return; 103 return;
104 m_enabled = true; 104 m_enabled = true;
105 if (!s_enabledAgentCount) 105 if (!s_enabledAgentCount)
106 ScriptController::setCaptureCallStackForUncaughtExceptions(true); 106 ScriptController::setCaptureCallStackForUncaughtExceptions(true);
107 ++s_enabledAgentCount; 107 ++s_enabledAgentCount;
108 108
109 m_state->setBoolean(ConsoleAgentState::consoleMessagesEnabled, true); 109 m_state->setBoolean(ConsoleAgentState::consoleMessagesEnabled, true);
110 110
111 ConsoleMessageStorage* storage = messageStorage(); 111 ConsoleMessageStorage* storage = messageStorage();
112 if (storage->expiredCount()) { 112 if (storage->expiredCount()) {
113 RefPtr<ConsoleMessage> expiredMessage = ConsoleMessage::create(OtherMess ageSource, WarningMessageLevel, String::format("%d console messages are not show n.", storage->expiredCount())); 113 RefPtrWillBeRawPtr<ConsoleMessage> expiredMessage = ConsoleMessage::crea te(OtherMessageSource, WarningMessageLevel, String::format("%d console messages are not shown.", storage->expiredCount()));
114 expiredMessage->setTimestamp(0); 114 expiredMessage->setTimestamp(0);
115 sendConsoleMessageToFrontend(expiredMessage.get(), false); 115 sendConsoleMessageToFrontend(expiredMessage.get(), false);
116 } 116 }
117 117
118 size_t messageCount = storage->size(); 118 size_t messageCount = storage->size();
119 for (size_t i = 0; i < messageCount; ++i) 119 for (size_t i = 0; i < messageCount; ++i)
120 sendConsoleMessageToFrontend(storage->at(i).get(), false); 120 sendConsoleMessageToFrontend(storage->at(i).get(), false);
121 } 121 }
122 122
123 void InspectorConsoleAgent::disable(ErrorString*) 123 void InspectorConsoleAgent::disable(ErrorString*)
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 // FIXME: only send out type for ConsoleAPI source messages. 379 // FIXME: only send out type for ConsoleAPI source messages.
380 jsonObj->setType(messageTypeValue(consoleMessage->type())); 380 jsonObj->setType(messageTypeValue(consoleMessage->type()));
381 jsonObj->setLine(static_cast<int>(consoleMessage->lineNumber())); 381 jsonObj->setLine(static_cast<int>(consoleMessage->lineNumber()));
382 jsonObj->setColumn(static_cast<int>(consoleMessage->columnNumber())); 382 jsonObj->setColumn(static_cast<int>(consoleMessage->columnNumber()));
383 jsonObj->setUrl(consoleMessage->url()); 383 jsonObj->setUrl(consoleMessage->url());
384 ScriptState* scriptState = consoleMessage->scriptState(); 384 ScriptState* scriptState = consoleMessage->scriptState();
385 if (scriptState) 385 if (scriptState)
386 jsonObj->setExecutionContextId(m_injectedScriptManager->injectedScriptId For(scriptState)); 386 jsonObj->setExecutionContextId(m_injectedScriptManager->injectedScriptId For(scriptState));
387 if (consoleMessage->source() == NetworkMessageSource && consoleMessage->requ estIdentifier()) 387 if (consoleMessage->source() == NetworkMessageSource && consoleMessage->requ estIdentifier())
388 jsonObj->setNetworkRequestId(IdentifiersFactory::requestId(consoleMessag e->requestIdentifier())); 388 jsonObj->setNetworkRequestId(IdentifiersFactory::requestId(consoleMessag e->requestIdentifier()));
389 RefPtr<ScriptArguments> arguments = consoleMessage->scriptArguments(); 389 RefPtrWillBeRawPtr<ScriptArguments> arguments = consoleMessage->scriptArgume nts();
390 if (arguments && arguments->argumentCount()) { 390 if (arguments && arguments->argumentCount()) {
391 InjectedScript injectedScript = m_injectedScriptManager->injectedScriptF or(arguments->scriptState()); 391 InjectedScript injectedScript = m_injectedScriptManager->injectedScriptF or(arguments->scriptState());
392 if (!injectedScript.isEmpty()) { 392 if (!injectedScript.isEmpty()) {
393 RefPtr<TypeBuilder::Array<TypeBuilder::Runtime::RemoteObject> > json Args = TypeBuilder::Array<TypeBuilder::Runtime::RemoteObject>::create(); 393 RefPtr<TypeBuilder::Array<TypeBuilder::Runtime::RemoteObject> > json Args = TypeBuilder::Array<TypeBuilder::Runtime::RemoteObject>::create();
394 if (consoleMessage->type() == TableMessageType && generatePreview && arguments->argumentCount()) { 394 if (consoleMessage->type() == TableMessageType && generatePreview && arguments->argumentCount()) {
395 ScriptValue table = arguments->argumentAt(0); 395 ScriptValue table = arguments->argumentAt(0);
396 ScriptValue columns = arguments->argumentCount() > 1 ? arguments ->argumentAt(1) : ScriptValue(); 396 ScriptValue columns = arguments->argumentCount() > 1 ? arguments ->argumentAt(1) : ScriptValue();
397 RefPtr<TypeBuilder::Runtime::RemoteObject> inspectorValue = inje ctedScript.wrapTable(table, columns); 397 RefPtr<TypeBuilder::Runtime::RemoteObject> inspectorValue = inje ctedScript.wrapTable(table, columns);
398 if (!inspectorValue) { 398 if (!inspectorValue) {
399 ASSERT_NOT_REACHED(); 399 ASSERT_NOT_REACHED();
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
433 private: 433 private:
434 int m_heapObjectId; 434 int m_heapObjectId;
435 }; 435 };
436 436
437 void InspectorConsoleAgent::addInspectedHeapObject(ErrorString*, int inspectedHe apObjectId) 437 void InspectorConsoleAgent::addInspectedHeapObject(ErrorString*, int inspectedHe apObjectId)
438 { 438 {
439 m_injectedScriptManager->injectedScriptHost()->addInspectedObject(adoptPtr(n ew InspectableHeapObject(inspectedHeapObjectId))); 439 m_injectedScriptManager->injectedScriptHost()->addInspectedObject(adoptPtr(n ew InspectableHeapObject(inspectedHeapObjectId)));
440 } 440 }
441 441
442 } // namespace blink 442 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/inspector/ConsoleMessageStorage.cpp ('k') | Source/core/workers/WorkerGlobalScope.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698