Ignore:
Timestamp:
Feb 16, 2017, 10:49:40 AM (8 years ago)
Author:
Yusuke Suzuki
Message:

[JSC] Drop PassRefPtr in inspector/
https://bugs.webkit.org/show_bug.cgi?id=168420

Reviewed by Alex Christensen.

Source/JavaScriptCore:

Drop PassRefPtr uses.
And use Ref<Inspector::ScriptArguments> and Ref<ScriptCallStack> as much as possible.
It drops some unnecessary null checks.

  • debugger/Debugger.cpp:

(JSC::Debugger::hasBreakpoint):
(JSC::Debugger::currentDebuggerCallFrame):

  • debugger/Debugger.h:
  • inspector/AsyncStackTrace.cpp:

(Inspector::AsyncStackTrace::create):
(Inspector::AsyncStackTrace::AsyncStackTrace):
(Inspector::AsyncStackTrace::buildInspectorObject):
(Inspector::AsyncStackTrace::truncate):

  • inspector/AsyncStackTrace.h:
  • inspector/ConsoleMessage.cpp:

(Inspector::ConsoleMessage::ConsoleMessage):

  • inspector/ConsoleMessage.h:
  • inspector/InjectedScriptManager.cpp:

(Inspector::InjectedScriptManager::InjectedScriptManager):
(Inspector::InjectedScriptManager::injectedScriptHost):

  • inspector/InjectedScriptManager.h:
  • inspector/JSGlobalObjectConsoleClient.cpp:

(Inspector::JSGlobalObjectConsoleClient::messageWithTypeAndLevel):
(Inspector::JSGlobalObjectConsoleClient::count):
(Inspector::JSGlobalObjectConsoleClient::timeEnd):
(Inspector::JSGlobalObjectConsoleClient::timeStamp):
(Inspector::JSGlobalObjectConsoleClient::warnUnimplemented):

  • inspector/JSGlobalObjectConsoleClient.h:

ConsoleClient now takes Ref<ScriptArgument>&& instead of RefPtr<ScriptArgument>&&.

  • inspector/JSGlobalObjectInspectorController.cpp:

(Inspector::JSGlobalObjectInspectorController::appendAPIBacktrace):
(Inspector::JSGlobalObjectInspectorController::reportAPIException):

  • inspector/JSGlobalObjectInspectorController.h:
  • inspector/JSJavaScriptCallFrame.cpp:

(Inspector::JSJavaScriptCallFrame::JSJavaScriptCallFrame):
(Inspector::toJS):

  • inspector/JSJavaScriptCallFrame.h:

(Inspector::JSJavaScriptCallFrame::create):

  • inspector/JavaScriptCallFrame.cpp:

(Inspector::JavaScriptCallFrame::JavaScriptCallFrame):
(Inspector::JavaScriptCallFrame::caller):

  • inspector/JavaScriptCallFrame.h:

(Inspector::JavaScriptCallFrame::create):

  • inspector/ScriptDebugServer.cpp:

(Inspector::ScriptDebugServer::evaluateBreakpointAction):
(Inspector::ScriptDebugServer::dispatchDidPause):
(Inspector::ScriptDebugServer::exceptionOrCaughtValue):

  • inspector/agents/InspectorConsoleAgent.cpp:

(Inspector::InspectorConsoleAgent::stopTiming):
(Inspector::InspectorConsoleAgent::count):

  • inspector/agents/InspectorConsoleAgent.h:
  • inspector/agents/InspectorDebuggerAgent.cpp:

(Inspector::InspectorDebuggerAgent::didScheduleAsyncCall):

  • runtime/ConsoleClient.cpp:

(JSC::ConsoleClient::printConsoleMessageWithArguments):
(JSC::ConsoleClient::internalMessageWithTypeAndLevel):
(JSC::ConsoleClient::logWithLevel):
(JSC::ConsoleClient::dir):
(JSC::ConsoleClient::dirXML):
(JSC::ConsoleClient::table):
(JSC::ConsoleClient::trace):
(JSC::ConsoleClient::assertion):
(JSC::ConsoleClient::group):
(JSC::ConsoleClient::groupCollapsed):
(JSC::ConsoleClient::groupEnd):

  • runtime/ConsoleClient.h:
  • runtime/ConsoleObject.cpp:

(JSC::consoleLogWithLevel):
(JSC::consoleProtoFuncDir):
(JSC::consoleProtoFuncDirXML):
(JSC::consoleProtoFuncTable):
(JSC::consoleProtoFuncTrace):
(JSC::consoleProtoFuncAssert):
(JSC::consoleProtoFuncCount):
(JSC::consoleProtoFuncTimeStamp):
(JSC::consoleProtoFuncGroup):
(JSC::consoleProtoFuncGroupCollapsed):
(JSC::consoleProtoFuncGroupEnd):

Source/WebCore:

Use Ref<Inspector::ScriptArguments> and Ref<ScriptCallStack> as much as possible.
It drops some unnecessary null checks.

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateCallWith):

  • bindings/scripts/test/JS/JSTestObj.cpp:

(WebCore::jsTestObjPrototypeFunctionWithScriptArgumentsAndCallStackCaller):

  • dom/ScriptExecutionContext.cpp:

(WebCore::ScriptExecutionContext::PendingException::PendingException):

  • inspector/InspectorInstrumentation.cpp:

(WebCore::InspectorInstrumentation::consoleCountImpl):
(WebCore::InspectorInstrumentation::stopConsoleTimingImpl):
(WebCore::InspectorInstrumentation::consoleTimeStampImpl):

  • inspector/InspectorInstrumentation.h:

(WebCore::InspectorInstrumentation::consoleCount):
(WebCore::InspectorInstrumentation::stopConsoleTiming):
(WebCore::InspectorInstrumentation::consoleTimeStamp):

  • inspector/InspectorNetworkAgent.cpp:

(WebCore::InspectorNetworkAgent::buildInitiatorObject):

  • inspector/TimelineRecordFactory.cpp:

(WebCore::TimelineRecordFactory::createGenericRecord):

  • inspector/WebInjectedScriptManager.cpp:

(WebCore::WebInjectedScriptManager::WebInjectedScriptManager):

  • inspector/WebInjectedScriptManager.h:
  • page/DOMWindow.cpp:

(WebCore::DOMWindow::postMessageTimerFired):
We dispatch appropriate addMessage function according to whether
timer.stackTrace() is nullptr.

  • page/PageConsoleClient.cpp:

(WebCore::PageConsoleClient::addMessage):
(WebCore::PageConsoleClient::messageWithTypeAndLevel):
(WebCore::PageConsoleClient::count):
(WebCore::PageConsoleClient::timeEnd):
(WebCore::PageConsoleClient::timeStamp):

  • page/PageConsoleClient.h:
  • workers/WorkerConsoleClient.cpp:

(WebCore::WorkerConsoleClient::messageWithTypeAndLevel):
(WebCore::WorkerConsoleClient::count):
(WebCore::WorkerConsoleClient::timeEnd):
(WebCore::WorkerConsoleClient::timeStamp):

  • workers/WorkerConsoleClient.h:
  • workers/WorkerGlobalScope.cpp:

(WebCore::WorkerGlobalScope::addMessage):

Source/WebKit/mac:

  • WebView/WebScriptDebugger.mm:

(WebScriptDebugger::handlePause):

File:
1 edited

Legend:

Unmodified
Added
Removed
Note: See TracChangeset for help on using the changeset viewer.