<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[177925] trunk/Source/WebCore</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/177925">177925</a></dd>
<dt>Author</dt> <dd>burg@cs.washington.edu</dd>
<dt>Date</dt> <dd>2015-01-05 13:30:33 -0800 (Mon, 05 Jan 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Web Inspector: pass parameters to inspector instrumentation by reference where possible
https://bugs.webkit.org/show_bug.cgi?id=139981

Reviewed by Andreas Kling.

Clean up inspector instrumentation entry points throughout WebCore. In particular, make
parameters pass-by-reference if they are not nullable. Also standardize quirky parameter
orders and do other small cleanups in InspectorInstrumentation and at callsites.

Inspector agents still take the pertinent parameters by pointer even when they could be
passed by reference. This will be addressed in a follow-up change.

No new tests, no behavior changed.

* WebCore.exp.in:
* bindings/js/ScriptController.cpp:
(WebCore::ScriptController::evaluateInWorld):
* css/PropertySetCSSStyleDeclaration.cpp:
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::checkOne):
(WebCore::SelectorChecker::matchesFocusPseudoClass):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::styleForElement):
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::elementIsActive):
(WebCore::SelectorCompiler::elementIsActiveForStyleResolution):
(WebCore::SelectorCompiler::elementIsHovered):
(WebCore::SelectorCompiler::elementIsHoveredForStyleResolution):
* dom/CharacterData.cpp:
(WebCore::CharacterData::dispatchModifiedEvent): Remove unnecessary ENABLE guard.
* dom/ContainerNode.cpp:
(WebCore::ContainerNode::insertBefore):
(WebCore::ContainerNode::replaceChild):
(WebCore::ContainerNode::removeBetween):
(WebCore::ContainerNode::appendChild):
(WebCore::dispatchChildRemovalEvents):
* dom/ContainerNodeAlgorithms.h:
(WebCore::ChildNodeInsertionNotifier::notify): Remove unnecessary ENABLE guard.
* dom/Document.cpp:
(WebCore::Document::scheduleStyleRecalc):
(WebCore::Document::recalcStyle):
(WebCore::Document::finishedParsing): This is safe because we checked the argument.
* dom/Element.cpp:
(WebCore::Element::addShadowRoot):
(WebCore::Element::removeShadowRoot): This is safe because we checked the argument.
(WebCore::Element::willModifyAttribute): Remove unnecessary ENABLE guard.
(WebCore::Element::didAddAttribute):
(WebCore::Element::didModifyAttribute):
(WebCore::Element::didRemoveAttribute):
* dom/EventTarget.cpp:
(WebCore::EventTarget::fireEventListeners): This is safe because the type test would fail if null.
* dom/NamedFlowCollection.cpp: Pass by reference since code already assumes non-null.
(WebCore::NamedFlowCollection::ensureFlowWithName):
(WebCore::NamedFlowCollection::discardNamedFlow):
* dom/PseudoElement.cpp:
(WebCore::PseudoElement::~PseudoElement):
* dom/StyledElement.cpp:
(WebCore::StyledElement::styleAttributeChanged):
(WebCore::StyledElement::inlineStyleChanged):
* inspector/InspectorConsoleInstrumentation.h:
(WebCore::InspectorInstrumentation::addMessageToConsole):
(WebCore::InspectorInstrumentation::consoleCount):
(WebCore::InspectorInstrumentation::startConsoleTiming):
(WebCore::InspectorInstrumentation::stopConsoleTiming):
(WebCore::InspectorInstrumentation::consoleTimeStamp):
(WebCore::InspectorInstrumentation::startProfiling):
(WebCore::InspectorInstrumentation::stopProfiling):
* inspector/InspectorController.cpp:
(WebCore::InspectorController::didClearWindowObjectInWorld):
(WebCore::InspectorController::connectFrontend):
(WebCore::InspectorController::disconnectFrontend):
* inspector/InspectorController.h: Remove instrumentationForPage() in favor of using instrumentingAgentsForPage() directly.
* inspector/InspectorDatabaseInstrumentation.h:
(WebCore::InspectorInstrumentation::didOpenDatabase):
* inspector/InspectorInstrumentation.cpp: Add missing s_ prefix for global s_instrumentingAgentSets. Pass the instrumenting
agent by reference since it was already null-checked if we reached a slow path for instrumentation.
(WebCore::InspectorInstrumentation::didClearWindowObjectInWorldImpl):
(WebCore::InspectorInstrumentation::isDebuggerPausedImpl):
(WebCore::InspectorInstrumentation::willInsertDOMNodeImpl):
(WebCore::InspectorInstrumentation::didInsertDOMNodeImpl):
(WebCore::InspectorInstrumentation::willRemoveDOMNodeImpl):
(WebCore::InspectorInstrumentation::didRemoveDOMNodeImpl):
(WebCore::InspectorInstrumentation::willModifyDOMAttrImpl):
(WebCore::InspectorInstrumentation::didModifyDOMAttrImpl):
(WebCore::InspectorInstrumentation::didRemoveDOMAttrImpl):
(WebCore::InspectorInstrumentation::didInvalidateStyleAttrImpl):
(WebCore::InspectorInstrumentation::frameWindowDiscardedImpl):
(WebCore::InspectorInstrumentation::mediaQueryResultChangedImpl):
(WebCore::InspectorInstrumentation::didPushShadowRootImpl):
(WebCore::InspectorInstrumentation::willPopShadowRootImpl):
(WebCore::InspectorInstrumentation::didCreateNamedFlowImpl):
(WebCore::InspectorInstrumentation::willRemoveNamedFlowImpl):
(WebCore::InspectorInstrumentation::didChangeRegionOversetImpl):
(WebCore::InspectorInstrumentation::didRegisterNamedFlowContentElementImpl):
(WebCore::InspectorInstrumentation::didUnregisterNamedFlowContentElementImpl):
(WebCore::InspectorInstrumentation::mouseDidMoveOverElementImpl):
(WebCore::InspectorInstrumentation::didScrollImpl):
(WebCore::InspectorInstrumentation::handleTouchEventImpl):
(WebCore::InspectorInstrumentation::handleMousePressImpl):
(WebCore::InspectorInstrumentation::forcePseudoStateImpl):
(WebCore::InspectorInstrumentation::characterDataModifiedImpl):
(WebCore::InspectorInstrumentation::willSendXMLHttpRequestImpl):
(WebCore::InspectorInstrumentation::didScheduleResourceRequestImpl):
(WebCore::InspectorInstrumentation::didInstallTimerImpl):
(WebCore::InspectorInstrumentation::didRemoveTimerImpl):
(WebCore::InspectorInstrumentation::willCallFunctionImpl):
(WebCore::InspectorInstrumentation::willDispatchXHRReadyStateChangeEventImpl):
(WebCore::InspectorInstrumentation::willDispatchEventImpl):
(WebCore::InspectorInstrumentation::willHandleEventImpl):
(WebCore::InspectorInstrumentation::didHandleEventImpl): Add proper cookie guard and pass by reference.
(WebCore::InspectorInstrumentation::willDispatchEventOnWindowImpl):
(WebCore::InspectorInstrumentation::willEvaluateScriptImpl):
(WebCore::InspectorInstrumentation::didEvaluateScriptImpl):
(WebCore::InspectorInstrumentation::scriptsEnabledImpl):
(WebCore::InspectorInstrumentation::didCreateIsolatedContextImpl): Removed, as there are no callers from WebCore. Possible V8 artifact.
(WebCore::InspectorInstrumentation::willFireTimerImpl):
(WebCore::InspectorInstrumentation::didFireTimerImpl): Add proper cookie guard and pass by reference.
(WebCore::InspectorInstrumentation::didInvalidateLayoutImpl):
(WebCore::InspectorInstrumentation::willLayoutImpl):
(WebCore::InspectorInstrumentation::willDispatchXHRLoadEventImpl):
(WebCore::InspectorInstrumentation::willPaintImpl):
(WebCore::InspectorInstrumentation::didPaintImpl):
(WebCore::InspectorInstrumentation::willScrollLayerImpl):
(WebCore::InspectorInstrumentation::didScrollLayerImpl):
(WebCore::InspectorInstrumentation::willRecalculateStyleImpl):
(WebCore::InspectorInstrumentation::didRecalculateStyleImpl): Add proper cookie guard and pass by reference.
(WebCore::InspectorInstrumentation::didScheduleStyleRecalculationImpl):
(WebCore::InspectorInstrumentation::applyEmulatedMediaImpl): Pass string by reference.
(WebCore::InspectorInstrumentation::willSendRequestImpl):
(WebCore::InspectorInstrumentation::continueAfterPingLoaderImpl):
(WebCore::InspectorInstrumentation::markResourceAsCachedImpl):
(WebCore::InspectorInstrumentation::didLoadResourceFromMemoryCacheImpl):
(WebCore::InspectorInstrumentation::willReceiveResourceDataImpl):
(WebCore::InspectorInstrumentation::willReceiveResourceResponseImpl):
(WebCore::InspectorInstrumentation::didReceiveResourceResponseImpl): Add proper cookie guard and pass by reference.
(WebCore::InspectorInstrumentation::didReceiveResourceResponseButCanceledImpl):
(WebCore::InspectorInstrumentation::continueAfterXFrameOptionsDeniedImpl):
(WebCore::InspectorInstrumentation::continueWithPolicyDownloadImpl):
(WebCore::InspectorInstrumentation::continueWithPolicyIgnoreImpl):
(WebCore::InspectorInstrumentation::didReceiveDataImpl):
(WebCore::InspectorInstrumentation::didFinishLoadingImpl):
(WebCore::InspectorInstrumentation::didFailLoadingImpl):
(WebCore::InspectorInstrumentation::documentThreadableLoaderStartedLoadingForClientImpl):
(WebCore::InspectorInstrumentation::willLoadXHRImpl):
(WebCore::InspectorInstrumentation::didFailXHRLoadingImpl):
(WebCore::InspectorInstrumentation::didFinishXHRLoadingImpl):
(WebCore::InspectorInstrumentation::didReceiveXHRResponseImpl):
(WebCore::InspectorInstrumentation::willLoadXHRSynchronouslyImpl):
(WebCore::InspectorInstrumentation::didLoadXHRSynchronouslyImpl):
(WebCore::InspectorInstrumentation::scriptImportedImpl):
(WebCore::InspectorInstrumentation::scriptExecutionBlockedByCSPImpl):
(WebCore::InspectorInstrumentation::didReceiveScriptResponseImpl):
(WebCore::InspectorInstrumentation::domContentLoadedEventFiredImpl): Use Frame::isMainFrame().
(WebCore::InspectorInstrumentation::loadEventFiredImpl): Use Frame::isMainFrame().
(WebCore::InspectorInstrumentation::frameDetachedFromParentImpl):
(WebCore::InspectorInstrumentation::didCommitLoadImpl):
(WebCore::InspectorInstrumentation::frameDocumentUpdatedImpl):
(WebCore::InspectorInstrumentation::loaderDetachedFromFrameImpl):
(WebCore::InspectorInstrumentation::willRunJavaScriptDialogImpl):
(WebCore::InspectorInstrumentation::willDestroyCachedResourceImpl): Use a range-based iterator.
(WebCore::InspectorInstrumentation::willWriteHTMLImpl):
(WebCore::InspectorInstrumentation::addMessageToConsoleImpl):
(WebCore::InspectorInstrumentation::consoleCountImpl):
(WebCore::InspectorInstrumentation::startConsoleTimingImpl):
(WebCore::InspectorInstrumentation::stopConsoleTimingImpl):
(WebCore::InspectorInstrumentation::consoleTimeStampImpl):
(WebCore::InspectorInstrumentation::startProfilingImpl):
(WebCore::InspectorInstrumentation::stopProfilingImpl):
(WebCore::InspectorInstrumentation::didOpenDatabaseImpl):
(WebCore::InspectorInstrumentation::didDispatchDOMStorageEventImpl):
(WebCore::InspectorInstrumentation::shouldPauseDedicatedWorkerOnStartImpl):
(WebCore::InspectorInstrumentation::didStartWorkerGlobalScopeImpl):
(WebCore::InspectorInstrumentation::willEvaluateWorkerScript):
(WebCore::InspectorInstrumentation::workerGlobalScopeTerminatedImpl):
(WebCore::InspectorInstrumentation::didCreateWebSocketImpl):
(WebCore::InspectorInstrumentation::willSendWebSocketHandshakeRequestImpl):
(WebCore::InspectorInstrumentation::didReceiveWebSocketHandshakeResponseImpl):
(WebCore::InspectorInstrumentation::didCloseWebSocketImpl):
(WebCore::InspectorInstrumentation::didReceiveWebSocketFrameImpl):
(WebCore::InspectorInstrumentation::didReceiveWebSocketFrameErrorImpl):
(WebCore::InspectorInstrumentation::didSendWebSocketFrameImpl):
(WebCore::InspectorInstrumentation::sessionCreatedImpl):
(WebCore::InspectorInstrumentation::sessionLoadedImpl):
(WebCore::InspectorInstrumentation::sessionModifiedImpl):
(WebCore::InspectorInstrumentation::segmentCreatedImpl):
(WebCore::InspectorInstrumentation::segmentCompletedImpl):
(WebCore::InspectorInstrumentation::segmentLoadedImpl):
(WebCore::InspectorInstrumentation::segmentUnloadedImpl):
(WebCore::InspectorInstrumentation::captureStartedImpl):
(WebCore::InspectorInstrumentation::captureStoppedImpl):
(WebCore::InspectorInstrumentation::playbackStartedImpl):
(WebCore::InspectorInstrumentation::playbackPausedImpl):
(WebCore::InspectorInstrumentation::playbackHitPositionImpl):
(WebCore::InspectorInstrumentation::playbackFinishedImpl):
(WebCore::InspectorInstrumentation::networkStateChangedImpl):
(WebCore::InspectorInstrumentation::updateApplicationCacheStatusImpl):
(WebCore::InspectorInstrumentation::pauseOnNativeEventIfNeeded):
(WebCore::InspectorInstrumentation::cancelPauseOnNativeEvent):
(WebCore::InspectorInstrumentation::didRequestAnimationFrameImpl):
(WebCore::InspectorInstrumentation::didCancelAnimationFrameImpl):
(WebCore::InspectorInstrumentation::willFireAnimationFrameImpl):
(WebCore::InspectorInstrumentation::registerInstrumentingAgents):
(WebCore::InspectorInstrumentation::unregisterInstrumentingAgents):
(WebCore::InspectorInstrumentation::retrieveTimelineAgent):
(WebCore::InspectorInstrumentation::instrumentingAgentsForPage): Add by-reference version which contains the logic from instrumentationForPage().
(WebCore::InspectorInstrumentation::instrumentingAgentsForRenderer):
(WebCore::InspectorInstrumentation::instrumentingAgentsForWorkerGlobalScope):
(WebCore::InspectorInstrumentation::instrumentingAgentsForNonDocumentContext):
(WebCore::InspectorInstrumentation::layerTreeDidChangeImpl):
(WebCore::InspectorInstrumentation::renderLayerDestroyedImpl):
(WebCore::InspectorInstrumentation::pseudoElementDestroyedImpl):
(WebCore::InspectorInstrumentation::didCreateIsolatedContextImpl): Deleted.
* inspector/InspectorInstrumentation.h:
(WebCore::InspectorInstrumentation::didClearWindowObjectInWorld):
(WebCore::InspectorInstrumentation::isDebuggerPaused):
(WebCore::InspectorInstrumentation::willInsertDOMNode):
(WebCore::InspectorInstrumentation::didInsertDOMNode):
(WebCore::InspectorInstrumentation::willRemoveDOMNode):
(WebCore::InspectorInstrumentation::didRemoveDOMNode):
(WebCore::InspectorInstrumentation::willModifyDOMAttr):
(WebCore::InspectorInstrumentation::didModifyDOMAttr):
(WebCore::InspectorInstrumentation::didRemoveDOMAttr):
(WebCore::InspectorInstrumentation::didInvalidateStyleAttr):
(WebCore::InspectorInstrumentation::frameWindowDiscarded):
(WebCore::InspectorInstrumentation::mediaQueryResultChanged):
(WebCore::InspectorInstrumentation::didPushShadowRoot):
(WebCore::InspectorInstrumentation::willPopShadowRoot):
(WebCore::InspectorInstrumentation::didCreateNamedFlow):
(WebCore::InspectorInstrumentation::willRemoveNamedFlow):
(WebCore::InspectorInstrumentation::didChangeRegionOverset):
(WebCore::InspectorInstrumentation::didRegisterNamedFlowContentElement):
(WebCore::InspectorInstrumentation::didUnregisterNamedFlowContentElement):
(WebCore::InspectorInstrumentation::mouseDidMoveOverElement):
(WebCore::InspectorInstrumentation::handleTouchEvent):
(WebCore::InspectorInstrumentation::handleMousePress): Take Frame by reference instead of Page by pointer.
(WebCore::InspectorInstrumentation::forcePseudoState):
(WebCore::InspectorInstrumentation::characterDataModified):
(WebCore::InspectorInstrumentation::willSendXMLHttpRequest):
(WebCore::InspectorInstrumentation::didScheduleResourceRequest):
(WebCore::InspectorInstrumentation::didInstallTimer):
(WebCore::InspectorInstrumentation::didRemoveTimer):
(WebCore::InspectorInstrumentation::willCallFunction):
(WebCore::InspectorInstrumentation::willDispatchXHRReadyStateChangeEvent):
(WebCore::InspectorInstrumentation::willDispatchEvent):
(WebCore::InspectorInstrumentation::willHandleEvent): Pass a const event reference.
(WebCore::InspectorInstrumentation::willDispatchEventOnWindow):
(WebCore::InspectorInstrumentation::willEvaluateScript):
(WebCore::InspectorInstrumentation::didEvaluateScript):
(WebCore::InspectorInstrumentation::scriptsEnabled):
(WebCore::InspectorInstrumentation::willFireTimer):
(WebCore::InspectorInstrumentation::didInvalidateLayout):
(WebCore::InspectorInstrumentation::willLayout):
(WebCore::InspectorInstrumentation::didScroll):
(WebCore::InspectorInstrumentation::willDispatchXHRLoadEvent):
(WebCore::InspectorInstrumentation::willPaint):
(WebCore::InspectorInstrumentation::didPaint):
(WebCore::InspectorInstrumentation::willScrollLayer):
(WebCore::InspectorInstrumentation::didScrollLayer):
(WebCore::InspectorInstrumentation::willRecalculateStyle):
(WebCore::InspectorInstrumentation::didScheduleStyleRecalculation):
(WebCore::InspectorInstrumentation::applyEmulatedMedia): Pass string by reference.
(WebCore::InspectorInstrumentation::willSendRequest):
(WebCore::InspectorInstrumentation::continueAfterPingLoader):
(WebCore::InspectorInstrumentation::markResourceAsCached):
(WebCore::InspectorInstrumentation::didLoadResourceFromMemoryCache):
(WebCore::InspectorInstrumentation::willReceiveResourceData):
(WebCore::InspectorInstrumentation::willReceiveResourceResponse):
(WebCore::InspectorInstrumentation::continueAfterXFrameOptionsDenied):
(WebCore::InspectorInstrumentation::continueWithPolicyDownload):
(WebCore::InspectorInstrumentation::continueWithPolicyIgnore):
(WebCore::InspectorInstrumentation::didReceiveData):
(WebCore::InspectorInstrumentation::didFinishLoading):
(WebCore::InspectorInstrumentation::didFailLoading):
(WebCore::InspectorInstrumentation::documentThreadableLoaderStartedLoadingForClient): No need to go through
ScriptExecutionContext interface, as it's always a Document.
(WebCore::InspectorInstrumentation::willLoadXHR):
(WebCore::InspectorInstrumentation::didFailXHRLoading):
(WebCore::InspectorInstrumentation::didFinishXHRLoading):
(WebCore::InspectorInstrumentation::didReceiveXHRResponse):
(WebCore::InspectorInstrumentation::willLoadXHRSynchronously):
(WebCore::InspectorInstrumentation::didLoadXHRSynchronously):
(WebCore::InspectorInstrumentation::scriptImported):
(WebCore::InspectorInstrumentation::scriptExecutionBlockedByCSP):
(WebCore::InspectorInstrumentation::didReceiveScriptResponse):
(WebCore::InspectorInstrumentation::domContentLoadedEventFired):
(WebCore::InspectorInstrumentation::loadEventFired):
(WebCore::InspectorInstrumentation::frameDetachedFromParent):
(WebCore::InspectorInstrumentation::didCommitLoad):
(WebCore::InspectorInstrumentation::frameDocumentUpdated):
(WebCore::InspectorInstrumentation::loaderDetachedFromFrame):
(WebCore::InspectorInstrumentation::willRunJavaScriptDialog):
(WebCore::InspectorInstrumentation::willDestroyCachedResource):
(WebCore::InspectorInstrumentation::willWriteHTML):
(WebCore::InspectorInstrumentation::didDispatchDOMStorageEvent):
(WebCore::InspectorInstrumentation::shouldPauseDedicatedWorkerOnStart):
(WebCore::InspectorInstrumentation::didStartWorkerGlobalScope):
(WebCore::InspectorInstrumentation::workerGlobalScopeTerminated):
(WebCore::InspectorInstrumentation::didCreateWebSocket):
(WebCore::InspectorInstrumentation::willSendWebSocketHandshakeRequest):
(WebCore::InspectorInstrumentation::didReceiveWebSocketHandshakeResponse):
(WebCore::InspectorInstrumentation::didCloseWebSocket):
(WebCore::InspectorInstrumentation::didReceiveWebSocketFrame):
(WebCore::InspectorInstrumentation::didReceiveWebSocketFrameError):
(WebCore::InspectorInstrumentation::didSendWebSocketFrame):
(WebCore::InspectorInstrumentation::sessionCreated):
(WebCore::InspectorInstrumentation::sessionLoaded):
(WebCore::InspectorInstrumentation::sessionModified):
(WebCore::InspectorInstrumentation::segmentCreated):
(WebCore::InspectorInstrumentation::segmentCompleted):
(WebCore::InspectorInstrumentation::segmentLoaded):
(WebCore::InspectorInstrumentation::segmentUnloaded):
(WebCore::InspectorInstrumentation::captureStarted):
(WebCore::InspectorInstrumentation::captureStopped):
(WebCore::InspectorInstrumentation::playbackStarted):
(WebCore::InspectorInstrumentation::playbackPaused):
(WebCore::InspectorInstrumentation::playbackFinished):
(WebCore::InspectorInstrumentation::playbackHitPosition):
(WebCore::InspectorInstrumentation::networkStateChanged):
(WebCore::InspectorInstrumentation::updateApplicationCacheStatus):
(WebCore::InspectorInstrumentation::didRequestAnimationFrame):
(WebCore::InspectorInstrumentation::didCancelAnimationFrame):
(WebCore::InspectorInstrumentation::willFireAnimationFrame):
(WebCore::InspectorInstrumentation::layerTreeDidChange):
(WebCore::InspectorInstrumentation::renderLayerDestroyed):
(WebCore::InspectorInstrumentation::pseudoElementDestroyed):
(WebCore::InspectorInstrumentation::instrumentingAgentsForFrame):
(WebCore::InspectorInstrumentation::instrumentingAgentsForDocument):
(WebCore::InspectorInstrumentation::didCreateIsolatedContext): Deleted.
* inspector/InspectorInstrumentationCookie.cpp: Take a reference, use default RefPtr constructor.
(WebCore::InspectorInstrumentationCookie::InspectorInstrumentationCookie):
* inspector/InspectorInstrumentationCookie.h: Fix misplaced ENABLE guard.
* inspector/InstrumentingAgents.cpp:
(WebCore::instrumentationForPage): Deleted.
(WebCore::instrumentationForWorkerGlobalScope): Deleted.
* inspector/InstrumentingAgents.h:
* inspector/WorkerInspectorController.h:
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::responseReceived):
(WebCore::DocumentLoader::continueAfterContentPolicy):
(WebCore::DocumentLoader::detachFromFrame):
* loader/DocumentThreadableLoader.cpp: Remove unnecessary ENABLE(INSPECTOR) guards, as these inlined calls
are boiled away by the compiler if !ENABLE(INSPECTOR).
(WebCore::DocumentThreadableLoader::didReceiveData):
(WebCore::DocumentThreadableLoader::didFinishLoading):
(WebCore::DocumentThreadableLoader::didFail):
(WebCore::DocumentThreadableLoader::preflightFailure):
(WebCore::DocumentThreadableLoader::loadRequest):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::detachFromParent):
(WebCore::FrameLoader::loadedResourceFromMemoryCache):
(WebCore::FrameLoader::dispatchDidClearWindowObjectInWorld):
(WebCore::FrameLoader::dispatchDidCommitLoad):
* loader/ResourceLoadScheduler.cpp:
(WebCore::ResourceLoadScheduler::notifyDidScheduleResourceRequest):
* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::willSendRequest): Remove unnecessary ENABLE guard.
* loader/appcache/ApplicationCacheGroup.cpp: Remove several unnecessary ENABLE guards.
(WebCore::ApplicationCacheGroup::didReceiveResponse):
(WebCore::ApplicationCacheGroup::didReceiveData):
(WebCore::ApplicationCacheGroup::didFinishLoading):
(WebCore::ApplicationCacheGroup::didFail):
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::deleteIfPossible):
* page/Chrome.cpp:
(WebCore::Chrome::scroll):
(WebCore::Chrome::runBeforeUnloadConfirmPanel):
(WebCore::Chrome::runJavaScriptAlert):
(WebCore::Chrome::runJavaScriptConfirm):
(WebCore::Chrome::runJavaScriptPrompt):
(WebCore::Chrome::mouseDidMoveOverElement):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::dispatchLoadEvent):
(WebCore::DOMWindow::dispatchEvent):
* page/EventHandler.cpp:
(WebCore::EventHandler::handleMousePressEvent):
(WebCore::EventHandler::handleTouchEvent): Add a guard to make it safe to pass event target by-reference.
* page/FrameView.cpp:
(WebCore::FrameView::layout):
(WebCore::FrameView::mediaType):
(WebCore::FrameView::scheduleRelayout):
(WebCore::FrameView::scheduleRelayoutOfSubtree):
* page/PageConsoleClient.cpp:
(WebCore::PageConsoleClient::addMessage):
(WebCore::PageConsoleClient::messageWithTypeAndLevel):
(WebCore::PageConsoleClient::count):
(WebCore::PageConsoleClient::profile):
(WebCore::PageConsoleClient::profileEnd):
(WebCore::PageConsoleClient::time):
(WebCore::PageConsoleClient::timeEnd):
(WebCore::PageConsoleClient::timeStamp):
* page/Settings.cpp:
(WebCore::Settings::setScriptEnabled):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::scrollTo):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::layerBecameNonComposited):
* rendering/RenderNamedFlowThread.cpp:
(WebCore::RenderNamedFlowThread::registerNamedFlowContentElement):
(WebCore::RenderNamedFlowThread::unregisterNamedFlowContentElement):
(WebCore::RenderNamedFlowThread::dispatchRegionOversetChangeEventIfNeeded):
* replay/ReplayController.cpp:
(WebCore::ReplayController::switchSession):
(WebCore::ReplayController::createSegment):
(WebCore::ReplayController::completeSegment):
(WebCore::ReplayController::loadSegmentAtIndex):
(WebCore::ReplayController::unloadSegment):
(WebCore::ReplayController::startCapturing):
(WebCore::ReplayController::stopCapturing):
(WebCore::ReplayController::startPlayback):
(WebCore::ReplayController::pausePlayback):
(WebCore::ReplayController::cancelPlayback):
(WebCore::ReplayController::willDispatchInput):
* testing/Internals.cpp:
(WebCore::Internals::consoleMessageArgumentCounts):
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::callReadyStateChangeListener):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreWebCoreexpin">trunk/Source/WebCore/WebCore.exp.in</a></li>
<li><a href="#trunkSourceWebCorebindingsjsScriptControllercpp">trunk/Source/WebCore/bindings/js/ScriptController.cpp</a></li>
<li><a href="#trunkSourceWebCorecssPropertySetCSSStyleDeclarationcpp">trunk/Source/WebCore/css/PropertySetCSSStyleDeclaration.cpp</a></li>
<li><a href="#trunkSourceWebCorecssSelectorCheckercpp">trunk/Source/WebCore/css/SelectorChecker.cpp</a></li>
<li><a href="#trunkSourceWebCorecssStyleResolvercpp">trunk/Source/WebCore/css/StyleResolver.cpp</a></li>
<li><a href="#trunkSourceWebCorecssjitSelectorCompilercpp">trunk/Source/WebCore/cssjit/SelectorCompiler.cpp</a></li>
<li><a href="#trunkSourceWebCoredomCharacterDatacpp">trunk/Source/WebCore/dom/CharacterData.cpp</a></li>
<li><a href="#trunkSourceWebCoredomContainerNodecpp">trunk/Source/WebCore/dom/ContainerNode.cpp</a></li>
<li><a href="#trunkSourceWebCoredomContainerNodeAlgorithmsh">trunk/Source/WebCore/dom/ContainerNodeAlgorithms.h</a></li>
<li><a href="#trunkSourceWebCoredomDocumentcpp">trunk/Source/WebCore/dom/Document.cpp</a></li>
<li><a href="#trunkSourceWebCoredomElementcpp">trunk/Source/WebCore/dom/Element.cpp</a></li>
<li><a href="#trunkSourceWebCoredomEventTargetcpp">trunk/Source/WebCore/dom/EventTarget.cpp</a></li>
<li><a href="#trunkSourceWebCoredomNamedFlowCollectioncpp">trunk/Source/WebCore/dom/NamedFlowCollection.cpp</a></li>
<li><a href="#trunkSourceWebCoredomPseudoElementcpp">trunk/Source/WebCore/dom/PseudoElement.cpp</a></li>
<li><a href="#trunkSourceWebCoredomStyledElementcpp">trunk/Source/WebCore/dom/StyledElement.cpp</a></li>
<li><a href="#trunkSourceWebCoreinspectorInspectorConsoleInstrumentationh">trunk/Source/WebCore/inspector/InspectorConsoleInstrumentation.h</a></li>
<li><a href="#trunkSourceWebCoreinspectorInspectorControllercpp">trunk/Source/WebCore/inspector/InspectorController.cpp</a></li>
<li><a href="#trunkSourceWebCoreinspectorInspectorControllerh">trunk/Source/WebCore/inspector/InspectorController.h</a></li>
<li><a href="#trunkSourceWebCoreinspectorInspectorDatabaseInstrumentationh">trunk/Source/WebCore/inspector/InspectorDatabaseInstrumentation.h</a></li>
<li><a href="#trunkSourceWebCoreinspectorInspectorInstrumentationcpp">trunk/Source/WebCore/inspector/InspectorInstrumentation.cpp</a></li>
<li><a href="#trunkSourceWebCoreinspectorInspectorInstrumentationh">trunk/Source/WebCore/inspector/InspectorInstrumentation.h</a></li>
<li><a href="#trunkSourceWebCoreinspectorInspectorInstrumentationCookiecpp">trunk/Source/WebCore/inspector/InspectorInstrumentationCookie.cpp</a></li>
<li><a href="#trunkSourceWebCoreinspectorInspectorInstrumentationCookieh">trunk/Source/WebCore/inspector/InspectorInstrumentationCookie.h</a></li>
<li><a href="#trunkSourceWebCoreinspectorInstrumentingAgentscpp">trunk/Source/WebCore/inspector/InstrumentingAgents.cpp</a></li>
<li><a href="#trunkSourceWebCoreinspectorInstrumentingAgentsh">trunk/Source/WebCore/inspector/InstrumentingAgents.h</a></li>
<li><a href="#trunkSourceWebCoreinspectorWorkerInspectorControllerh">trunk/Source/WebCore/inspector/WorkerInspectorController.h</a></li>
<li><a href="#trunkSourceWebCoreloaderDocumentLoadercpp">trunk/Source/WebCore/loader/DocumentLoader.cpp</a></li>
<li><a href="#trunkSourceWebCoreloaderDocumentThreadableLoadercpp">trunk/Source/WebCore/loader/DocumentThreadableLoader.cpp</a></li>
<li><a href="#trunkSourceWebCoreloaderFrameLoadercpp">trunk/Source/WebCore/loader/FrameLoader.cpp</a></li>
<li><a href="#trunkSourceWebCoreloaderResourceLoadSchedulercpp">trunk/Source/WebCore/loader/ResourceLoadScheduler.cpp</a></li>
<li><a href="#trunkSourceWebCoreloaderResourceLoadercpp">trunk/Source/WebCore/loader/ResourceLoader.cpp</a></li>
<li><a href="#trunkSourceWebCoreloaderappcacheApplicationCacheGroupcpp">trunk/Source/WebCore/loader/appcache/ApplicationCacheGroup.cpp</a></li>
<li><a href="#trunkSourceWebCoreloadercacheCachedResourcecpp">trunk/Source/WebCore/loader/cache/CachedResource.cpp</a></li>
<li><a href="#trunkSourceWebCorepageChromecpp">trunk/Source/WebCore/page/Chrome.cpp</a></li>
<li><a href="#trunkSourceWebCorepageDOMWindowcpp">trunk/Source/WebCore/page/DOMWindow.cpp</a></li>
<li><a href="#trunkSourceWebCorepageEventHandlercpp">trunk/Source/WebCore/page/EventHandler.cpp</a></li>
<li><a href="#trunkSourceWebCorepageFrameViewcpp">trunk/Source/WebCore/page/FrameView.cpp</a></li>
<li><a href="#trunkSourceWebCorepagePageConsoleClientcpp">trunk/Source/WebCore/page/PageConsoleClient.cpp</a></li>
<li><a href="#trunkSourceWebCorepageSettingscpp">trunk/Source/WebCore/page/Settings.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderLayercpp">trunk/Source/WebCore/rendering/RenderLayer.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderLayerCompositorcpp">trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderNamedFlowThreadcpp">trunk/Source/WebCore/rendering/RenderNamedFlowThread.cpp</a></li>
<li><a href="#trunkSourceWebCorereplayReplayControllercpp">trunk/Source/WebCore/replay/ReplayController.cpp</a></li>
<li><a href="#trunkSourceWebCoretestingInternalscpp">trunk/Source/WebCore/testing/Internals.cpp</a></li>
<li><a href="#trunkSourceWebCorexmlXMLHttpRequestcpp">trunk/Source/WebCore/xml/XMLHttpRequest.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (177924 => 177925)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-01-05 21:11:44 UTC (rev 177924)
+++ trunk/Source/WebCore/ChangeLog        2015-01-05 21:30:33 UTC (rev 177925)
</span><span class="lines">@@ -1,3 +1,422 @@
</span><ins>+2015-01-01  Brian J. Burg  &lt;burg@cs.washington.edu&gt;
+
+        Web Inspector: pass parameters to inspector instrumentation by reference where possible
+        https://bugs.webkit.org/show_bug.cgi?id=139981
+
+        Reviewed by Andreas Kling.
+
+        Clean up inspector instrumentation entry points throughout WebCore. In particular, make
+        parameters pass-by-reference if they are not nullable. Also standardize quirky parameter
+        orders and do other small cleanups in InspectorInstrumentation and at callsites.
+
+        Inspector agents still take the pertinent parameters by pointer even when they could be
+        passed by reference. This will be addressed in a follow-up change.
+
+        No new tests, no behavior changed.
+
+        * WebCore.exp.in:
+        * bindings/js/ScriptController.cpp:
+        (WebCore::ScriptController::evaluateInWorld):
+        * css/PropertySetCSSStyleDeclaration.cpp:
+        * css/SelectorChecker.cpp:
+        (WebCore::SelectorChecker::checkOne):
+        (WebCore::SelectorChecker::matchesFocusPseudoClass):
+        * css/StyleResolver.cpp:
+        (WebCore::StyleResolver::styleForElement):
+        * cssjit/SelectorCompiler.cpp:
+        (WebCore::SelectorCompiler::elementIsActive):
+        (WebCore::SelectorCompiler::elementIsActiveForStyleResolution):
+        (WebCore::SelectorCompiler::elementIsHovered):
+        (WebCore::SelectorCompiler::elementIsHoveredForStyleResolution):
+        * dom/CharacterData.cpp:
+        (WebCore::CharacterData::dispatchModifiedEvent): Remove unnecessary ENABLE guard.
+        * dom/ContainerNode.cpp:
+        (WebCore::ContainerNode::insertBefore):
+        (WebCore::ContainerNode::replaceChild):
+        (WebCore::ContainerNode::removeBetween):
+        (WebCore::ContainerNode::appendChild):
+        (WebCore::dispatchChildRemovalEvents):
+        * dom/ContainerNodeAlgorithms.h:
+        (WebCore::ChildNodeInsertionNotifier::notify): Remove unnecessary ENABLE guard.
+        * dom/Document.cpp:
+        (WebCore::Document::scheduleStyleRecalc):
+        (WebCore::Document::recalcStyle):
+        (WebCore::Document::finishedParsing): This is safe because we checked the argument.
+        * dom/Element.cpp:
+        (WebCore::Element::addShadowRoot):
+        (WebCore::Element::removeShadowRoot): This is safe because we checked the argument.
+        (WebCore::Element::willModifyAttribute): Remove unnecessary ENABLE guard.
+        (WebCore::Element::didAddAttribute):
+        (WebCore::Element::didModifyAttribute):
+        (WebCore::Element::didRemoveAttribute):
+        * dom/EventTarget.cpp:
+        (WebCore::EventTarget::fireEventListeners): This is safe because the type test would fail if null.
+        * dom/NamedFlowCollection.cpp: Pass by reference since code already assumes non-null.
+        (WebCore::NamedFlowCollection::ensureFlowWithName):
+        (WebCore::NamedFlowCollection::discardNamedFlow):
+        * dom/PseudoElement.cpp:
+        (WebCore::PseudoElement::~PseudoElement):
+        * dom/StyledElement.cpp:
+        (WebCore::StyledElement::styleAttributeChanged):
+        (WebCore::StyledElement::inlineStyleChanged):
+        * inspector/InspectorConsoleInstrumentation.h:
+        (WebCore::InspectorInstrumentation::addMessageToConsole):
+        (WebCore::InspectorInstrumentation::consoleCount):
+        (WebCore::InspectorInstrumentation::startConsoleTiming):
+        (WebCore::InspectorInstrumentation::stopConsoleTiming):
+        (WebCore::InspectorInstrumentation::consoleTimeStamp):
+        (WebCore::InspectorInstrumentation::startProfiling):
+        (WebCore::InspectorInstrumentation::stopProfiling):
+        * inspector/InspectorController.cpp:
+        (WebCore::InspectorController::didClearWindowObjectInWorld):
+        (WebCore::InspectorController::connectFrontend):
+        (WebCore::InspectorController::disconnectFrontend):
+        * inspector/InspectorController.h: Remove instrumentationForPage() in favor of using instrumentingAgentsForPage() directly.
+        * inspector/InspectorDatabaseInstrumentation.h:
+        (WebCore::InspectorInstrumentation::didOpenDatabase):
+        * inspector/InspectorInstrumentation.cpp: Add missing s_ prefix for global s_instrumentingAgentSets. Pass the instrumenting
+        agent by reference since it was already null-checked if we reached a slow path for instrumentation.
+        (WebCore::InspectorInstrumentation::didClearWindowObjectInWorldImpl):
+        (WebCore::InspectorInstrumentation::isDebuggerPausedImpl):
+        (WebCore::InspectorInstrumentation::willInsertDOMNodeImpl):
+        (WebCore::InspectorInstrumentation::didInsertDOMNodeImpl):
+        (WebCore::InspectorInstrumentation::willRemoveDOMNodeImpl):
+        (WebCore::InspectorInstrumentation::didRemoveDOMNodeImpl):
+        (WebCore::InspectorInstrumentation::willModifyDOMAttrImpl):
+        (WebCore::InspectorInstrumentation::didModifyDOMAttrImpl):
+        (WebCore::InspectorInstrumentation::didRemoveDOMAttrImpl):
+        (WebCore::InspectorInstrumentation::didInvalidateStyleAttrImpl):
+        (WebCore::InspectorInstrumentation::frameWindowDiscardedImpl):
+        (WebCore::InspectorInstrumentation::mediaQueryResultChangedImpl):
+        (WebCore::InspectorInstrumentation::didPushShadowRootImpl):
+        (WebCore::InspectorInstrumentation::willPopShadowRootImpl):
+        (WebCore::InspectorInstrumentation::didCreateNamedFlowImpl):
+        (WebCore::InspectorInstrumentation::willRemoveNamedFlowImpl):
+        (WebCore::InspectorInstrumentation::didChangeRegionOversetImpl):
+        (WebCore::InspectorInstrumentation::didRegisterNamedFlowContentElementImpl):
+        (WebCore::InspectorInstrumentation::didUnregisterNamedFlowContentElementImpl):
+        (WebCore::InspectorInstrumentation::mouseDidMoveOverElementImpl):
+        (WebCore::InspectorInstrumentation::didScrollImpl):
+        (WebCore::InspectorInstrumentation::handleTouchEventImpl):
+        (WebCore::InspectorInstrumentation::handleMousePressImpl):
+        (WebCore::InspectorInstrumentation::forcePseudoStateImpl):
+        (WebCore::InspectorInstrumentation::characterDataModifiedImpl):
+        (WebCore::InspectorInstrumentation::willSendXMLHttpRequestImpl):
+        (WebCore::InspectorInstrumentation::didScheduleResourceRequestImpl):
+        (WebCore::InspectorInstrumentation::didInstallTimerImpl):
+        (WebCore::InspectorInstrumentation::didRemoveTimerImpl):
+        (WebCore::InspectorInstrumentation::willCallFunctionImpl):
+        (WebCore::InspectorInstrumentation::willDispatchXHRReadyStateChangeEventImpl):
+        (WebCore::InspectorInstrumentation::willDispatchEventImpl):
+        (WebCore::InspectorInstrumentation::willHandleEventImpl):
+        (WebCore::InspectorInstrumentation::didHandleEventImpl): Add proper cookie guard and pass by reference.
+        (WebCore::InspectorInstrumentation::willDispatchEventOnWindowImpl):
+        (WebCore::InspectorInstrumentation::willEvaluateScriptImpl):
+        (WebCore::InspectorInstrumentation::didEvaluateScriptImpl):
+        (WebCore::InspectorInstrumentation::scriptsEnabledImpl):
+        (WebCore::InspectorInstrumentation::didCreateIsolatedContextImpl): Removed, as there are no callers from WebCore. Possible V8 artifact.
+        (WebCore::InspectorInstrumentation::willFireTimerImpl):
+        (WebCore::InspectorInstrumentation::didFireTimerImpl): Add proper cookie guard and pass by reference.
+        (WebCore::InspectorInstrumentation::didInvalidateLayoutImpl):
+        (WebCore::InspectorInstrumentation::willLayoutImpl):
+        (WebCore::InspectorInstrumentation::willDispatchXHRLoadEventImpl):
+        (WebCore::InspectorInstrumentation::willPaintImpl):
+        (WebCore::InspectorInstrumentation::didPaintImpl):
+        (WebCore::InspectorInstrumentation::willScrollLayerImpl):
+        (WebCore::InspectorInstrumentation::didScrollLayerImpl):
+        (WebCore::InspectorInstrumentation::willRecalculateStyleImpl):
+        (WebCore::InspectorInstrumentation::didRecalculateStyleImpl): Add proper cookie guard and pass by reference.
+        (WebCore::InspectorInstrumentation::didScheduleStyleRecalculationImpl):
+        (WebCore::InspectorInstrumentation::applyEmulatedMediaImpl): Pass string by reference.
+        (WebCore::InspectorInstrumentation::willSendRequestImpl):
+        (WebCore::InspectorInstrumentation::continueAfterPingLoaderImpl):
+        (WebCore::InspectorInstrumentation::markResourceAsCachedImpl):
+        (WebCore::InspectorInstrumentation::didLoadResourceFromMemoryCacheImpl):
+        (WebCore::InspectorInstrumentation::willReceiveResourceDataImpl):
+        (WebCore::InspectorInstrumentation::willReceiveResourceResponseImpl):
+        (WebCore::InspectorInstrumentation::didReceiveResourceResponseImpl): Add proper cookie guard and pass by reference.
+        (WebCore::InspectorInstrumentation::didReceiveResourceResponseButCanceledImpl):
+        (WebCore::InspectorInstrumentation::continueAfterXFrameOptionsDeniedImpl):
+        (WebCore::InspectorInstrumentation::continueWithPolicyDownloadImpl):
+        (WebCore::InspectorInstrumentation::continueWithPolicyIgnoreImpl):
+        (WebCore::InspectorInstrumentation::didReceiveDataImpl):
+        (WebCore::InspectorInstrumentation::didFinishLoadingImpl):
+        (WebCore::InspectorInstrumentation::didFailLoadingImpl):
+        (WebCore::InspectorInstrumentation::documentThreadableLoaderStartedLoadingForClientImpl):
+        (WebCore::InspectorInstrumentation::willLoadXHRImpl):
+        (WebCore::InspectorInstrumentation::didFailXHRLoadingImpl):
+        (WebCore::InspectorInstrumentation::didFinishXHRLoadingImpl):
+        (WebCore::InspectorInstrumentation::didReceiveXHRResponseImpl):
+        (WebCore::InspectorInstrumentation::willLoadXHRSynchronouslyImpl):
+        (WebCore::InspectorInstrumentation::didLoadXHRSynchronouslyImpl):
+        (WebCore::InspectorInstrumentation::scriptImportedImpl):
+        (WebCore::InspectorInstrumentation::scriptExecutionBlockedByCSPImpl):
+        (WebCore::InspectorInstrumentation::didReceiveScriptResponseImpl):
+        (WebCore::InspectorInstrumentation::domContentLoadedEventFiredImpl): Use Frame::isMainFrame().
+        (WebCore::InspectorInstrumentation::loadEventFiredImpl): Use Frame::isMainFrame().
+        (WebCore::InspectorInstrumentation::frameDetachedFromParentImpl):
+        (WebCore::InspectorInstrumentation::didCommitLoadImpl):
+        (WebCore::InspectorInstrumentation::frameDocumentUpdatedImpl):
+        (WebCore::InspectorInstrumentation::loaderDetachedFromFrameImpl):
+        (WebCore::InspectorInstrumentation::willRunJavaScriptDialogImpl):
+        (WebCore::InspectorInstrumentation::willDestroyCachedResourceImpl): Use a range-based iterator.
+        (WebCore::InspectorInstrumentation::willWriteHTMLImpl):
+        (WebCore::InspectorInstrumentation::addMessageToConsoleImpl):
+        (WebCore::InspectorInstrumentation::consoleCountImpl):
+        (WebCore::InspectorInstrumentation::startConsoleTimingImpl):
+        (WebCore::InspectorInstrumentation::stopConsoleTimingImpl):
+        (WebCore::InspectorInstrumentation::consoleTimeStampImpl):
+        (WebCore::InspectorInstrumentation::startProfilingImpl):
+        (WebCore::InspectorInstrumentation::stopProfilingImpl):
+        (WebCore::InspectorInstrumentation::didOpenDatabaseImpl):
+        (WebCore::InspectorInstrumentation::didDispatchDOMStorageEventImpl):
+        (WebCore::InspectorInstrumentation::shouldPauseDedicatedWorkerOnStartImpl):
+        (WebCore::InspectorInstrumentation::didStartWorkerGlobalScopeImpl):
+        (WebCore::InspectorInstrumentation::willEvaluateWorkerScript):
+        (WebCore::InspectorInstrumentation::workerGlobalScopeTerminatedImpl):
+        (WebCore::InspectorInstrumentation::didCreateWebSocketImpl):
+        (WebCore::InspectorInstrumentation::willSendWebSocketHandshakeRequestImpl):
+        (WebCore::InspectorInstrumentation::didReceiveWebSocketHandshakeResponseImpl):
+        (WebCore::InspectorInstrumentation::didCloseWebSocketImpl):
+        (WebCore::InspectorInstrumentation::didReceiveWebSocketFrameImpl):
+        (WebCore::InspectorInstrumentation::didReceiveWebSocketFrameErrorImpl):
+        (WebCore::InspectorInstrumentation::didSendWebSocketFrameImpl):
+        (WebCore::InspectorInstrumentation::sessionCreatedImpl):
+        (WebCore::InspectorInstrumentation::sessionLoadedImpl):
+        (WebCore::InspectorInstrumentation::sessionModifiedImpl):
+        (WebCore::InspectorInstrumentation::segmentCreatedImpl):
+        (WebCore::InspectorInstrumentation::segmentCompletedImpl):
+        (WebCore::InspectorInstrumentation::segmentLoadedImpl):
+        (WebCore::InspectorInstrumentation::segmentUnloadedImpl):
+        (WebCore::InspectorInstrumentation::captureStartedImpl):
+        (WebCore::InspectorInstrumentation::captureStoppedImpl):
+        (WebCore::InspectorInstrumentation::playbackStartedImpl):
+        (WebCore::InspectorInstrumentation::playbackPausedImpl):
+        (WebCore::InspectorInstrumentation::playbackHitPositionImpl):
+        (WebCore::InspectorInstrumentation::playbackFinishedImpl):
+        (WebCore::InspectorInstrumentation::networkStateChangedImpl):
+        (WebCore::InspectorInstrumentation::updateApplicationCacheStatusImpl):
+        (WebCore::InspectorInstrumentation::pauseOnNativeEventIfNeeded):
+        (WebCore::InspectorInstrumentation::cancelPauseOnNativeEvent):
+        (WebCore::InspectorInstrumentation::didRequestAnimationFrameImpl):
+        (WebCore::InspectorInstrumentation::didCancelAnimationFrameImpl):
+        (WebCore::InspectorInstrumentation::willFireAnimationFrameImpl):
+        (WebCore::InspectorInstrumentation::registerInstrumentingAgents):
+        (WebCore::InspectorInstrumentation::unregisterInstrumentingAgents):
+        (WebCore::InspectorInstrumentation::retrieveTimelineAgent):
+        (WebCore::InspectorInstrumentation::instrumentingAgentsForPage): Add by-reference version which contains the logic from instrumentationForPage().
+        (WebCore::InspectorInstrumentation::instrumentingAgentsForRenderer):
+        (WebCore::InspectorInstrumentation::instrumentingAgentsForWorkerGlobalScope):
+        (WebCore::InspectorInstrumentation::instrumentingAgentsForNonDocumentContext):
+        (WebCore::InspectorInstrumentation::layerTreeDidChangeImpl):
+        (WebCore::InspectorInstrumentation::renderLayerDestroyedImpl):
+        (WebCore::InspectorInstrumentation::pseudoElementDestroyedImpl):
+        (WebCore::InspectorInstrumentation::didCreateIsolatedContextImpl): Deleted.
+        * inspector/InspectorInstrumentation.h:
+        (WebCore::InspectorInstrumentation::didClearWindowObjectInWorld):
+        (WebCore::InspectorInstrumentation::isDebuggerPaused):
+        (WebCore::InspectorInstrumentation::willInsertDOMNode):
+        (WebCore::InspectorInstrumentation::didInsertDOMNode):
+        (WebCore::InspectorInstrumentation::willRemoveDOMNode):
+        (WebCore::InspectorInstrumentation::didRemoveDOMNode):
+        (WebCore::InspectorInstrumentation::willModifyDOMAttr):
+        (WebCore::InspectorInstrumentation::didModifyDOMAttr):
+        (WebCore::InspectorInstrumentation::didRemoveDOMAttr):
+        (WebCore::InspectorInstrumentation::didInvalidateStyleAttr):
+        (WebCore::InspectorInstrumentation::frameWindowDiscarded):
+        (WebCore::InspectorInstrumentation::mediaQueryResultChanged):
+        (WebCore::InspectorInstrumentation::didPushShadowRoot):
+        (WebCore::InspectorInstrumentation::willPopShadowRoot):
+        (WebCore::InspectorInstrumentation::didCreateNamedFlow):
+        (WebCore::InspectorInstrumentation::willRemoveNamedFlow):
+        (WebCore::InspectorInstrumentation::didChangeRegionOverset):
+        (WebCore::InspectorInstrumentation::didRegisterNamedFlowContentElement):
+        (WebCore::InspectorInstrumentation::didUnregisterNamedFlowContentElement):
+        (WebCore::InspectorInstrumentation::mouseDidMoveOverElement):
+        (WebCore::InspectorInstrumentation::handleTouchEvent):
+        (WebCore::InspectorInstrumentation::handleMousePress): Take Frame by reference instead of Page by pointer.
+        (WebCore::InspectorInstrumentation::forcePseudoState):
+        (WebCore::InspectorInstrumentation::characterDataModified):
+        (WebCore::InspectorInstrumentation::willSendXMLHttpRequest):
+        (WebCore::InspectorInstrumentation::didScheduleResourceRequest):
+        (WebCore::InspectorInstrumentation::didInstallTimer):
+        (WebCore::InspectorInstrumentation::didRemoveTimer):
+        (WebCore::InspectorInstrumentation::willCallFunction):
+        (WebCore::InspectorInstrumentation::willDispatchXHRReadyStateChangeEvent):
+        (WebCore::InspectorInstrumentation::willDispatchEvent):
+        (WebCore::InspectorInstrumentation::willHandleEvent): Pass a const event reference.
+        (WebCore::InspectorInstrumentation::willDispatchEventOnWindow):
+        (WebCore::InspectorInstrumentation::willEvaluateScript):
+        (WebCore::InspectorInstrumentation::didEvaluateScript):
+        (WebCore::InspectorInstrumentation::scriptsEnabled):
+        (WebCore::InspectorInstrumentation::willFireTimer):
+        (WebCore::InspectorInstrumentation::didInvalidateLayout):
+        (WebCore::InspectorInstrumentation::willLayout):
+        (WebCore::InspectorInstrumentation::didScroll):
+        (WebCore::InspectorInstrumentation::willDispatchXHRLoadEvent):
+        (WebCore::InspectorInstrumentation::willPaint):
+        (WebCore::InspectorInstrumentation::didPaint):
+        (WebCore::InspectorInstrumentation::willScrollLayer):
+        (WebCore::InspectorInstrumentation::didScrollLayer):
+        (WebCore::InspectorInstrumentation::willRecalculateStyle):
+        (WebCore::InspectorInstrumentation::didScheduleStyleRecalculation):
+        (WebCore::InspectorInstrumentation::applyEmulatedMedia): Pass string by reference.
+        (WebCore::InspectorInstrumentation::willSendRequest):
+        (WebCore::InspectorInstrumentation::continueAfterPingLoader):
+        (WebCore::InspectorInstrumentation::markResourceAsCached):
+        (WebCore::InspectorInstrumentation::didLoadResourceFromMemoryCache):
+        (WebCore::InspectorInstrumentation::willReceiveResourceData):
+        (WebCore::InspectorInstrumentation::willReceiveResourceResponse):
+        (WebCore::InspectorInstrumentation::continueAfterXFrameOptionsDenied):
+        (WebCore::InspectorInstrumentation::continueWithPolicyDownload):
+        (WebCore::InspectorInstrumentation::continueWithPolicyIgnore):
+        (WebCore::InspectorInstrumentation::didReceiveData):
+        (WebCore::InspectorInstrumentation::didFinishLoading):
+        (WebCore::InspectorInstrumentation::didFailLoading):
+        (WebCore::InspectorInstrumentation::documentThreadableLoaderStartedLoadingForClient): No need to go through
+        ScriptExecutionContext interface, as it's always a Document.
+        (WebCore::InspectorInstrumentation::willLoadXHR):
+        (WebCore::InspectorInstrumentation::didFailXHRLoading):
+        (WebCore::InspectorInstrumentation::didFinishXHRLoading):
+        (WebCore::InspectorInstrumentation::didReceiveXHRResponse):
+        (WebCore::InspectorInstrumentation::willLoadXHRSynchronously):
+        (WebCore::InspectorInstrumentation::didLoadXHRSynchronously):
+        (WebCore::InspectorInstrumentation::scriptImported):
+        (WebCore::InspectorInstrumentation::scriptExecutionBlockedByCSP):
+        (WebCore::InspectorInstrumentation::didReceiveScriptResponse):
+        (WebCore::InspectorInstrumentation::domContentLoadedEventFired):
+        (WebCore::InspectorInstrumentation::loadEventFired):
+        (WebCore::InspectorInstrumentation::frameDetachedFromParent):
+        (WebCore::InspectorInstrumentation::didCommitLoad):
+        (WebCore::InspectorInstrumentation::frameDocumentUpdated):
+        (WebCore::InspectorInstrumentation::loaderDetachedFromFrame):
+        (WebCore::InspectorInstrumentation::willRunJavaScriptDialog):
+        (WebCore::InspectorInstrumentation::willDestroyCachedResource):
+        (WebCore::InspectorInstrumentation::willWriteHTML):
+        (WebCore::InspectorInstrumentation::didDispatchDOMStorageEvent):
+        (WebCore::InspectorInstrumentation::shouldPauseDedicatedWorkerOnStart):
+        (WebCore::InspectorInstrumentation::didStartWorkerGlobalScope):
+        (WebCore::InspectorInstrumentation::workerGlobalScopeTerminated):
+        (WebCore::InspectorInstrumentation::didCreateWebSocket):
+        (WebCore::InspectorInstrumentation::willSendWebSocketHandshakeRequest):
+        (WebCore::InspectorInstrumentation::didReceiveWebSocketHandshakeResponse):
+        (WebCore::InspectorInstrumentation::didCloseWebSocket):
+        (WebCore::InspectorInstrumentation::didReceiveWebSocketFrame):
+        (WebCore::InspectorInstrumentation::didReceiveWebSocketFrameError):
+        (WebCore::InspectorInstrumentation::didSendWebSocketFrame):
+        (WebCore::InspectorInstrumentation::sessionCreated):
+        (WebCore::InspectorInstrumentation::sessionLoaded):
+        (WebCore::InspectorInstrumentation::sessionModified):
+        (WebCore::InspectorInstrumentation::segmentCreated):
+        (WebCore::InspectorInstrumentation::segmentCompleted):
+        (WebCore::InspectorInstrumentation::segmentLoaded):
+        (WebCore::InspectorInstrumentation::segmentUnloaded):
+        (WebCore::InspectorInstrumentation::captureStarted):
+        (WebCore::InspectorInstrumentation::captureStopped):
+        (WebCore::InspectorInstrumentation::playbackStarted):
+        (WebCore::InspectorInstrumentation::playbackPaused):
+        (WebCore::InspectorInstrumentation::playbackFinished):
+        (WebCore::InspectorInstrumentation::playbackHitPosition):
+        (WebCore::InspectorInstrumentation::networkStateChanged):
+        (WebCore::InspectorInstrumentation::updateApplicationCacheStatus):
+        (WebCore::InspectorInstrumentation::didRequestAnimationFrame):
+        (WebCore::InspectorInstrumentation::didCancelAnimationFrame):
+        (WebCore::InspectorInstrumentation::willFireAnimationFrame):
+        (WebCore::InspectorInstrumentation::layerTreeDidChange):
+        (WebCore::InspectorInstrumentation::renderLayerDestroyed):
+        (WebCore::InspectorInstrumentation::pseudoElementDestroyed):
+        (WebCore::InspectorInstrumentation::instrumentingAgentsForFrame):
+        (WebCore::InspectorInstrumentation::instrumentingAgentsForDocument):
+        (WebCore::InspectorInstrumentation::didCreateIsolatedContext): Deleted.
+        * inspector/InspectorInstrumentationCookie.cpp: Take a reference, use default RefPtr constructor.
+        (WebCore::InspectorInstrumentationCookie::InspectorInstrumentationCookie):
+        * inspector/InspectorInstrumentationCookie.h: Fix misplaced ENABLE guard.
+        * inspector/InstrumentingAgents.cpp:
+        (WebCore::instrumentationForPage): Deleted.
+        (WebCore::instrumentationForWorkerGlobalScope): Deleted.
+        * inspector/InstrumentingAgents.h:
+        * inspector/WorkerInspectorController.h:
+        * loader/DocumentLoader.cpp:
+        (WebCore::DocumentLoader::responseReceived):
+        (WebCore::DocumentLoader::continueAfterContentPolicy):
+        (WebCore::DocumentLoader::detachFromFrame):
+        * loader/DocumentThreadableLoader.cpp: Remove unnecessary ENABLE(INSPECTOR) guards, as these inlined calls
+        are boiled away by the compiler if !ENABLE(INSPECTOR).
+        (WebCore::DocumentThreadableLoader::didReceiveData):
+        (WebCore::DocumentThreadableLoader::didFinishLoading):
+        (WebCore::DocumentThreadableLoader::didFail):
+        (WebCore::DocumentThreadableLoader::preflightFailure):
+        (WebCore::DocumentThreadableLoader::loadRequest):
+        * loader/FrameLoader.cpp:
+        (WebCore::FrameLoader::detachFromParent):
+        (WebCore::FrameLoader::loadedResourceFromMemoryCache):
+        (WebCore::FrameLoader::dispatchDidClearWindowObjectInWorld):
+        (WebCore::FrameLoader::dispatchDidCommitLoad):
+        * loader/ResourceLoadScheduler.cpp:
+        (WebCore::ResourceLoadScheduler::notifyDidScheduleResourceRequest):
+        * loader/ResourceLoader.cpp:
+        (WebCore::ResourceLoader::willSendRequest): Remove unnecessary ENABLE guard.
+        * loader/appcache/ApplicationCacheGroup.cpp: Remove several unnecessary ENABLE guards.
+        (WebCore::ApplicationCacheGroup::didReceiveResponse):
+        (WebCore::ApplicationCacheGroup::didReceiveData):
+        (WebCore::ApplicationCacheGroup::didFinishLoading):
+        (WebCore::ApplicationCacheGroup::didFail):
+        * loader/cache/CachedResource.cpp:
+        (WebCore::CachedResource::deleteIfPossible):
+        * page/Chrome.cpp:
+        (WebCore::Chrome::scroll):
+        (WebCore::Chrome::runBeforeUnloadConfirmPanel):
+        (WebCore::Chrome::runJavaScriptAlert):
+        (WebCore::Chrome::runJavaScriptConfirm):
+        (WebCore::Chrome::runJavaScriptPrompt):
+        (WebCore::Chrome::mouseDidMoveOverElement):
+        * page/DOMWindow.cpp:
+        (WebCore::DOMWindow::dispatchLoadEvent):
+        (WebCore::DOMWindow::dispatchEvent):
+        * page/EventHandler.cpp:
+        (WebCore::EventHandler::handleMousePressEvent):
+        (WebCore::EventHandler::handleTouchEvent): Add a guard to make it safe to pass event target by-reference.
+        * page/FrameView.cpp:
+        (WebCore::FrameView::layout):
+        (WebCore::FrameView::mediaType):
+        (WebCore::FrameView::scheduleRelayout):
+        (WebCore::FrameView::scheduleRelayoutOfSubtree):
+        * page/PageConsoleClient.cpp:
+        (WebCore::PageConsoleClient::addMessage):
+        (WebCore::PageConsoleClient::messageWithTypeAndLevel):
+        (WebCore::PageConsoleClient::count):
+        (WebCore::PageConsoleClient::profile):
+        (WebCore::PageConsoleClient::profileEnd):
+        (WebCore::PageConsoleClient::time):
+        (WebCore::PageConsoleClient::timeEnd):
+        (WebCore::PageConsoleClient::timeStamp):
+        * page/Settings.cpp:
+        (WebCore::Settings::setScriptEnabled):
+        * rendering/RenderLayer.cpp:
+        (WebCore::RenderLayer::scrollTo):
+        * rendering/RenderLayerCompositor.cpp:
+        (WebCore::RenderLayerCompositor::layerBecameNonComposited):
+        * rendering/RenderNamedFlowThread.cpp:
+        (WebCore::RenderNamedFlowThread::registerNamedFlowContentElement):
+        (WebCore::RenderNamedFlowThread::unregisterNamedFlowContentElement):
+        (WebCore::RenderNamedFlowThread::dispatchRegionOversetChangeEventIfNeeded):
+        * replay/ReplayController.cpp:
+        (WebCore::ReplayController::switchSession):
+        (WebCore::ReplayController::createSegment):
+        (WebCore::ReplayController::completeSegment):
+        (WebCore::ReplayController::loadSegmentAtIndex):
+        (WebCore::ReplayController::unloadSegment):
+        (WebCore::ReplayController::startCapturing):
+        (WebCore::ReplayController::stopCapturing):
+        (WebCore::ReplayController::startPlayback):
+        (WebCore::ReplayController::pausePlayback):
+        (WebCore::ReplayController::cancelPlayback):
+        (WebCore::ReplayController::willDispatchInput):
+        * testing/Internals.cpp:
+        (WebCore::Internals::consoleMessageArgumentCounts):
+        * xml/XMLHttpRequest.cpp:
+        (WebCore::XMLHttpRequest::callReadyStateChangeListener):
+
</ins><span class="cx"> 2015-01-05  Dan Bernstein  &lt;mitz@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Tried to fix the iOS build.
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCoreexpin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.exp.in (177924 => 177925)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.exp.in        2015-01-05 21:11:44 UTC (rev 177924)
+++ trunk/Source/WebCore/WebCore.exp.in        2015-01-05 21:30:33 UTC (rev 177925)
</span><span class="lines">@@ -3195,7 +3195,6 @@
</span><span class="cx"> __ZN7WebCore21InspectorFrontendHost16disconnectClientEv
</span><span class="cx"> __ZN7WebCore21InspectorFrontendHostC1EPNS_23InspectorFrontendClientEPNS_4PageE
</span><span class="cx"> __ZN7WebCore21InspectorFrontendHostD1Ev
</span><del>-__ZN7WebCore22instrumentationForPageEPNS_4PageE
</del><span class="cx"> __ZN7WebCore24InspectorInstrumentation17s_frontendCounterE
</span><span class="cx"> __ZN7WebCore24InspectorInstrumentation26instrumentingAgentsForPageEPNS_4PageE
</span><span class="cx"> __ZN7WebCore28InspectorFrontendClientLocal11isUnderTestEv
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsScriptControllercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/ScriptController.cpp (177924 => 177925)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/ScriptController.cpp        2015-01-05 21:11:44 UTC (rev 177924)
+++ trunk/Source/WebCore/bindings/js/ScriptController.cpp        2015-01-05 21:30:33 UTC (rev 177925)
</span><span class="lines">@@ -144,13 +144,13 @@
</span><span class="cx"> 
</span><span class="cx">     Ref&lt;Frame&gt; protect(m_frame);
</span><span class="cx"> 
</span><del>-    InspectorInstrumentationCookie cookie = InspectorInstrumentation::willEvaluateScript(&amp;m_frame, sourceURL, sourceCode.startLine());
</del><ins>+    InspectorInstrumentationCookie cookie = InspectorInstrumentation::willEvaluateScript(m_frame, sourceURL, sourceCode.startLine());
</ins><span class="cx"> 
</span><span class="cx">     JSValue evaluationException;
</span><span class="cx"> 
</span><span class="cx">     JSValue returnValue = JSMainThreadExecState::evaluate(exec, jsSourceCode, shell, &amp;evaluationException);
</span><span class="cx"> 
</span><del>-    InspectorInstrumentation::didEvaluateScript(cookie, &amp;m_frame);
</del><ins>+    InspectorInstrumentation::didEvaluateScript(cookie, m_frame);
</ins><span class="cx"> 
</span><span class="cx">     if (evaluationException) {
</span><span class="cx">         reportException(exec, evaluationException, sourceCode.cachedScript());
</span></span></pre></div>
<a id="trunkSourceWebCorecssPropertySetCSSStyleDeclarationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/PropertySetCSSStyleDeclaration.cpp (177924 => 177925)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/PropertySetCSSStyleDeclaration.cpp        2015-01-05 21:11:44 UTC (rev 177924)
+++ trunk/Source/WebCore/css/PropertySetCSSStyleDeclaration.cpp        2015-01-05 21:30:33 UTC (rev 177925)
</span><span class="lines">@@ -88,7 +88,7 @@
</span><span class="cx">         s_currentDecl = 0;
</span><span class="cx">         s_shouldNotifyInspector = false;
</span><span class="cx">         if (localCopyStyleDecl-&gt;parentElement())
</span><del>-            InspectorInstrumentation::didInvalidateStyleAttr(&amp;localCopyStyleDecl-&gt;parentElement()-&gt;document(), localCopyStyleDecl-&gt;parentElement());
</del><ins>+            InspectorInstrumentation::didInvalidateStyleAttr(localCopyStyleDecl-&gt;parentElement()-&gt;document(), *localCopyStyleDecl-&gt;parentElement());
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     void enqueueMutationRecord()
</span></span></pre></div>
<a id="trunkSourceWebCorecssSelectorCheckercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/SelectorChecker.cpp (177924 => 177925)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/SelectorChecker.cpp        2015-01-05 21:11:44 UTC (rev 177924)
+++ trunk/Source/WebCore/css/SelectorChecker.cpp        2015-01-05 21:30:33 UTC (rev 177925)
</span><span class="lines">@@ -888,7 +888,7 @@
</span><span class="cx">                     else
</span><span class="cx">                         element-&gt;setChildrenAffectedByHover();
</span><span class="cx">                 }
</span><del>-                if (element-&gt;hovered() || InspectorInstrumentation::forcePseudoState(element, CSSSelector::PseudoClassHover))
</del><ins>+                if (element-&gt;hovered() || InspectorInstrumentation::forcePseudoState(*element, CSSSelector::PseudoClassHover))
</ins><span class="cx">                     return true;
</span><span class="cx">             }
</span><span class="cx">             break;
</span><span class="lines">@@ -900,7 +900,7 @@
</span><span class="cx">                     else
</span><span class="cx">                         element-&gt;setChildrenAffectedByActive();
</span><span class="cx">                 }
</span><del>-                if (element-&gt;active() || InspectorInstrumentation::forcePseudoState(element, CSSSelector::PseudoClassActive))
</del><ins>+                if (element-&gt;active() || InspectorInstrumentation::forcePseudoState(*element, CSSSelector::PseudoClassActive))
</ins><span class="cx">                     return true;
</span><span class="cx">             }
</span><span class="cx">             break;
</span><span class="lines">@@ -1127,7 +1127,7 @@
</span><span class="cx"> 
</span><span class="cx"> bool SelectorChecker::matchesFocusPseudoClass(const Element* element)
</span><span class="cx"> {
</span><del>-    if (InspectorInstrumentation::forcePseudoState(const_cast&lt;Element*&gt;(element), CSSSelector::PseudoClassFocus))
</del><ins>+    if (InspectorInstrumentation::forcePseudoState(const_cast&lt;Element&amp;&gt;(*element), CSSSelector::PseudoClassFocus))
</ins><span class="cx">         return true;
</span><span class="cx">     return element-&gt;focused() &amp;&amp; isFrameFocused(element);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorecssStyleResolvercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/StyleResolver.cpp (177924 => 177925)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/StyleResolver.cpp        2015-01-05 21:11:44 UTC (rev 177924)
+++ trunk/Source/WebCore/css/StyleResolver.cpp        2015-01-05 21:30:33 UTC (rev 177925)
</span><span class="lines">@@ -774,7 +774,7 @@
</span><span class="cx">         state.style()-&gt;setIsLink(true);
</span><span class="cx">         EInsideLink linkState = state.elementLinkState();
</span><span class="cx">         if (linkState != NotInsideLink) {
</span><del>-            bool forceVisited = InspectorInstrumentation::forcePseudoState(element, CSSSelector::PseudoClassVisited);
</del><ins>+            bool forceVisited = InspectorInstrumentation::forcePseudoState(*element, CSSSelector::PseudoClassVisited);
</ins><span class="cx">             if (forceVisited)
</span><span class="cx">                 linkState = InsideVisitedLink;
</span><span class="cx">         }
</span></span></pre></div>
<a id="trunkSourceWebCorecssjitSelectorCompilercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/cssjit/SelectorCompiler.cpp (177924 => 177925)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/cssjit/SelectorCompiler.cpp        2015-01-05 21:11:44 UTC (rev 177924)
+++ trunk/Source/WebCore/cssjit/SelectorCompiler.cpp        2015-01-05 21:30:33 UTC (rev 177925)
</span><span class="lines">@@ -2921,14 +2921,14 @@
</span><span class="cx"> 
</span><span class="cx"> static bool elementIsActive(Element* element)
</span><span class="cx"> {
</span><del>-    return element-&gt;active() || InspectorInstrumentation::forcePseudoState(element, CSSSelector::PseudoClassActive);
</del><ins>+    return element-&gt;active() || InspectorInstrumentation::forcePseudoState(*element, CSSSelector::PseudoClassActive);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static bool elementIsActiveForStyleResolution(Element* element, const SelectorChecker::CheckingContext* checkingContext)
</span><span class="cx"> {
</span><span class="cx">     if (checkingContext-&gt;resolvingMode == SelectorChecker::Mode::ResolvingStyle)
</span><span class="cx">         element-&gt;setChildrenAffectedByActive();
</span><del>-    return element-&gt;active() || InspectorInstrumentation::forcePseudoState(element, CSSSelector::PseudoClassActive);
</del><ins>+    return element-&gt;active() || InspectorInstrumentation::forcePseudoState(*element, CSSSelector::PseudoClassActive);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void SelectorCodeGenerator::generateElementIsActive(Assembler::JumpList&amp; failureCases, const SelectorFragment&amp; fragment)
</span><span class="lines">@@ -3100,14 +3100,14 @@
</span><span class="cx"> 
</span><span class="cx"> static bool elementIsHovered(Element* element)
</span><span class="cx"> {
</span><del>-    return element-&gt;hovered() || InspectorInstrumentation::forcePseudoState(element, CSSSelector::PseudoClassHover);
</del><ins>+    return element-&gt;hovered() || InspectorInstrumentation::forcePseudoState(*element, CSSSelector::PseudoClassHover);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static bool elementIsHoveredForStyleResolution(Element* element, const SelectorChecker::CheckingContext* checkingContext)
</span><span class="cx"> {
</span><span class="cx">     if (checkingContext-&gt;resolvingMode == SelectorChecker::Mode::ResolvingStyle)
</span><span class="cx">         element-&gt;setChildrenAffectedByHover();
</span><del>-    return element-&gt;hovered() || InspectorInstrumentation::forcePseudoState(element, CSSSelector::PseudoClassHover);
</del><ins>+    return element-&gt;hovered() || InspectorInstrumentation::forcePseudoState(*element, CSSSelector::PseudoClassHover);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void SelectorCodeGenerator::generateElementIsHovered(Assembler::JumpList&amp; failureCases, const SelectorFragment&amp; fragment)
</span></span></pre></div>
<a id="trunkSourceWebCoredomCharacterDatacpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/CharacterData.cpp (177924 => 177925)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/CharacterData.cpp        2015-01-05 21:11:44 UTC (rev 177924)
+++ trunk/Source/WebCore/dom/CharacterData.cpp        2015-01-05 21:30:33 UTC (rev 177925)
</span><span class="lines">@@ -227,9 +227,8 @@
</span><span class="cx">             dispatchScopedEvent(MutationEvent::create(eventNames().DOMCharacterDataModifiedEvent, true, 0, oldData, m_data));
</span><span class="cx">         dispatchSubtreeModifiedEvent();
</span><span class="cx">     }
</span><del>-#if ENABLE(INSPECTOR)
-    InspectorInstrumentation::characterDataModified(&amp;document(), this);
-#endif
</del><ins>+
+    InspectorInstrumentation::characterDataModified(document(), *this);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void CharacterData::checkCharDataOperation(unsigned offset, ExceptionCode&amp; ec)
</span></span></pre></div>
<a id="trunkSourceWebCoredomContainerNodecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/ContainerNode.cpp (177924 => 177925)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/ContainerNode.cpp        2015-01-05 21:11:44 UTC (rev 177924)
+++ trunk/Source/WebCore/dom/ContainerNode.cpp        2015-01-05 21:30:33 UTC (rev 177925)
</span><span class="lines">@@ -276,7 +276,7 @@
</span><span class="cx">     if (!checkAcceptChildGuaranteedNodeTypes(this, newChild.get(), ec))
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    InspectorInstrumentation::willInsertDOMNode(&amp;document(), this);
</del><ins>+    InspectorInstrumentation::willInsertDOMNode(document(), *this);
</ins><span class="cx"> 
</span><span class="cx">     ChildListMutationScope mutation(*this);
</span><span class="cx">     for (auto it = targets.begin(), end = targets.end(); it != end; ++it) {
</span><span class="lines">@@ -432,7 +432,7 @@
</span><span class="cx">     if (!checkReplaceChild(this, newChild.get(), oldChild, ec))
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    InspectorInstrumentation::willInsertDOMNode(&amp;document(), this);
</del><ins>+    InspectorInstrumentation::willInsertDOMNode(document(), *this);
</ins><span class="cx"> 
</span><span class="cx">     // Add the new child(ren)
</span><span class="cx">     for (auto it = targets.begin(), end = targets.end(); it != end; ++it) {
</span><span class="lines">@@ -577,7 +577,7 @@
</span><span class="cx"> 
</span><span class="cx"> void ContainerNode::removeBetween(Node* previousChild, Node* nextChild, Node&amp; oldChild)
</span><span class="cx"> {
</span><del>-    InspectorInstrumentation::didRemoveDOMNode(&amp;oldChild.document(), &amp;oldChild);
</del><ins>+    InspectorInstrumentation::didRemoveDOMNode(oldChild.document(), oldChild);
</ins><span class="cx"> 
</span><span class="cx">     NoEventDispatchAssertion assertNoEventDispatch;
</span><span class="cx"> 
</span><span class="lines">@@ -699,7 +699,7 @@
</span><span class="cx">     if (!checkAcceptChildGuaranteedNodeTypes(this, newChild.get(), ec))
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    InspectorInstrumentation::willInsertDOMNode(&amp;document(), this);
</del><ins>+    InspectorInstrumentation::willInsertDOMNode(document(), *this);
</ins><span class="cx"> 
</span><span class="cx">     // Now actually add the child(ren)
</span><span class="cx">     ChildListMutationScope mutation(*this);
</span><span class="lines">@@ -817,14 +817,14 @@
</span><span class="cx"> static void dispatchChildRemovalEvents(Node&amp; child)
</span><span class="cx"> {
</span><span class="cx">     if (child.isInShadowTree()) {
</span><del>-        InspectorInstrumentation::willRemoveDOMNode(&amp;child.document(), &amp;child);
</del><ins>+        InspectorInstrumentation::willRemoveDOMNode(child.document(), child);
</ins><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     ASSERT(!NoEventDispatchAssertion::isEventDispatchForbidden());
</span><span class="cx"> 
</span><span class="cx">     willCreatePossiblyOrphanedTreeByRemoval(&amp;child);
</span><del>-    InspectorInstrumentation::willRemoveDOMNode(&amp;child.document(), &amp;child);
</del><ins>+    InspectorInstrumentation::willRemoveDOMNode(child.document(), child);
</ins><span class="cx"> 
</span><span class="cx">     RefPtr&lt;Node&gt; c = &amp;child;
</span><span class="cx">     Ref&lt;Document&gt; document(child.document());
</span></span></pre></div>
<a id="trunkSourceWebCoredomContainerNodeAlgorithmsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/ContainerNodeAlgorithms.h (177924 => 177925)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/ContainerNodeAlgorithms.h        2015-01-05 21:11:44 UTC (rev 177924)
+++ trunk/Source/WebCore/dom/ContainerNodeAlgorithms.h        2015-01-05 21:30:33 UTC (rev 177925)
</span><span class="lines">@@ -217,9 +217,7 @@
</span><span class="cx"> {
</span><span class="cx">     ASSERT(!NoEventDispatchAssertion::isEventDispatchForbidden());
</span><span class="cx"> 
</span><del>-#if ENABLE(INSPECTOR)
-    InspectorInstrumentation::didInsertDOMNode(&amp;node.document(), &amp;node);
-#endif
</del><ins>+    InspectorInstrumentation::didInsertDOMNode(node.document(), node);
</ins><span class="cx"> 
</span><span class="cx">     Ref&lt;Document&gt; protectDocument(node.document());
</span><span class="cx">     Ref&lt;Node&gt; protectNode(node);
</span></span></pre></div>
<a id="trunkSourceWebCoredomDocumentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Document.cpp (177924 => 177925)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Document.cpp        2015-01-05 21:11:44 UTC (rev 177924)
+++ trunk/Source/WebCore/dom/Document.cpp        2015-01-05 21:30:33 UTC (rev 177925)
</span><span class="lines">@@ -1697,7 +1697,7 @@
</span><span class="cx">     
</span><span class="cx">     m_styleRecalcTimer.startOneShot(0);
</span><span class="cx"> 
</span><del>-    InspectorInstrumentation::didScheduleStyleRecalculation(this);
</del><ins>+    InspectorInstrumentation::didScheduleStyleRecalculation(*this);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void Document::unscheduleStyleRecalc()
</span><span class="lines">@@ -1750,7 +1750,7 @@
</span><span class="cx"> 
</span><span class="cx">     m_styleSheetCollection.flushPendingUpdates();
</span><span class="cx"> 
</span><del>-    InspectorInstrumentationCookie cookie = InspectorInstrumentation::willRecalculateStyle(this);
</del><ins>+    InspectorInstrumentationCookie cookie = InspectorInstrumentation::willRecalculateStyle(*this);
</ins><span class="cx"> 
</span><span class="cx">     if (m_elementSheet &amp;&amp; m_elementSheet-&gt;contents().usesRemUnits())
</span><span class="cx">         m_styleSheetCollection.setUsesRemUnit(true);
</span><span class="lines">@@ -4596,7 +4596,7 @@
</span><span class="cx"> 
</span><span class="cx">         f-&gt;loader().finishedParsing();
</span><span class="cx"> 
</span><del>-        InspectorInstrumentation::domContentLoadedEventFired(f.get());
</del><ins>+        InspectorInstrumentation::domContentLoadedEventFired(*f);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     // Schedule dropping of the DocumentSharedObjectPool. We keep it alive for a while after parsing finishes
</span></span></pre></div>
<a id="trunkSourceWebCoredomElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Element.cpp (177924 => 177925)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Element.cpp        2015-01-05 21:11:44 UTC (rev 177924)
+++ trunk/Source/WebCore/dom/Element.cpp        2015-01-05 21:30:33 UTC (rev 177925)
</span><span class="lines">@@ -1474,7 +1474,7 @@
</span><span class="cx"> 
</span><span class="cx">     setNeedsStyleRecalc(ReconstructRenderTree);
</span><span class="cx"> 
</span><del>-    InspectorInstrumentation::didPushShadowRoot(this, &amp;shadowRoot);
</del><ins>+    InspectorInstrumentation::didPushShadowRoot(*this, shadowRoot);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void Element::removeShadowRoot()
</span><span class="lines">@@ -1482,7 +1482,7 @@
</span><span class="cx">     RefPtr&lt;ShadowRoot&gt; oldRoot = shadowRoot();
</span><span class="cx">     if (!oldRoot)
</span><span class="cx">         return;
</span><del>-    InspectorInstrumentation::willPopShadowRoot(this, oldRoot.get());
</del><ins>+    InspectorInstrumentation::willPopShadowRoot(*this, *oldRoot);
</ins><span class="cx">     document().removeFocusedNodeOfSubtree(oldRoot.get());
</span><span class="cx"> 
</span><span class="cx">     ASSERT(!oldRoot-&gt;renderer());
</span><span class="lines">@@ -2810,29 +2810,27 @@
</span><span class="cx">     if (std::unique_ptr&lt;MutationObserverInterestGroup&gt; recipients = MutationObserverInterestGroup::createForAttributesMutation(*this, name))
</span><span class="cx">         recipients-&gt;enqueueMutationRecord(MutationRecord::createAttributes(*this, name, oldValue));
</span><span class="cx"> 
</span><del>-#if ENABLE(INSPECTOR)
-    InspectorInstrumentation::willModifyDOMAttr(&amp;document(), this, oldValue, newValue);
-#endif
</del><ins>+    InspectorInstrumentation::willModifyDOMAttr(document(), *this, oldValue, newValue);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void Element::didAddAttribute(const QualifiedName&amp; name, const AtomicString&amp; value)
</span><span class="cx"> {
</span><span class="cx">     attributeChanged(name, nullAtom, value);
</span><del>-    InspectorInstrumentation::didModifyDOMAttr(&amp;document(), this, name.localName(), value);
</del><ins>+    InspectorInstrumentation::didModifyDOMAttr(document(), *this, name.localName(), value);
</ins><span class="cx">     dispatchSubtreeModifiedEvent();
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void Element::didModifyAttribute(const QualifiedName&amp; name, const AtomicString&amp; oldValue, const AtomicString&amp; newValue)
</span><span class="cx"> {
</span><span class="cx">     attributeChanged(name, oldValue, newValue);
</span><del>-    InspectorInstrumentation::didModifyDOMAttr(&amp;document(), this, name.localName(), newValue);
</del><ins>+    InspectorInstrumentation::didModifyDOMAttr(document(), *this, name.localName(), newValue);
</ins><span class="cx">     // Do not dispatch a DOMSubtreeModified event here; see bug 81141.
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void Element::didRemoveAttribute(const QualifiedName&amp; name, const AtomicString&amp; oldValue)
</span><span class="cx"> {
</span><span class="cx">     attributeChanged(name, oldValue, nullAtom);
</span><del>-    InspectorInstrumentation::didRemoveDOMAttr(&amp;document(), this, name.localName());
</del><ins>+    InspectorInstrumentation::didRemoveDOMAttr(document(), *this, name.localName());
</ins><span class="cx">     dispatchSubtreeModifiedEvent();
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoredomEventTargetcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/EventTarget.cpp (177924 => 177925)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/EventTarget.cpp        2015-01-05 21:11:44 UTC (rev 177924)
+++ trunk/Source/WebCore/dom/EventTarget.cpp        2015-01-05 21:30:33 UTC (rev 177925)
</span><span class="lines">@@ -234,7 +234,7 @@
</span><span class="cx">     InspectorInstrumentationCookie willDispatchEventCookie;
</span><span class="cx">     if (is&lt;Document&gt;(context)) {
</span><span class="cx">         document = downcast&lt;Document&gt;(context);
</span><del>-        willDispatchEventCookie = InspectorInstrumentation::willDispatchEvent(document, *event, size &gt; 0);
</del><ins>+        willDispatchEventCookie = InspectorInstrumentation::willDispatchEvent(*document, *event, size &gt; 0);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     for (; i &lt; size; ++i) {
</span><span class="lines">@@ -249,7 +249,7 @@
</span><span class="cx">         if (event-&gt;immediatePropagationStopped())
</span><span class="cx">             break;
</span><span class="cx"> 
</span><del>-        InspectorInstrumentationCookie cookie = InspectorInstrumentation::willHandleEvent(context, event);
</del><ins>+        InspectorInstrumentationCookie cookie = InspectorInstrumentation::willHandleEvent(context, *event);
</ins><span class="cx">         // To match Mozilla, the AT_TARGET phase fires both capturing and bubbling
</span><span class="cx">         // event listeners, even though that violates some versions of the DOM spec.
</span><span class="cx">         registeredListener.listener-&gt;handleEvent(context, event);
</span></span></pre></div>
<a id="trunkSourceWebCoredomNamedFlowCollectioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/NamedFlowCollection.cpp (177924 => 177925)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/NamedFlowCollection.cpp        2015-01-05 21:11:44 UTC (rev 177924)
+++ trunk/Source/WebCore/dom/NamedFlowCollection.cpp        2015-01-05 21:30:33 UTC (rev 177925)
</span><span class="lines">@@ -79,7 +79,7 @@
</span><span class="cx">     RefPtr&lt;WebKitNamedFlow&gt; newFlow = WebKitNamedFlow::create(this, flowName);
</span><span class="cx">     m_namedFlows.add(newFlow.get());
</span><span class="cx"> 
</span><del>-    InspectorInstrumentation::didCreateNamedFlow(document(), newFlow.get());
</del><ins>+    InspectorInstrumentation::didCreateNamedFlow(document(), *newFlow);
</ins><span class="cx"> 
</span><span class="cx">     return newFlow.releaseNonNull();
</span><span class="cx"> }
</span><span class="lines">@@ -93,7 +93,7 @@
</span><span class="cx">     ASSERT(namedFlow-&gt;flowState() == WebKitNamedFlow::FlowStateNull);
</span><span class="cx">     ASSERT(m_namedFlows.contains(namedFlow));
</span><span class="cx"> 
</span><del>-    InspectorInstrumentation::willRemoveNamedFlow(document(), namedFlow);
</del><ins>+    InspectorInstrumentation::willRemoveNamedFlow(document(), *namedFlow);
</ins><span class="cx"> 
</span><span class="cx">     m_namedFlows.remove(namedFlow);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoredomPseudoElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/PseudoElement.cpp (177924 => 177925)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/PseudoElement.cpp        2015-01-05 21:11:44 UTC (rev 177924)
+++ trunk/Source/WebCore/dom/PseudoElement.cpp        2015-01-05 21:30:33 UTC (rev 177925)
</span><span class="lines">@@ -67,7 +67,7 @@
</span><span class="cx"> PseudoElement::~PseudoElement()
</span><span class="cx"> {
</span><span class="cx">     ASSERT(!m_hostElement);
</span><del>-    InspectorInstrumentation::pseudoElementDestroyed(document().page(), this);
</del><ins>+    InspectorInstrumentation::pseudoElementDestroyed(document().page(), *this);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> RefPtr&lt;RenderStyle&gt; PseudoElement::customStyleForRenderer(RenderStyle&amp; parentStyle)
</span></span></pre></div>
<a id="trunkSourceWebCoredomStyledElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/StyledElement.cpp (177924 => 177925)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/StyledElement.cpp        2015-01-05 21:11:44 UTC (rev 177924)
+++ trunk/Source/WebCore/dom/StyledElement.cpp        2015-01-05 21:30:33 UTC (rev 177925)
</span><span class="lines">@@ -204,7 +204,7 @@
</span><span class="cx">     elementData()-&gt;setStyleAttributeIsDirty(false);
</span><span class="cx"> 
</span><span class="cx">     setNeedsStyleRecalc(InlineStyleChange);
</span><del>-    InspectorInstrumentation::didInvalidateStyleAttr(&amp;document(), this);
</del><ins>+    InspectorInstrumentation::didInvalidateStyleAttr(document(), *this);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void StyledElement::inlineStyleChanged()
</span><span class="lines">@@ -212,7 +212,7 @@
</span><span class="cx">     setNeedsStyleRecalc(InlineStyleChange);
</span><span class="cx">     ASSERT(elementData());
</span><span class="cx">     elementData()-&gt;setStyleAttributeIsDirty(true);
</span><del>-    InspectorInstrumentation::didInvalidateStyleAttr(&amp;document(), this);
</del><ins>+    InspectorInstrumentation::didInvalidateStyleAttr(document(), *this);
</ins><span class="cx"> }
</span><span class="cx">     
</span><span class="cx"> bool StyledElement::setInlineStyleProperty(CSSPropertyID propertyID, CSSValueID identifier, bool important)
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorInspectorConsoleInstrumentationh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/InspectorConsoleInstrumentation.h (177924 => 177925)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/InspectorConsoleInstrumentation.h        2015-01-05 21:11:44 UTC (rev 177924)
+++ trunk/Source/WebCore/inspector/InspectorConsoleInstrumentation.h        2015-01-05 21:30:33 UTC (rev 177925)
</span><span class="lines">@@ -39,11 +39,11 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-inline void InspectorInstrumentation::addMessageToConsole(Page* page, MessageSource source, MessageType type, MessageLevel level, const String&amp; message, PassRefPtr&lt;Inspector::ScriptCallStack&gt; callStack, unsigned long requestIdentifier)
</del><ins>+inline void InspectorInstrumentation::addMessageToConsole(Page&amp; page, MessageSource source, MessageType type, MessageLevel level, const String&amp; message, PassRefPtr&lt;Inspector::ScriptCallStack&gt; callStack, unsigned long requestIdentifier)
</ins><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForPage(page))
</span><del>-        addMessageToConsoleImpl(instrumentingAgents, source, type, level, message, callStack, requestIdentifier);
</del><ins>+        addMessageToConsoleImpl(*instrumentingAgents, source, type, level, message, callStack, requestIdentifier);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(page);
</span><span class="cx">     UNUSED_PARAM(source);
</span><span class="lines">@@ -55,11 +55,11 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline void InspectorInstrumentation::addMessageToConsole(Page* page, MessageSource source, MessageType type, MessageLevel level, const String&amp; message, JSC::ExecState* state, PassRefPtr&lt;Inspector::ScriptArguments&gt; arguments, unsigned long requestIdentifier)
</del><ins>+inline void InspectorInstrumentation::addMessageToConsole(Page&amp; page, MessageSource source, MessageType type, MessageLevel level, const String&amp; message, JSC::ExecState* state, PassRefPtr&lt;Inspector::ScriptArguments&gt; arguments, unsigned long requestIdentifier)
</ins><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForPage(page))
</span><del>-        addMessageToConsoleImpl(instrumentingAgents, source, type, level, message, state, arguments, requestIdentifier);
</del><ins>+        addMessageToConsoleImpl(*instrumentingAgents, source, type, level, message, state, arguments, requestIdentifier);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(page);
</span><span class="cx">     UNUSED_PARAM(source);
</span><span class="lines">@@ -72,11 +72,11 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline void InspectorInstrumentation::addMessageToConsole(Page* page, MessageSource source, MessageType type, MessageLevel level, const String&amp; message, const String&amp; scriptID, unsigned lineNumber, unsigned columnNumber, JSC::ExecState* state, unsigned long requestIdentifier)
</del><ins>+inline void InspectorInstrumentation::addMessageToConsole(Page&amp; page, MessageSource source, MessageType type, MessageLevel level, const String&amp; message, const String&amp; scriptID, unsigned lineNumber, unsigned columnNumber, JSC::ExecState* state, unsigned long requestIdentifier)
</ins><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForPage(page))
</span><del>-        addMessageToConsoleImpl(instrumentingAgents, source, type, level, message, scriptID, lineNumber, columnNumber, state, requestIdentifier);
</del><ins>+        addMessageToConsoleImpl(*instrumentingAgents, source, type, level, message, scriptID, lineNumber, columnNumber, state, requestIdentifier);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(page);
</span><span class="cx">     UNUSED_PARAM(source);
</span><span class="lines">@@ -95,7 +95,7 @@
</span><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForWorkerGlobalScope(workerGlobalScope))
</span><del>-        addMessageToConsoleImpl(instrumentingAgents, source, type, level, message, callStack, requestIdentifier);
</del><ins>+        addMessageToConsoleImpl(*instrumentingAgents, source, type, level, message, callStack, requestIdentifier);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(workerGlobalScope);
</span><span class="cx">     UNUSED_PARAM(source);
</span><span class="lines">@@ -111,7 +111,7 @@
</span><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForWorkerGlobalScope(workerGlobalScope))
</span><del>-        addMessageToConsoleImpl(instrumentingAgents, source, type, level, message, scriptID, lineNumber, columnNumber, state, requestIdentifier);
</del><ins>+        addMessageToConsoleImpl(*instrumentingAgents, source, type, level, message, scriptID, lineNumber, columnNumber, state, requestIdentifier);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(workerGlobalScope);
</span><span class="cx">     UNUSED_PARAM(source);
</span><span class="lines">@@ -126,11 +126,11 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline void InspectorInstrumentation::consoleCount(Page* page, JSC::ExecState* state, PassRefPtr&lt;Inspector::ScriptArguments&gt; arguments)
</del><ins>+inline void InspectorInstrumentation::consoleCount(Page&amp; page, JSC::ExecState* state, PassRefPtr&lt;Inspector::ScriptArguments&gt; arguments)
</ins><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForPage(page))
</span><del>-        consoleCountImpl(instrumentingAgents, state, arguments);
</del><ins>+        consoleCountImpl(*instrumentingAgents, state, arguments);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(page);
</span><span class="cx">     UNUSED_PARAM(state);
</span><span class="lines">@@ -138,22 +138,22 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline void InspectorInstrumentation::startConsoleTiming(Frame* frame, const String&amp; title)
</del><ins>+inline void InspectorInstrumentation::startConsoleTiming(Frame&amp; frame, const String&amp; title)
</ins><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForFrame(frame))
</span><del>-        startConsoleTimingImpl(instrumentingAgents, frame, title);
</del><ins>+        startConsoleTimingImpl(*instrumentingAgents, frame, title);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(frame);
</span><span class="cx">     UNUSED_PARAM(title);
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline void InspectorInstrumentation::stopConsoleTiming(Frame* frame, const String&amp; title, PassRefPtr&lt;Inspector::ScriptCallStack&gt; stack)
</del><ins>+inline void InspectorInstrumentation::stopConsoleTiming(Frame&amp; frame, const String&amp; title, PassRefPtr&lt;Inspector::ScriptCallStack&gt; stack)
</ins><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForFrame(frame))
</span><del>-        stopConsoleTimingImpl(instrumentingAgents, frame, title, stack);
</del><ins>+        stopConsoleTimingImpl(*instrumentingAgents, frame, title, stack);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(frame);
</span><span class="cx">     UNUSED_PARAM(title);
</span><span class="lines">@@ -161,23 +161,23 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline void InspectorInstrumentation::consoleTimeStamp(Frame* frame, PassRefPtr&lt;Inspector::ScriptArguments&gt; arguments)
</del><ins>+inline void InspectorInstrumentation::consoleTimeStamp(Frame&amp; frame, PassRefPtr&lt;Inspector::ScriptArguments&gt; arguments)
</ins><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     FAST_RETURN_IF_NO_FRONTENDS(void());
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForFrame(frame))
</span><del>-        consoleTimeStampImpl(instrumentingAgents, frame, arguments);
</del><ins>+        consoleTimeStampImpl(*instrumentingAgents, frame, arguments);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(frame);
</span><span class="cx">     UNUSED_PARAM(arguments);
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline void InspectorInstrumentation::startProfiling(Page* page, JSC::ExecState* exec, const String &amp;title)
</del><ins>+inline void InspectorInstrumentation::startProfiling(Page&amp; page, JSC::ExecState* exec, const String &amp;title)
</ins><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForPage(page))
</span><del>-        startProfilingImpl(instrumentingAgents, exec, title);
</del><ins>+        startProfilingImpl(*instrumentingAgents, exec, title);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(page);
</span><span class="cx">     UNUSED_PARAM(exec);
</span><span class="lines">@@ -185,11 +185,11 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline PassRefPtr&lt;JSC::Profile&gt; InspectorInstrumentation::stopProfiling(Page* page, JSC::ExecState* exec, const String &amp;title)
</del><ins>+inline PassRefPtr&lt;JSC::Profile&gt; InspectorInstrumentation::stopProfiling(Page&amp; page, JSC::ExecState* exec, const String &amp;title)
</ins><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForPage(page))
</span><del>-        return stopProfilingImpl(instrumentingAgents, exec, title);
</del><ins>+        return stopProfilingImpl(*instrumentingAgents, exec, title);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(page);
</span><span class="cx">     UNUSED_PARAM(exec);
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorInspectorControllercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/InspectorController.cpp (177924 => 177925)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/InspectorController.cpp        2015-01-05 21:11:44 UTC (rev 177924)
+++ trunk/Source/WebCore/inspector/InspectorController.cpp        2015-01-05 21:30:33 UTC (rev 177925)
</span><span class="lines">@@ -224,17 +224,17 @@
</span><span class="cx">     return m_inspectorFrontendClient;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorController::didClearWindowObjectInWorld(Frame* frame, DOMWrapperWorld&amp; world)
</del><ins>+void InspectorController::didClearWindowObjectInWorld(Frame&amp; frame, DOMWrapperWorld&amp; world)
</ins><span class="cx"> {
</span><span class="cx">     if (&amp;world != &amp;mainThreadNormalWorld())
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    if (frame-&gt;isMainFrame())
</del><ins>+    if (frame.isMainFrame())
</ins><span class="cx">         m_injectedScriptManager-&gt;discardInjectedScripts();
</span><span class="cx"> 
</span><span class="cx">     // If the page is supposed to serve as InspectorFrontend notify inspector frontend
</span><span class="cx">     // client that it's cleared so that the client can expose inspector bindings.
</span><del>-    if (m_inspectorFrontendClient &amp;&amp; frame-&gt;isMainFrame())
</del><ins>+    if (m_inspectorFrontendClient &amp;&amp; frame.isMainFrame())
</ins><span class="cx">         m_inspectorFrontendClient-&gt;windowObjectCleared();
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -252,7 +252,7 @@
</span><span class="cx"> 
</span><span class="cx">     m_agents.didCreateFrontendAndBackend(frontendChannel, m_inspectorBackendDispatcher.get());
</span><span class="cx"> 
</span><del>-    InspectorInstrumentation::registerInstrumentingAgents(m_instrumentingAgents.get());
</del><ins>+    InspectorInstrumentation::registerInstrumentingAgents(*m_instrumentingAgents);
</ins><span class="cx">     InspectorInstrumentation::frontendCreated();
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(REMOTE_INSPECTOR)
</span><span class="lines">@@ -277,7 +277,7 @@
</span><span class="cx">     // Release overlay page resources.
</span><span class="cx">     m_overlay-&gt;freePage();
</span><span class="cx">     InspectorInstrumentation::frontendDeleted();
</span><del>-    InspectorInstrumentation::unregisterInstrumentingAgents(m_instrumentingAgents.get());
</del><ins>+    InspectorInstrumentation::unregisterInstrumentingAgents(*m_instrumentingAgents);
</ins><span class="cx"> 
</span><span class="cx"> #if ENABLE(REMOTE_INSPECTOR)
</span><span class="cx">     if (!m_hasRemoteFrontend)
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorInspectorControllerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/InspectorController.h (177924 => 177925)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/InspectorController.h        2015-01-05 21:11:44 UTC (rev 177924)
+++ trunk/Source/WebCore/inspector/InspectorController.h        2015-01-05 21:30:33 UTC (rev 177925)
</span><span class="lines">@@ -59,6 +59,7 @@
</span><span class="cx"> class InspectorDOMAgent;
</span><span class="cx"> class InspectorDOMDebuggerAgent;
</span><span class="cx"> class InspectorFrontendClient;
</span><ins>+class InspectorInstrumentation;
</ins><span class="cx"> class InspectorPageAgent;
</span><span class="cx"> class InspectorResourceAgent;
</span><span class="cx"> class InspectorTimelineAgent;
</span><span class="lines">@@ -85,7 +86,7 @@
</span><span class="cx"> 
</span><span class="cx">     WEBCORE_EXPORT void setInspectorFrontendClient(InspectorFrontendClient*);
</span><span class="cx">     bool hasInspectorFrontendClient() const;
</span><del>-    void didClearWindowObjectInWorld(Frame*, DOMWrapperWorld&amp;);
</del><ins>+    void didClearWindowObjectInWorld(Frame&amp;, DOMWrapperWorld&amp;);
</ins><span class="cx"> 
</span><span class="cx">     WEBCORE_EXPORT void dispatchMessageFromFrontend(const String&amp; message);
</span><span class="cx"> 
</span><span class="lines">@@ -133,7 +134,7 @@
</span><span class="cx">     virtual PassRefPtr&lt;WTF::Stopwatch&gt; executionStopwatch() override;
</span><span class="cx"> 
</span><span class="cx"> private:
</span><del>-    friend InstrumentingAgents* instrumentationForPage(Page*);
</del><ins>+    friend class InspectorInstrumentation;
</ins><span class="cx"> 
</span><span class="cx">     RefPtr&lt;InstrumentingAgents&gt; m_instrumentingAgents;
</span><span class="cx">     std::unique_ptr&lt;WebInjectedScriptManager&gt; m_injectedScriptManager;
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorInspectorDatabaseInstrumentationh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/InspectorDatabaseInstrumentation.h (177924 => 177925)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/InspectorDatabaseInstrumentation.h        2015-01-05 21:11:44 UTC (rev 177924)
+++ trunk/Source/WebCore/inspector/InspectorDatabaseInstrumentation.h        2015-01-05 21:30:33 UTC (rev 177925)
</span><span class="lines">@@ -42,7 +42,7 @@
</span><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForContext(context))
</span><del>-        didOpenDatabaseImpl(instrumentingAgents, database, domain, name, version);
</del><ins>+        didOpenDatabaseImpl(*instrumentingAgents, database, domain, name, version);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(context);
</span><span class="cx">     UNUSED_PARAM(database);
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorInspectorInstrumentationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/InspectorInstrumentation.cpp (177924 => 177925)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/InspectorInstrumentation.cpp        2015-01-05 21:11:44 UTC (rev 177924)
+++ trunk/Source/WebCore/inspector/InspectorInstrumentation.cpp        2015-01-05 21:30:33 UTC (rev 177925)
</span><span class="lines">@@ -43,6 +43,7 @@
</span><span class="cx"> #include &quot;Event.h&quot;
</span><span class="cx"> #include &quot;EventDispatcher.h&quot;
</span><span class="cx"> #include &quot;InspectorApplicationCacheAgent.h&quot;
</span><ins>+#include &quot;InspectorController.h&quot;
</ins><span class="cx"> #include &quot;InspectorCSSAgent.h&quot;
</span><span class="cx"> #include &quot;InspectorDOMAgent.h&quot;
</span><span class="cx"> #include &quot;InspectorDOMDebuggerAgent.h&quot;
</span><span class="lines">@@ -64,6 +65,7 @@
</span><span class="cx"> #include &quot;StyleRule.h&quot;
</span><span class="cx"> #include &quot;WebConsoleAgent.h&quot;
</span><span class="cx"> #include &quot;WorkerGlobalScope.h&quot;
</span><ins>+#include &quot;WorkerInspectorController.h&quot;
</ins><span class="cx"> #include &quot;WorkerRuntimeAgent.h&quot;
</span><span class="cx"> #include &quot;WorkerThread.h&quot;
</span><span class="cx"> #include &quot;XMLHttpRequest.h&quot;
</span><span class="lines">@@ -92,7 +94,7 @@
</span><span class="cx"> static const char* const timerFiredEventName = &quot;timerFired&quot;;
</span><span class="cx"> 
</span><span class="cx"> namespace {
</span><del>-static HashSet&lt;InstrumentingAgents*&gt;* instrumentingAgentsSet = nullptr;
</del><ins>+static HashSet&lt;InstrumentingAgents*&gt;* s_instrumentingAgentsSet = nullptr;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> int InspectorInstrumentation::s_frontendCounter = 0;
</span><span class="lines">@@ -105,207 +107,207 @@
</span><span class="cx">     return frame;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorInstrumentation::didClearWindowObjectInWorldImpl(InstrumentingAgents* instrumentingAgents, Frame* frame, DOMWrapperWorld&amp; world)
</del><ins>+void InspectorInstrumentation::didClearWindowObjectInWorldImpl(InstrumentingAgents&amp; instrumentingAgents, Frame&amp; frame, DOMWrapperWorld&amp; world)
</ins><span class="cx"> {
</span><del>-    InspectorPageAgent* pageAgent = instrumentingAgents-&gt;inspectorPageAgent();
</del><ins>+    InspectorPageAgent* pageAgent = instrumentingAgents.inspectorPageAgent();
</ins><span class="cx">     if (pageAgent)
</span><del>-        pageAgent-&gt;didClearWindowObjectInWorld(frame, world);
-    if (PageDebuggerAgent* debuggerAgent = instrumentingAgents-&gt;pageDebuggerAgent()) {
-        if (pageAgent &amp;&amp; &amp;world == &amp;mainThreadNormalWorld() &amp;&amp; frame == pageAgent-&gt;mainFrame())
</del><ins>+        pageAgent-&gt;didClearWindowObjectInWorld(&amp;frame, world);
+    if (PageDebuggerAgent* debuggerAgent = instrumentingAgents.pageDebuggerAgent()) {
+        if (pageAgent &amp;&amp; &amp;world == &amp;mainThreadNormalWorld() &amp;&amp; &amp;frame == pageAgent-&gt;mainFrame())
</ins><span class="cx">             debuggerAgent-&gt;didClearMainFrameWindowObject();
</span><span class="cx">     }
</span><del>-    if (PageRuntimeAgent* pageRuntimeAgent = instrumentingAgents-&gt;pageRuntimeAgent()) {
</del><ins>+    if (PageRuntimeAgent* pageRuntimeAgent = instrumentingAgents.pageRuntimeAgent()) {
</ins><span class="cx">         if (&amp;world == &amp;mainThreadNormalWorld())
</span><del>-            pageRuntimeAgent-&gt;didCreateMainWorldContext(frame);
</del><ins>+            pageRuntimeAgent-&gt;didCreateMainWorldContext(&amp;frame);
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool InspectorInstrumentation::isDebuggerPausedImpl(InstrumentingAgents* instrumentingAgents)
</del><ins>+bool InspectorInstrumentation::isDebuggerPausedImpl(InstrumentingAgents&amp; instrumentingAgents)
</ins><span class="cx"> {
</span><del>-    if (InspectorDebuggerAgent* debuggerAgent = instrumentingAgents-&gt;inspectorDebuggerAgent())
</del><ins>+    if (InspectorDebuggerAgent* debuggerAgent = instrumentingAgents.inspectorDebuggerAgent())
</ins><span class="cx">         return debuggerAgent-&gt;isPaused();
</span><span class="cx">     return false;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorInstrumentation::willInsertDOMNodeImpl(InstrumentingAgents* instrumentingAgents, Node* parent)
</del><ins>+void InspectorInstrumentation::willInsertDOMNodeImpl(InstrumentingAgents&amp; instrumentingAgents, Node&amp; parent)
</ins><span class="cx"> {
</span><del>-    if (InspectorDOMDebuggerAgent* domDebuggerAgent = instrumentingAgents-&gt;inspectorDOMDebuggerAgent())
-        domDebuggerAgent-&gt;willInsertDOMNode(parent);
</del><ins>+    if (InspectorDOMDebuggerAgent* domDebuggerAgent = instrumentingAgents.inspectorDOMDebuggerAgent())
+        domDebuggerAgent-&gt;willInsertDOMNode(&amp;parent);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorInstrumentation::didInsertDOMNodeImpl(InstrumentingAgents* instrumentingAgents, Node* node)
</del><ins>+void InspectorInstrumentation::didInsertDOMNodeImpl(InstrumentingAgents&amp; instrumentingAgents, Node&amp; node)
</ins><span class="cx"> {
</span><del>-    if (InspectorDOMAgent* domAgent = instrumentingAgents-&gt;inspectorDOMAgent())
-        domAgent-&gt;didInsertDOMNode(node);
-    if (InspectorDOMDebuggerAgent* domDebuggerAgent = instrumentingAgents-&gt;inspectorDOMDebuggerAgent())
-        domDebuggerAgent-&gt;didInsertDOMNode(node);
</del><ins>+    if (InspectorDOMAgent* domAgent = instrumentingAgents.inspectorDOMAgent())
+        domAgent-&gt;didInsertDOMNode(&amp;node);
+    if (InspectorDOMDebuggerAgent* domDebuggerAgent = instrumentingAgents.inspectorDOMDebuggerAgent())
+        domDebuggerAgent-&gt;didInsertDOMNode(&amp;node);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorInstrumentation::willRemoveDOMNodeImpl(InstrumentingAgents* instrumentingAgents, Node* node)
</del><ins>+void InspectorInstrumentation::willRemoveDOMNodeImpl(InstrumentingAgents&amp; instrumentingAgents, Node&amp; node)
</ins><span class="cx"> {
</span><del>-    if (InspectorDOMDebuggerAgent* domDebuggerAgent = instrumentingAgents-&gt;inspectorDOMDebuggerAgent())
-        domDebuggerAgent-&gt;willRemoveDOMNode(node);
</del><ins>+    if (InspectorDOMDebuggerAgent* domDebuggerAgent = instrumentingAgents.inspectorDOMDebuggerAgent())
+        domDebuggerAgent-&gt;willRemoveDOMNode(&amp;node);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorInstrumentation::didRemoveDOMNodeImpl(InstrumentingAgents* instrumentingAgents, Node* node)
</del><ins>+void InspectorInstrumentation::didRemoveDOMNodeImpl(InstrumentingAgents&amp; instrumentingAgents, Node&amp; node)
</ins><span class="cx"> {
</span><del>-    if (InspectorDOMDebuggerAgent* domDebuggerAgent = instrumentingAgents-&gt;inspectorDOMDebuggerAgent())
-        domDebuggerAgent-&gt;didRemoveDOMNode(node);
-    if (InspectorDOMAgent* domAgent = instrumentingAgents-&gt;inspectorDOMAgent())
-        domAgent-&gt;didRemoveDOMNode(node);
</del><ins>+    if (InspectorDOMDebuggerAgent* domDebuggerAgent = instrumentingAgents.inspectorDOMDebuggerAgent())
+        domDebuggerAgent-&gt;didRemoveDOMNode(&amp;node);
+    if (InspectorDOMAgent* domAgent = instrumentingAgents.inspectorDOMAgent())
+        domAgent-&gt;didRemoveDOMNode(&amp;node);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorInstrumentation::willModifyDOMAttrImpl(InstrumentingAgents* instrumentingAgents, Element* element, const AtomicString&amp; oldValue, const AtomicString&amp; newValue)
</del><ins>+void InspectorInstrumentation::willModifyDOMAttrImpl(InstrumentingAgents&amp; instrumentingAgents, Element&amp; element, const AtomicString&amp; oldValue, const AtomicString&amp; newValue)
</ins><span class="cx"> {
</span><del>-    if (InspectorDOMDebuggerAgent* domDebuggerAgent = instrumentingAgents-&gt;inspectorDOMDebuggerAgent())
-        domDebuggerAgent-&gt;willModifyDOMAttr(element);
-    if (InspectorDOMAgent* domAgent = instrumentingAgents-&gt;inspectorDOMAgent())
-        domAgent-&gt;willModifyDOMAttr(element, oldValue, newValue);
</del><ins>+    if (InspectorDOMDebuggerAgent* domDebuggerAgent = instrumentingAgents.inspectorDOMDebuggerAgent())
+        domDebuggerAgent-&gt;willModifyDOMAttr(&amp;element);
+    if (InspectorDOMAgent* domAgent = instrumentingAgents.inspectorDOMAgent())
+        domAgent-&gt;willModifyDOMAttr(&amp;element, oldValue, newValue);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorInstrumentation::didModifyDOMAttrImpl(InstrumentingAgents* instrumentingAgents, Element* element, const AtomicString&amp; name, const AtomicString&amp; value)
</del><ins>+void InspectorInstrumentation::didModifyDOMAttrImpl(InstrumentingAgents&amp; instrumentingAgents, Element&amp; element, const AtomicString&amp; name, const AtomicString&amp; value)
</ins><span class="cx"> {
</span><del>-    if (InspectorDOMAgent* domAgent = instrumentingAgents-&gt;inspectorDOMAgent())
-        domAgent-&gt;didModifyDOMAttr(element, name, value);
</del><ins>+    if (InspectorDOMAgent* domAgent = instrumentingAgents.inspectorDOMAgent())
+        domAgent-&gt;didModifyDOMAttr(&amp;element, name, value);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorInstrumentation::didRemoveDOMAttrImpl(InstrumentingAgents* instrumentingAgents, Element* element, const AtomicString&amp; name)
</del><ins>+void InspectorInstrumentation::didRemoveDOMAttrImpl(InstrumentingAgents&amp; instrumentingAgents, Element&amp; element, const AtomicString&amp; name)
</ins><span class="cx"> {
</span><del>-    if (InspectorDOMAgent* domAgent = instrumentingAgents-&gt;inspectorDOMAgent())
-        domAgent-&gt;didRemoveDOMAttr(element, name);
</del><ins>+    if (InspectorDOMAgent* domAgent = instrumentingAgents.inspectorDOMAgent())
+        domAgent-&gt;didRemoveDOMAttr(&amp;element, name);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorInstrumentation::didInvalidateStyleAttrImpl(InstrumentingAgents* instrumentingAgents, Node* node)
</del><ins>+void InspectorInstrumentation::didInvalidateStyleAttrImpl(InstrumentingAgents&amp; instrumentingAgents, Node&amp; node)
</ins><span class="cx"> {
</span><del>-    if (InspectorDOMAgent* domAgent = instrumentingAgents-&gt;inspectorDOMAgent())
-        domAgent-&gt;didInvalidateStyleAttr(node);
-    if (InspectorDOMDebuggerAgent* domDebuggerAgent = instrumentingAgents-&gt;inspectorDOMDebuggerAgent())
-        domDebuggerAgent-&gt;didInvalidateStyleAttr(node);
</del><ins>+    if (InspectorDOMAgent* domAgent = instrumentingAgents.inspectorDOMAgent())
+        domAgent-&gt;didInvalidateStyleAttr(&amp;node);
+    if (InspectorDOMDebuggerAgent* domDebuggerAgent = instrumentingAgents.inspectorDOMDebuggerAgent())
+        domDebuggerAgent-&gt;didInvalidateStyleAttr(&amp;node);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorInstrumentation::frameWindowDiscardedImpl(InstrumentingAgents* instrumentingAgents, DOMWindow* window)
</del><ins>+void InspectorInstrumentation::frameWindowDiscardedImpl(InstrumentingAgents&amp; instrumentingAgents, DOMWindow* window)
</ins><span class="cx"> {
</span><del>-    if (WebConsoleAgent* consoleAgent = instrumentingAgents-&gt;webConsoleAgent())
</del><ins>+    if (WebConsoleAgent* consoleAgent = instrumentingAgents.webConsoleAgent())
</ins><span class="cx">         consoleAgent-&gt;frameWindowDiscarded(window);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorInstrumentation::mediaQueryResultChangedImpl(InstrumentingAgents* instrumentingAgents)
</del><ins>+void InspectorInstrumentation::mediaQueryResultChangedImpl(InstrumentingAgents&amp; instrumentingAgents)
</ins><span class="cx"> {
</span><del>-    if (InspectorCSSAgent* cssAgent = instrumentingAgents-&gt;inspectorCSSAgent())
</del><ins>+    if (InspectorCSSAgent* cssAgent = instrumentingAgents.inspectorCSSAgent())
</ins><span class="cx">         cssAgent-&gt;mediaQueryResultChanged();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorInstrumentation::didPushShadowRootImpl(InstrumentingAgents* instrumentingAgents, Element* host, ShadowRoot* root)
</del><ins>+void InspectorInstrumentation::didPushShadowRootImpl(InstrumentingAgents&amp; instrumentingAgents, Element&amp; host, ShadowRoot&amp; root)
</ins><span class="cx"> {
</span><del>-    if (InspectorDOMAgent* domAgent = instrumentingAgents-&gt;inspectorDOMAgent())
-        domAgent-&gt;didPushShadowRoot(host, root);
</del><ins>+    if (InspectorDOMAgent* domAgent = instrumentingAgents.inspectorDOMAgent())
+        domAgent-&gt;didPushShadowRoot(&amp;host, &amp;root);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorInstrumentation::willPopShadowRootImpl(InstrumentingAgents* instrumentingAgents, Element* host, ShadowRoot* root)
</del><ins>+void InspectorInstrumentation::willPopShadowRootImpl(InstrumentingAgents&amp; instrumentingAgents, Element&amp; host, ShadowRoot&amp; root)
</ins><span class="cx"> {
</span><del>-    if (InspectorDOMAgent* domAgent = instrumentingAgents-&gt;inspectorDOMAgent())
-        domAgent-&gt;willPopShadowRoot(host, root);
</del><ins>+    if (InspectorDOMAgent* domAgent = instrumentingAgents.inspectorDOMAgent())
+        domAgent-&gt;willPopShadowRoot(&amp;host, &amp;root);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorInstrumentation::didCreateNamedFlowImpl(InstrumentingAgents* instrumentingAgents, Document* document, WebKitNamedFlow* namedFlow)
</del><ins>+void InspectorInstrumentation::didCreateNamedFlowImpl(InstrumentingAgents&amp; instrumentingAgents, Document* document, WebKitNamedFlow&amp; namedFlow)
</ins><span class="cx"> {
</span><del>-    if (InspectorCSSAgent* cssAgent = instrumentingAgents-&gt;inspectorCSSAgent())
-        cssAgent-&gt;didCreateNamedFlow(document, namedFlow);
</del><ins>+    if (InspectorCSSAgent* cssAgent = instrumentingAgents.inspectorCSSAgent())
+        cssAgent-&gt;didCreateNamedFlow(document, &amp;namedFlow);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorInstrumentation::willRemoveNamedFlowImpl(InstrumentingAgents* instrumentingAgents, Document* document, WebKitNamedFlow* namedFlow)
</del><ins>+void InspectorInstrumentation::willRemoveNamedFlowImpl(InstrumentingAgents&amp; instrumentingAgents, Document* document, WebKitNamedFlow&amp; namedFlow)
</ins><span class="cx"> {
</span><del>-    if (InspectorCSSAgent* cssAgent = instrumentingAgents-&gt;inspectorCSSAgent())
-        cssAgent-&gt;willRemoveNamedFlow(document, namedFlow);
</del><ins>+    if (InspectorCSSAgent* cssAgent = instrumentingAgents.inspectorCSSAgent())
+        cssAgent-&gt;willRemoveNamedFlow(document, &amp;namedFlow);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorInstrumentation::didChangeRegionOversetImpl(InstrumentingAgents* instrumentingAgents, Document* document, WebKitNamedFlow* namedFlow)
</del><ins>+void InspectorInstrumentation::didChangeRegionOversetImpl(InstrumentingAgents&amp; instrumentingAgents, Document&amp; document, WebKitNamedFlow&amp; namedFlow)
</ins><span class="cx"> {
</span><del>-    if (InspectorCSSAgent* cssAgent = instrumentingAgents-&gt;inspectorCSSAgent())
-        cssAgent-&gt;didChangeRegionOverset(document, namedFlow);
</del><ins>+    if (InspectorCSSAgent* cssAgent = instrumentingAgents.inspectorCSSAgent())
+        cssAgent-&gt;didChangeRegionOverset(&amp;document, &amp;namedFlow);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorInstrumentation::didRegisterNamedFlowContentElementImpl(InstrumentingAgents* instrumentingAgents, Document* document, WebKitNamedFlow* namedFlow, Node* contentElement, Node* nextContentElement)
</del><ins>+void InspectorInstrumentation::didRegisterNamedFlowContentElementImpl(InstrumentingAgents&amp; instrumentingAgents, Document&amp; document, WebKitNamedFlow&amp; namedFlow, Node&amp; contentElement, Node* nextContentElement)
</ins><span class="cx"> {
</span><del>-    if (InspectorCSSAgent* cssAgent = instrumentingAgents-&gt;inspectorCSSAgent())
-        cssAgent-&gt;didRegisterNamedFlowContentElement(document, namedFlow, contentElement, nextContentElement);
</del><ins>+    if (InspectorCSSAgent* cssAgent = instrumentingAgents.inspectorCSSAgent())
+        cssAgent-&gt;didRegisterNamedFlowContentElement(&amp;document, &amp;namedFlow, &amp;contentElement, nextContentElement);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorInstrumentation::didUnregisterNamedFlowContentElementImpl(InstrumentingAgents* instrumentingAgents, Document* document, WebKitNamedFlow* namedFlow, Node* contentElement)
</del><ins>+void InspectorInstrumentation::didUnregisterNamedFlowContentElementImpl(InstrumentingAgents&amp; instrumentingAgents, Document&amp; document, WebKitNamedFlow&amp; namedFlow, Node&amp; contentElement)
</ins><span class="cx"> {
</span><del>-    if (InspectorCSSAgent* cssAgent = instrumentingAgents-&gt;inspectorCSSAgent())
-        cssAgent-&gt;didUnregisterNamedFlowContentElement(document, namedFlow, contentElement);
</del><ins>+    if (InspectorCSSAgent* cssAgent = instrumentingAgents.inspectorCSSAgent())
+        cssAgent-&gt;didUnregisterNamedFlowContentElement(&amp;document, &amp;namedFlow, &amp;contentElement);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorInstrumentation::mouseDidMoveOverElementImpl(InstrumentingAgents* instrumentingAgents, const HitTestResult&amp; result, unsigned modifierFlags)
</del><ins>+void InspectorInstrumentation::mouseDidMoveOverElementImpl(InstrumentingAgents&amp; instrumentingAgents, const HitTestResult&amp; result, unsigned modifierFlags)
</ins><span class="cx"> {
</span><del>-    if (InspectorDOMAgent* domAgent = instrumentingAgents-&gt;inspectorDOMAgent())
</del><ins>+    if (InspectorDOMAgent* domAgent = instrumentingAgents.inspectorDOMAgent())
</ins><span class="cx">         domAgent-&gt;mouseDidMoveOverElement(result, modifierFlags);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorInstrumentation::didScrollImpl(InstrumentingAgents* instrumentingAgents)
</del><ins>+void InspectorInstrumentation::didScrollImpl(InstrumentingAgents&amp; instrumentingAgents)
</ins><span class="cx"> {
</span><del>-    if (InspectorPageAgent* pageAgent = instrumentingAgents-&gt;inspectorPageAgent())
</del><ins>+    if (InspectorPageAgent* pageAgent = instrumentingAgents.inspectorPageAgent())
</ins><span class="cx">         pageAgent-&gt;didScroll();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool InspectorInstrumentation::handleTouchEventImpl(InstrumentingAgents* instrumentingAgents, Node* node)
</del><ins>+bool InspectorInstrumentation::handleTouchEventImpl(InstrumentingAgents&amp; instrumentingAgents, Node&amp; node)
</ins><span class="cx"> {
</span><del>-    if (InspectorDOMAgent* domAgent = instrumentingAgents-&gt;inspectorDOMAgent())
-        return domAgent-&gt;handleTouchEvent(node);
</del><ins>+    if (InspectorDOMAgent* domAgent = instrumentingAgents.inspectorDOMAgent())
+        return domAgent-&gt;handleTouchEvent(&amp;node);
</ins><span class="cx">     return false;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool InspectorInstrumentation::handleMousePressImpl(InstrumentingAgents* instrumentingAgents)
</del><ins>+bool InspectorInstrumentation::handleMousePressImpl(InstrumentingAgents&amp; instrumentingAgents)
</ins><span class="cx"> {
</span><del>-    if (InspectorDOMAgent* domAgent = instrumentingAgents-&gt;inspectorDOMAgent())
</del><ins>+    if (InspectorDOMAgent* domAgent = instrumentingAgents.inspectorDOMAgent())
</ins><span class="cx">         return domAgent-&gt;handleMousePress();
</span><span class="cx">     return false;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool InspectorInstrumentation::forcePseudoStateImpl(InstrumentingAgents* instrumentingAgents, Element* element, CSSSelector::PseudoClassType pseudoState)
</del><ins>+bool InspectorInstrumentation::forcePseudoStateImpl(InstrumentingAgents&amp; instrumentingAgents, Element&amp; element, CSSSelector::PseudoClassType pseudoState)
</ins><span class="cx"> {
</span><del>-    if (InspectorCSSAgent* cssAgent = instrumentingAgents-&gt;inspectorCSSAgent())
-        return cssAgent-&gt;forcePseudoState(element, pseudoState);
</del><ins>+    if (InspectorCSSAgent* cssAgent = instrumentingAgents.inspectorCSSAgent())
+        return cssAgent-&gt;forcePseudoState(&amp;element, pseudoState);
</ins><span class="cx">     return false;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorInstrumentation::characterDataModifiedImpl(InstrumentingAgents* instrumentingAgents, CharacterData* characterData)
</del><ins>+void InspectorInstrumentation::characterDataModifiedImpl(InstrumentingAgents&amp; instrumentingAgents, CharacterData&amp; characterData)
</ins><span class="cx"> {
</span><del>-    if (InspectorDOMAgent* domAgent = instrumentingAgents-&gt;inspectorDOMAgent())
-        domAgent-&gt;characterDataModified(characterData);
</del><ins>+    if (InspectorDOMAgent* domAgent = instrumentingAgents.inspectorDOMAgent())
+        domAgent-&gt;characterDataModified(&amp;characterData);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorInstrumentation::willSendXMLHttpRequestImpl(InstrumentingAgents* instrumentingAgents, const String&amp; url)
</del><ins>+void InspectorInstrumentation::willSendXMLHttpRequestImpl(InstrumentingAgents&amp; instrumentingAgents, const String&amp; url)
</ins><span class="cx"> {
</span><del>-    if (InspectorDOMDebuggerAgent* domDebuggerAgent = instrumentingAgents-&gt;inspectorDOMDebuggerAgent())
</del><ins>+    if (InspectorDOMDebuggerAgent* domDebuggerAgent = instrumentingAgents.inspectorDOMDebuggerAgent())
</ins><span class="cx">         domDebuggerAgent-&gt;willSendXMLHttpRequest(url);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorInstrumentation::didScheduleResourceRequestImpl(InstrumentingAgents* instrumentingAgents, const String&amp; url, Frame* frame)
</del><ins>+void InspectorInstrumentation::didScheduleResourceRequestImpl(InstrumentingAgents&amp; instrumentingAgents, const String&amp; url, Frame* frame)
</ins><span class="cx"> {
</span><del>-    if (InspectorTimelineAgent* timelineAgent = instrumentingAgents-&gt;inspectorTimelineAgent())
</del><ins>+    if (InspectorTimelineAgent* timelineAgent = instrumentingAgents.inspectorTimelineAgent())
</ins><span class="cx">         timelineAgent-&gt;didScheduleResourceRequest(url, frame);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorInstrumentation::didInstallTimerImpl(InstrumentingAgents* instrumentingAgents, int timerId, int timeout, bool singleShot, ScriptExecutionContext* context)
</del><ins>+void InspectorInstrumentation::didInstallTimerImpl(InstrumentingAgents&amp; instrumentingAgents, int timerId, int timeout, bool singleShot, ScriptExecutionContext* context)
</ins><span class="cx"> {
</span><span class="cx">     pauseOnNativeEventIfNeeded(instrumentingAgents, false, setTimerEventName, true);
</span><del>-    if (InspectorTimelineAgent* timelineAgent = instrumentingAgents-&gt;inspectorTimelineAgent())
</del><ins>+    if (InspectorTimelineAgent* timelineAgent = instrumentingAgents.inspectorTimelineAgent())
</ins><span class="cx">         timelineAgent-&gt;didInstallTimer(timerId, timeout, singleShot, frameForScriptExecutionContext(context));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorInstrumentation::didRemoveTimerImpl(InstrumentingAgents* instrumentingAgents, int timerId, ScriptExecutionContext* context)
</del><ins>+void InspectorInstrumentation::didRemoveTimerImpl(InstrumentingAgents&amp; instrumentingAgents, int timerId, ScriptExecutionContext* context)
</ins><span class="cx"> {
</span><span class="cx">     pauseOnNativeEventIfNeeded(instrumentingAgents, false, clearTimerEventName, true);
</span><del>-    if (InspectorTimelineAgent* timelineAgent = instrumentingAgents-&gt;inspectorTimelineAgent())
</del><ins>+    if (InspectorTimelineAgent* timelineAgent = instrumentingAgents.inspectorTimelineAgent())
</ins><span class="cx">         timelineAgent-&gt;didRemoveTimer(timerId, frameForScriptExecutionContext(context));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-InspectorInstrumentationCookie InspectorInstrumentation::willCallFunctionImpl(InstrumentingAgents* instrumentingAgents, const String&amp; scriptName, int scriptLine, ScriptExecutionContext* context)
</del><ins>+InspectorInstrumentationCookie InspectorInstrumentation::willCallFunctionImpl(InstrumentingAgents&amp; instrumentingAgents, const String&amp; scriptName, int scriptLine, ScriptExecutionContext* context)
</ins><span class="cx"> {
</span><span class="cx">     int timelineAgentId = 0;
</span><del>-    if (InspectorTimelineAgent* timelineAgent = instrumentingAgents-&gt;inspectorTimelineAgent()) {
</del><ins>+    if (InspectorTimelineAgent* timelineAgent = instrumentingAgents.inspectorTimelineAgent()) {
</ins><span class="cx">         timelineAgent-&gt;willCallFunction(scriptName, scriptLine, frameForScriptExecutionContext(context));
</span><span class="cx">         timelineAgentId = timelineAgent-&gt;id();
</span><span class="cx">     }
</span><span class="lines">@@ -318,12 +320,12 @@
</span><span class="cx">         timelineAgent-&gt;didCallFunction(frameForScriptExecutionContext(context));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-InspectorInstrumentationCookie InspectorInstrumentation::willDispatchXHRReadyStateChangeEventImpl(InstrumentingAgents* instrumentingAgents, XMLHttpRequest* request, ScriptExecutionContext* context)
</del><ins>+InspectorInstrumentationCookie InspectorInstrumentation::willDispatchXHRReadyStateChangeEventImpl(InstrumentingAgents&amp; instrumentingAgents, XMLHttpRequest&amp; request, ScriptExecutionContext* context)
</ins><span class="cx"> {
</span><span class="cx">     int timelineAgentId = 0;
</span><del>-    InspectorTimelineAgent* timelineAgent = instrumentingAgents-&gt;inspectorTimelineAgent();
-    if (timelineAgent &amp;&amp; request-&gt;hasEventListeners(eventNames().readystatechangeEvent)) {
-        timelineAgent-&gt;willDispatchXHRReadyStateChangeEvent(request-&gt;url().string(), request-&gt;readyState(), frameForScriptExecutionContext(context));
</del><ins>+    InspectorTimelineAgent* timelineAgent = instrumentingAgents.inspectorTimelineAgent();
+    if (timelineAgent &amp;&amp; request.hasEventListeners(eventNames().readystatechangeEvent)) {
+        timelineAgent-&gt;willDispatchXHRReadyStateChangeEvent(request.url().string(), request.readyState(), frameForScriptExecutionContext(context));
</ins><span class="cx">         timelineAgentId = timelineAgent-&gt;id();
</span><span class="cx">     }
</span><span class="cx">     return InspectorInstrumentationCookie(instrumentingAgents, timelineAgentId);
</span><span class="lines">@@ -335,30 +337,31 @@
</span><span class="cx">         timelineAgent-&gt;didDispatchXHRReadyStateChangeEvent();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-InspectorInstrumentationCookie InspectorInstrumentation::willDispatchEventImpl(InstrumentingAgents* instrumentingAgents, const Event&amp; event, bool hasEventListeners, Document* document)
</del><ins>+InspectorInstrumentationCookie InspectorInstrumentation::willDispatchEventImpl(InstrumentingAgents&amp; instrumentingAgents, Document&amp; document, const Event&amp; event, bool hasEventListeners)
</ins><span class="cx"> {
</span><span class="cx">     int timelineAgentId = 0;
</span><del>-    InspectorTimelineAgent* timelineAgent = instrumentingAgents-&gt;inspectorTimelineAgent();
</del><ins>+    InspectorTimelineAgent* timelineAgent = instrumentingAgents.inspectorTimelineAgent();
</ins><span class="cx">     if (timelineAgent &amp;&amp; hasEventListeners) {
</span><del>-        timelineAgent-&gt;willDispatchEvent(event, document-&gt;frame());
</del><ins>+        timelineAgent-&gt;willDispatchEvent(event, document.frame());
</ins><span class="cx">         timelineAgentId = timelineAgent-&gt;id();
</span><span class="cx">     }
</span><span class="cx"> #if ENABLE(WEB_REPLAY)
</span><del>-    if (InspectorReplayAgent* replayAgent = instrumentingAgents-&gt;inspectorReplayAgent())
-        replayAgent-&gt;willDispatchEvent(event, document-&gt;frame());
</del><ins>+    if (InspectorReplayAgent* replayAgent = instrumentingAgents.inspectorReplayAgent())
+        replayAgent-&gt;willDispatchEvent(event, document.frame());
</ins><span class="cx"> #endif
</span><span class="cx">     return InspectorInstrumentationCookie(instrumentingAgents, timelineAgentId);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-InspectorInstrumentationCookie InspectorInstrumentation::willHandleEventImpl(InstrumentingAgents* instrumentingAgents, Event* event)
</del><ins>+InspectorInstrumentationCookie InspectorInstrumentation::willHandleEventImpl(InstrumentingAgents&amp; instrumentingAgents, const Event&amp; event)
</ins><span class="cx"> {
</span><del>-    pauseOnNativeEventIfNeeded(instrumentingAgents, true, event-&gt;type(), false);
</del><ins>+    pauseOnNativeEventIfNeeded(instrumentingAgents, true, event.type(), false);
</ins><span class="cx">     return InspectorInstrumentationCookie(instrumentingAgents, 0);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void InspectorInstrumentation::didHandleEventImpl(const InspectorInstrumentationCookie&amp; cookie)
</span><span class="cx"> {
</span><del>-    cancelPauseOnNativeEvent(cookie.instrumentingAgents());
</del><ins>+    if (cookie.isValid())
+        cancelPauseOnNativeEvent(*cookie.instrumentingAgents());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void InspectorInstrumentation::didDispatchEventImpl(const InspectorInstrumentationCookie&amp; cookie)
</span><span class="lines">@@ -367,17 +370,17 @@
</span><span class="cx">         timelineAgent-&gt;didDispatchEvent();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-InspectorInstrumentationCookie InspectorInstrumentation::willDispatchEventOnWindowImpl(InstrumentingAgents* instrumentingAgents, const Event&amp; event, DOMWindow* window)
</del><ins>+InspectorInstrumentationCookie InspectorInstrumentation::willDispatchEventOnWindowImpl(InstrumentingAgents&amp; instrumentingAgents, const Event&amp; event, DOMWindow&amp; window)
</ins><span class="cx"> {
</span><span class="cx">     int timelineAgentId = 0;
</span><del>-    InspectorTimelineAgent* timelineAgent = instrumentingAgents-&gt;inspectorTimelineAgent();
-    if (timelineAgent &amp;&amp; window-&gt;hasEventListeners(event.type())) {
-        timelineAgent-&gt;willDispatchEvent(event, window ? window-&gt;frame() : nullptr);
</del><ins>+    InspectorTimelineAgent* timelineAgent = instrumentingAgents.inspectorTimelineAgent();
+    if (timelineAgent &amp;&amp; window.hasEventListeners(event.type())) {
+        timelineAgent-&gt;willDispatchEvent(event, window.frame());
</ins><span class="cx">         timelineAgentId = timelineAgent-&gt;id();
</span><span class="cx">     }
</span><span class="cx"> #if ENABLE(WEB_REPLAY)
</span><del>-    if (InspectorReplayAgent* replayAgent = instrumentingAgents-&gt;inspectorReplayAgent())
-        replayAgent-&gt;willDispatchEvent(event, window ? window-&gt;frame() : nullptr);
</del><ins>+    if (InspectorReplayAgent* replayAgent = instrumentingAgents.inspectorReplayAgent())
+        replayAgent-&gt;willDispatchEvent(event, window.frame());
</ins><span class="cx"> #endif
</span><span class="cx">     return InspectorInstrumentationCookie(instrumentingAgents, timelineAgentId);
</span><span class="cx"> }
</span><span class="lines">@@ -388,40 +391,34 @@
</span><span class="cx">         timelineAgent-&gt;didDispatchEvent();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-InspectorInstrumentationCookie InspectorInstrumentation::willEvaluateScriptImpl(InstrumentingAgents* instrumentingAgents, const String&amp; url, int lineNumber, Frame* frame)
</del><ins>+InspectorInstrumentationCookie InspectorInstrumentation::willEvaluateScriptImpl(InstrumentingAgents&amp; instrumentingAgents, Frame&amp; frame, const String&amp; url, int lineNumber)
</ins><span class="cx"> {
</span><span class="cx">     int timelineAgentId = 0;
</span><del>-    if (InspectorTimelineAgent* timelineAgent = instrumentingAgents-&gt;inspectorTimelineAgent()) {
-        timelineAgent-&gt;willEvaluateScript(url, lineNumber, frame);
</del><ins>+    if (InspectorTimelineAgent* timelineAgent = instrumentingAgents.inspectorTimelineAgent()) {
+        timelineAgent-&gt;willEvaluateScript(url, lineNumber, &amp;frame);
</ins><span class="cx">         timelineAgentId = timelineAgent-&gt;id();
</span><span class="cx">     }
</span><span class="cx">     return InspectorInstrumentationCookie(instrumentingAgents, timelineAgentId);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorInstrumentation::didEvaluateScriptImpl(const InspectorInstrumentationCookie&amp; cookie, Frame* frame)
</del><ins>+void InspectorInstrumentation::didEvaluateScriptImpl(const InspectorInstrumentationCookie&amp; cookie, Frame&amp; frame)
</ins><span class="cx"> {
</span><span class="cx">     if (InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent(cookie))
</span><del>-        timelineAgent-&gt;didEvaluateScript(frame);
</del><ins>+        timelineAgent-&gt;didEvaluateScript(&amp;frame);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorInstrumentation::scriptsEnabledImpl(InstrumentingAgents* instrumentingAgents, bool isEnabled)
</del><ins>+void InspectorInstrumentation::scriptsEnabledImpl(InstrumentingAgents&amp; instrumentingAgents, bool isEnabled)
</ins><span class="cx"> {
</span><del>-    if (InspectorPageAgent* pageAgent = instrumentingAgents-&gt;inspectorPageAgent())
</del><ins>+    if (InspectorPageAgent* pageAgent = instrumentingAgents.inspectorPageAgent())
</ins><span class="cx">         pageAgent-&gt;scriptsEnabled(isEnabled);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorInstrumentation::didCreateIsolatedContextImpl(InstrumentingAgents* instrumentingAgents, Frame* frame, JSC::ExecState* scriptState, SecurityOrigin* origin)
</del><ins>+InspectorInstrumentationCookie InspectorInstrumentation::willFireTimerImpl(InstrumentingAgents&amp; instrumentingAgents, int timerId, ScriptExecutionContext* context)
</ins><span class="cx"> {
</span><del>-    if (PageRuntimeAgent* runtimeAgent = instrumentingAgents-&gt;pageRuntimeAgent())
-        runtimeAgent-&gt;didCreateIsolatedContext(frame, scriptState, origin);
-}
-
-InspectorInstrumentationCookie InspectorInstrumentation::willFireTimerImpl(InstrumentingAgents* instrumentingAgents, int timerId, ScriptExecutionContext* context)
-{
</del><span class="cx">     pauseOnNativeEventIfNeeded(instrumentingAgents, false, timerFiredEventName, false);
</span><span class="cx"> 
</span><span class="cx">     int timelineAgentId = 0;
</span><del>-    if (InspectorTimelineAgent* timelineAgent = instrumentingAgents-&gt;inspectorTimelineAgent()) {
</del><ins>+    if (InspectorTimelineAgent* timelineAgent = instrumentingAgents.inspectorTimelineAgent()) {
</ins><span class="cx">         timelineAgent-&gt;willFireTimer(timerId, frameForScriptExecutionContext(context));
</span><span class="cx">         timelineAgentId = timelineAgent-&gt;id();
</span><span class="cx">     }
</span><span class="lines">@@ -430,23 +427,24 @@
</span><span class="cx"> 
</span><span class="cx"> void InspectorInstrumentation::didFireTimerImpl(const InspectorInstrumentationCookie&amp; cookie)
</span><span class="cx"> {
</span><del>-    cancelPauseOnNativeEvent(cookie.instrumentingAgents());
</del><ins>+    if (cookie.isValid())
+        cancelPauseOnNativeEvent(*cookie.instrumentingAgents());
</ins><span class="cx"> 
</span><span class="cx">     if (InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent(cookie))
</span><span class="cx">         timelineAgent-&gt;didFireTimer();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorInstrumentation::didInvalidateLayoutImpl(InstrumentingAgents* instrumentingAgents, Frame* frame)
</del><ins>+void InspectorInstrumentation::didInvalidateLayoutImpl(InstrumentingAgents&amp; instrumentingAgents, Frame&amp; frame)
</ins><span class="cx"> {
</span><del>-    if (InspectorTimelineAgent* timelineAgent = instrumentingAgents-&gt;inspectorTimelineAgent())
-        timelineAgent-&gt;didInvalidateLayout(frame);
</del><ins>+    if (InspectorTimelineAgent* timelineAgent = instrumentingAgents.inspectorTimelineAgent())
+        timelineAgent-&gt;didInvalidateLayout(&amp;frame);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-InspectorInstrumentationCookie InspectorInstrumentation::willLayoutImpl(InstrumentingAgents* instrumentingAgents, Frame* frame)
</del><ins>+InspectorInstrumentationCookie InspectorInstrumentation::willLayoutImpl(InstrumentingAgents&amp; instrumentingAgents, Frame&amp; frame)
</ins><span class="cx"> {
</span><span class="cx">     int timelineAgentId = 0;
</span><del>-    if (InspectorTimelineAgent* timelineAgent = instrumentingAgents-&gt;inspectorTimelineAgent()) {
-        timelineAgent-&gt;willLayout(frame);
</del><ins>+    if (InspectorTimelineAgent* timelineAgent = instrumentingAgents.inspectorTimelineAgent()) {
+        timelineAgent-&gt;willLayout(&amp;frame);
</ins><span class="cx">         timelineAgentId = timelineAgent-&gt;id();
</span><span class="cx">     }
</span><span class="cx">     return InspectorInstrumentationCookie(instrumentingAgents, timelineAgentId);
</span><span class="lines">@@ -461,12 +459,12 @@
</span><span class="cx">         pageAgent-&gt;didLayout();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-InspectorInstrumentationCookie InspectorInstrumentation::willDispatchXHRLoadEventImpl(InstrumentingAgents* instrumentingAgents, XMLHttpRequest* request, ScriptExecutionContext* context)
</del><ins>+InspectorInstrumentationCookie InspectorInstrumentation::willDispatchXHRLoadEventImpl(InstrumentingAgents&amp; instrumentingAgents, XMLHttpRequest&amp; request, ScriptExecutionContext* context)
</ins><span class="cx"> {
</span><span class="cx">     int timelineAgentId = 0;
</span><del>-    InspectorTimelineAgent* timelineAgent = instrumentingAgents-&gt;inspectorTimelineAgent();
-    if (timelineAgent &amp;&amp; request-&gt;hasEventListeners(eventNames().loadEvent)) {
-        timelineAgent-&gt;willDispatchXHRLoadEvent(request-&gt;url(), frameForScriptExecutionContext(context));
</del><ins>+    InspectorTimelineAgent* timelineAgent = instrumentingAgents.inspectorTimelineAgent();
+    if (timelineAgent &amp;&amp; request.hasEventListeners(eventNames().loadEvent)) {
+        timelineAgent-&gt;willDispatchXHRLoadEvent(request.url(), frameForScriptExecutionContext(context));
</ins><span class="cx">         timelineAgentId = timelineAgent-&gt;id();
</span><span class="cx">     }
</span><span class="cx">     return InspectorInstrumentationCookie(instrumentingAgents, timelineAgentId);
</span><span class="lines">@@ -478,101 +476,105 @@
</span><span class="cx">         timelineAgent-&gt;didDispatchXHRLoadEvent();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorInstrumentation::willPaintImpl(InstrumentingAgents* instrumentingAgents, RenderObject* renderer)
</del><ins>+void InspectorInstrumentation::willPaintImpl(InstrumentingAgents&amp; instrumentingAgents, RenderObject* renderer)
</ins><span class="cx"> {
</span><del>-    if (InspectorTimelineAgent* timelineAgent = instrumentingAgents-&gt;inspectorTimelineAgent())
</del><ins>+    if (InspectorTimelineAgent* timelineAgent = instrumentingAgents.inspectorTimelineAgent())
</ins><span class="cx">         timelineAgent-&gt;willPaint(&amp;renderer-&gt;frame());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorInstrumentation::didPaintImpl(InstrumentingAgents* instrumentingAgents, RenderObject* renderer, const LayoutRect&amp; rect)
</del><ins>+void InspectorInstrumentation::didPaintImpl(InstrumentingAgents&amp; instrumentingAgents, RenderObject* renderer, const LayoutRect&amp; rect)
</ins><span class="cx"> {
</span><del>-    if (InspectorTimelineAgent* timelineAgent = instrumentingAgents-&gt;inspectorTimelineAgent())
</del><ins>+    if (InspectorTimelineAgent* timelineAgent = instrumentingAgents.inspectorTimelineAgent())
</ins><span class="cx">         timelineAgent-&gt;didPaint(renderer, rect);
</span><span class="cx"> 
</span><del>-    if (InspectorPageAgent* pageAgent = instrumentingAgents-&gt;inspectorPageAgent())
</del><ins>+    if (InspectorPageAgent* pageAgent = instrumentingAgents.inspectorPageAgent())
</ins><span class="cx">         pageAgent-&gt;didPaint(renderer, rect);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorInstrumentation::willScrollLayerImpl(InstrumentingAgents* instrumentingAgents, Frame* frame)
</del><ins>+void InspectorInstrumentation::willScrollLayerImpl(InstrumentingAgents&amp; instrumentingAgents, Frame&amp; frame)
</ins><span class="cx"> {
</span><del>-    if (InspectorTimelineAgent* timelineAgent = instrumentingAgents-&gt;inspectorTimelineAgent())
-        timelineAgent-&gt;willScroll(frame);
</del><ins>+    if (InspectorTimelineAgent* timelineAgent = instrumentingAgents.inspectorTimelineAgent())
+        timelineAgent-&gt;willScroll(&amp;frame);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorInstrumentation::didScrollLayerImpl(InstrumentingAgents* instrumentingAgents)
</del><ins>+void InspectorInstrumentation::didScrollLayerImpl(InstrumentingAgents&amp; instrumentingAgents)
</ins><span class="cx"> {
</span><del>-    if (InspectorTimelineAgent* timelineAgent = instrumentingAgents-&gt;inspectorTimelineAgent())
</del><ins>+    if (InspectorTimelineAgent* timelineAgent = instrumentingAgents.inspectorTimelineAgent())
</ins><span class="cx">         timelineAgent-&gt;didScroll();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-InspectorInstrumentationCookie InspectorInstrumentation::willRecalculateStyleImpl(InstrumentingAgents* instrumentingAgents, Frame* frame)
</del><ins>+InspectorInstrumentationCookie InspectorInstrumentation::willRecalculateStyleImpl(InstrumentingAgents&amp; instrumentingAgents, Document&amp; document)
</ins><span class="cx"> {
</span><span class="cx">     int timelineAgentId = 0;
</span><del>-    if (InspectorTimelineAgent* timelineAgent = instrumentingAgents-&gt;inspectorTimelineAgent()) {
-        timelineAgent-&gt;willRecalculateStyle(frame);
</del><ins>+    if (InspectorTimelineAgent* timelineAgent = instrumentingAgents.inspectorTimelineAgent()) {
+        timelineAgent-&gt;willRecalculateStyle(document.frame());
</ins><span class="cx">         timelineAgentId = timelineAgent-&gt;id();
</span><span class="cx">     }
</span><del>-    if (InspectorResourceAgent* resourceAgent = instrumentingAgents-&gt;inspectorResourceAgent())
</del><ins>+    if (InspectorResourceAgent* resourceAgent = instrumentingAgents.inspectorResourceAgent())
</ins><span class="cx">         resourceAgent-&gt;willRecalculateStyle();
</span><span class="cx">     return InspectorInstrumentationCookie(instrumentingAgents, timelineAgentId);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void InspectorInstrumentation::didRecalculateStyleImpl(const InspectorInstrumentationCookie&amp; cookie)
</span><span class="cx"> {
</span><ins>+    if (!cookie.isValid())
+        return;
+    
+    InstrumentingAgents&amp; instrumentingAgents = *cookie.instrumentingAgents();
+
</ins><span class="cx">     if (InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent(cookie))
</span><span class="cx">         timelineAgent-&gt;didRecalculateStyle();
</span><del>-    InstrumentingAgents* instrumentingAgents = cookie.instrumentingAgents();
-    if (InspectorResourceAgent* resourceAgent = instrumentingAgents-&gt;inspectorResourceAgent())
</del><ins>+    if (InspectorResourceAgent* resourceAgent = instrumentingAgents.inspectorResourceAgent())
</ins><span class="cx">         resourceAgent-&gt;didRecalculateStyle();
</span><del>-    if (InspectorPageAgent* pageAgent = instrumentingAgents-&gt;inspectorPageAgent())
</del><ins>+    if (InspectorPageAgent* pageAgent = instrumentingAgents.inspectorPageAgent())
</ins><span class="cx">         pageAgent-&gt;didRecalculateStyle();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorInstrumentation::didScheduleStyleRecalculationImpl(InstrumentingAgents* instrumentingAgents, Document* document)
</del><ins>+void InspectorInstrumentation::didScheduleStyleRecalculationImpl(InstrumentingAgents&amp; instrumentingAgents, Document&amp; document)
</ins><span class="cx"> {
</span><del>-    if (InspectorTimelineAgent* timelineAgent = instrumentingAgents-&gt;inspectorTimelineAgent())
-        timelineAgent-&gt;didScheduleStyleRecalculation(document-&gt;frame());
-    if (InspectorResourceAgent* resourceAgent = instrumentingAgents-&gt;inspectorResourceAgent())
-        resourceAgent-&gt;didScheduleStyleRecalculation(document);
</del><ins>+    if (InspectorTimelineAgent* timelineAgent = instrumentingAgents.inspectorTimelineAgent())
+        timelineAgent-&gt;didScheduleStyleRecalculation(document.frame());
+    if (InspectorResourceAgent* resourceAgent = instrumentingAgents.inspectorResourceAgent())
+        resourceAgent-&gt;didScheduleStyleRecalculation(&amp;document);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorInstrumentation::applyEmulatedMediaImpl(InstrumentingAgents* instrumentingAgents, String* media)
</del><ins>+void InspectorInstrumentation::applyEmulatedMediaImpl(InstrumentingAgents&amp; instrumentingAgents, String&amp; media)
</ins><span class="cx"> {
</span><del>-    if (InspectorPageAgent* pageAgent = instrumentingAgents-&gt;inspectorPageAgent())
-        pageAgent-&gt;applyEmulatedMedia(media);
</del><ins>+    if (InspectorPageAgent* pageAgent = instrumentingAgents.inspectorPageAgent())
+        pageAgent-&gt;applyEmulatedMedia(&amp;media);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorInstrumentation::willSendRequestImpl(InstrumentingAgents* instrumentingAgents, unsigned long identifier, DocumentLoader* loader, ResourceRequest&amp; request, const ResourceResponse&amp; redirectResponse)
</del><ins>+void InspectorInstrumentation::willSendRequestImpl(InstrumentingAgents&amp; instrumentingAgents, unsigned long identifier, DocumentLoader* loader, ResourceRequest&amp; request, const ResourceResponse&amp; redirectResponse)
</ins><span class="cx"> {
</span><del>-    if (InspectorTimelineAgent* timelineAgent = instrumentingAgents-&gt;inspectorTimelineAgent())
</del><ins>+    if (InspectorTimelineAgent* timelineAgent = instrumentingAgents.inspectorTimelineAgent())
</ins><span class="cx">         timelineAgent-&gt;willSendResourceRequest(identifier, request, loader-&gt;frame());
</span><del>-    if (InspectorResourceAgent* resourceAgent = instrumentingAgents-&gt;inspectorResourceAgent())
</del><ins>+    if (InspectorResourceAgent* resourceAgent = instrumentingAgents.inspectorResourceAgent())
</ins><span class="cx">         resourceAgent-&gt;willSendRequest(identifier, loader, request, redirectResponse);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorInstrumentation::continueAfterPingLoaderImpl(InstrumentingAgents* instrumentingAgents, unsigned long identifier, DocumentLoader* loader, ResourceRequest&amp; request, const ResourceResponse&amp; response)
</del><ins>+void InspectorInstrumentation::continueAfterPingLoaderImpl(InstrumentingAgents&amp; instrumentingAgents, unsigned long identifier, DocumentLoader* loader, ResourceRequest&amp; request, const ResourceResponse&amp; response)
</ins><span class="cx"> {
</span><span class="cx">     willSendRequestImpl(instrumentingAgents, identifier, loader, request, response);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorInstrumentation::markResourceAsCachedImpl(InstrumentingAgents* instrumentingAgents, unsigned long identifier)
</del><ins>+void InspectorInstrumentation::markResourceAsCachedImpl(InstrumentingAgents&amp; instrumentingAgents, unsigned long identifier)
</ins><span class="cx"> {
</span><del>-    if (InspectorResourceAgent* resourceAgent = instrumentingAgents-&gt;inspectorResourceAgent())
</del><ins>+    if (InspectorResourceAgent* resourceAgent = instrumentingAgents.inspectorResourceAgent())
</ins><span class="cx">         resourceAgent-&gt;markResourceAsCached(identifier);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorInstrumentation::didLoadResourceFromMemoryCacheImpl(InstrumentingAgents* instrumentingAgents, DocumentLoader* loader, CachedResource* cachedResource)
</del><ins>+void InspectorInstrumentation::didLoadResourceFromMemoryCacheImpl(InstrumentingAgents&amp; instrumentingAgents, DocumentLoader* loader, CachedResource* cachedResource)
</ins><span class="cx"> {
</span><del>-    if (!instrumentingAgents-&gt;inspectorEnvironment().developerExtrasEnabled())
</del><ins>+    if (!instrumentingAgents.inspectorEnvironment().developerExtrasEnabled())
</ins><span class="cx">         return;
</span><del>-    if (InspectorResourceAgent* resourceAgent = instrumentingAgents-&gt;inspectorResourceAgent())
</del><ins>+    if (InspectorResourceAgent* resourceAgent = instrumentingAgents.inspectorResourceAgent())
</ins><span class="cx">         resourceAgent-&gt;didLoadResourceFromMemoryCache(loader, cachedResource);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-InspectorInstrumentationCookie InspectorInstrumentation::willReceiveResourceDataImpl(InstrumentingAgents* instrumentingAgents, unsigned long identifier, Frame* frame, int length)
</del><ins>+InspectorInstrumentationCookie InspectorInstrumentation::willReceiveResourceDataImpl(InstrumentingAgents&amp; instrumentingAgents, Frame* frame, unsigned long identifier, int length)
</ins><span class="cx"> {
</span><span class="cx">     int timelineAgentId = 0;
</span><del>-    if (InspectorTimelineAgent* timelineAgent = instrumentingAgents-&gt;inspectorTimelineAgent()) {
</del><ins>+    if (InspectorTimelineAgent* timelineAgent = instrumentingAgents.inspectorTimelineAgent()) {
</ins><span class="cx">         timelineAgent-&gt;willReceiveResourceData(identifier, frame, length);
</span><span class="cx">         timelineAgentId = timelineAgent-&gt;id();
</span><span class="cx">     }
</span><span class="lines">@@ -585,10 +587,10 @@
</span><span class="cx">         timelineAgent-&gt;didReceiveResourceData();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-InspectorInstrumentationCookie InspectorInstrumentation::willReceiveResourceResponseImpl(InstrumentingAgents* instrumentingAgents, unsigned long identifier, const ResourceResponse&amp; response, Frame* frame)
</del><ins>+InspectorInstrumentationCookie InspectorInstrumentation::willReceiveResourceResponseImpl(InstrumentingAgents&amp; instrumentingAgents, Frame* frame, unsigned long identifier, const ResourceResponse&amp; response)
</ins><span class="cx"> {
</span><span class="cx">     int timelineAgentId = 0;
</span><del>-    InspectorTimelineAgent* timelineAgent = instrumentingAgents-&gt;inspectorTimelineAgent();
</del><ins>+    InspectorTimelineAgent* timelineAgent = instrumentingAgents.inspectorTimelineAgent();
</ins><span class="cx">     if (timelineAgent) {
</span><span class="cx">         timelineAgent-&gt;willReceiveResourceResponse(identifier, response, frame);
</span><span class="cx">         timelineAgentId = timelineAgent-&gt;id();
</span><span class="lines">@@ -598,215 +600,220 @@
</span><span class="cx"> 
</span><span class="cx"> void InspectorInstrumentation::didReceiveResourceResponseImpl(const InspectorInstrumentationCookie&amp; cookie, unsigned long identifier, DocumentLoader* loader, const ResourceResponse&amp; response, ResourceLoader* resourceLoader)
</span><span class="cx"> {
</span><ins>+    if (!cookie.isValid())
+        return;
+
+    if (!loader)
+        return;
+
+    InstrumentingAgents&amp; instrumentingAgents = *cookie.instrumentingAgents();
+
</ins><span class="cx">     if (InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent(cookie))
</span><span class="cx">         timelineAgent-&gt;didReceiveResourceResponse();
</span><del>-    if (!loader)
-        return;
-    InstrumentingAgents* instrumentingAgents = cookie.instrumentingAgents();
-    if (InspectorResourceAgent* resourceAgent = instrumentingAgents-&gt;inspectorResourceAgent())
</del><ins>+    if (InspectorResourceAgent* resourceAgent = instrumentingAgents.inspectorResourceAgent())
</ins><span class="cx">         resourceAgent-&gt;didReceiveResponse(identifier, loader, response, resourceLoader);
</span><del>-    if (WebConsoleAgent* consoleAgent = instrumentingAgents-&gt;webConsoleAgent())
</del><ins>+    if (WebConsoleAgent* consoleAgent = instrumentingAgents.webConsoleAgent())
</ins><span class="cx">         consoleAgent-&gt;didReceiveResponse(identifier, response); // This should come AFTER resource notification, front-end relies on this.
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorInstrumentation::didReceiveResourceResponseButCanceledImpl(Frame* frame, DocumentLoader* loader, unsigned long identifier, const ResourceResponse&amp; r)
</del><ins>+void InspectorInstrumentation::didReceiveResourceResponseButCanceledImpl(Frame* frame, DocumentLoader&amp; loader, unsigned long identifier, const ResourceResponse&amp; r)
</ins><span class="cx"> {
</span><span class="cx">     InspectorInstrumentationCookie cookie = InspectorInstrumentation::willReceiveResourceResponse(frame, identifier, r);
</span><del>-    InspectorInstrumentation::didReceiveResourceResponse(cookie, identifier, loader, r, nullptr);
</del><ins>+    InspectorInstrumentation::didReceiveResourceResponse(cookie, identifier, &amp;loader, r, nullptr);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorInstrumentation::continueAfterXFrameOptionsDeniedImpl(Frame* frame, DocumentLoader* loader, unsigned long identifier, const ResourceResponse&amp; r)
</del><ins>+void InspectorInstrumentation::continueAfterXFrameOptionsDeniedImpl(Frame* frame, DocumentLoader&amp; loader, unsigned long identifier, const ResourceResponse&amp; r)
</ins><span class="cx"> {
</span><span class="cx">     didReceiveResourceResponseButCanceledImpl(frame, loader, identifier, r);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorInstrumentation::continueWithPolicyDownloadImpl(Frame* frame, DocumentLoader* loader, unsigned long identifier, const ResourceResponse&amp; r)
</del><ins>+void InspectorInstrumentation::continueWithPolicyDownloadImpl(Frame* frame, DocumentLoader&amp; loader, unsigned long identifier, const ResourceResponse&amp; r)
</ins><span class="cx"> {
</span><span class="cx">     didReceiveResourceResponseButCanceledImpl(frame, loader, identifier, r);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorInstrumentation::continueWithPolicyIgnoreImpl(Frame* frame, DocumentLoader* loader, unsigned long identifier, const ResourceResponse&amp; r)
</del><ins>+void InspectorInstrumentation::continueWithPolicyIgnoreImpl(Frame* frame, DocumentLoader&amp; loader, unsigned long identifier, const ResourceResponse&amp; r)
</ins><span class="cx"> {
</span><span class="cx">     didReceiveResourceResponseButCanceledImpl(frame, loader, identifier, r);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorInstrumentation::didReceiveDataImpl(InstrumentingAgents* instrumentingAgents, unsigned long identifier, const char* data, int dataLength, int encodedDataLength)
</del><ins>+void InspectorInstrumentation::didReceiveDataImpl(InstrumentingAgents&amp; instrumentingAgents, unsigned long identifier, const char* data, int dataLength, int encodedDataLength)
</ins><span class="cx"> {
</span><del>-    if (InspectorResourceAgent* resourceAgent = instrumentingAgents-&gt;inspectorResourceAgent())
</del><ins>+    if (InspectorResourceAgent* resourceAgent = instrumentingAgents.inspectorResourceAgent())
</ins><span class="cx">         resourceAgent-&gt;didReceiveData(identifier, data, dataLength, encodedDataLength);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorInstrumentation::didFinishLoadingImpl(InstrumentingAgents* instrumentingAgents, unsigned long identifier, DocumentLoader* loader, double finishTime)
</del><ins>+void InspectorInstrumentation::didFinishLoadingImpl(InstrumentingAgents&amp; instrumentingAgents, unsigned long identifier, DocumentLoader* loader, double finishTime)
</ins><span class="cx"> {
</span><del>-    if (InspectorTimelineAgent* timelineAgent = instrumentingAgents-&gt;inspectorTimelineAgent())
</del><ins>+    if (InspectorTimelineAgent* timelineAgent = instrumentingAgents.inspectorTimelineAgent())
</ins><span class="cx">         timelineAgent-&gt;didFinishLoadingResource(identifier, false, finishTime, loader-&gt;frame());
</span><del>-    if (InspectorResourceAgent* resourceAgent = instrumentingAgents-&gt;inspectorResourceAgent())
</del><ins>+    if (InspectorResourceAgent* resourceAgent = instrumentingAgents.inspectorResourceAgent())
</ins><span class="cx">         resourceAgent-&gt;didFinishLoading(identifier, loader, finishTime);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorInstrumentation::didFailLoadingImpl(InstrumentingAgents* instrumentingAgents, unsigned long identifier, DocumentLoader* loader, const ResourceError&amp; error)
</del><ins>+void InspectorInstrumentation::didFailLoadingImpl(InstrumentingAgents&amp; instrumentingAgents, unsigned long identifier, DocumentLoader* loader, const ResourceError&amp; error)
</ins><span class="cx"> {
</span><del>-    if (InspectorTimelineAgent* timelineAgent = instrumentingAgents-&gt;inspectorTimelineAgent())
</del><ins>+    if (InspectorTimelineAgent* timelineAgent = instrumentingAgents.inspectorTimelineAgent())
</ins><span class="cx">         timelineAgent-&gt;didFinishLoadingResource(identifier, true, 0, loader-&gt;frame());
</span><del>-    if (InspectorResourceAgent* resourceAgent = instrumentingAgents-&gt;inspectorResourceAgent())
</del><ins>+    if (InspectorResourceAgent* resourceAgent = instrumentingAgents.inspectorResourceAgent())
</ins><span class="cx">         resourceAgent-&gt;didFailLoading(identifier, loader, error);
</span><del>-    if (WebConsoleAgent* consoleAgent = instrumentingAgents-&gt;webConsoleAgent())
</del><ins>+    if (WebConsoleAgent* consoleAgent = instrumentingAgents.webConsoleAgent())
</ins><span class="cx">         consoleAgent-&gt;didFailLoading(identifier, error); // This should come AFTER resource notification, front-end relies on this.
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorInstrumentation::documentThreadableLoaderStartedLoadingForClientImpl(InstrumentingAgents* instrumentingAgents, unsigned long identifier, ThreadableLoaderClient* client)
</del><ins>+void InspectorInstrumentation::documentThreadableLoaderStartedLoadingForClientImpl(InstrumentingAgents&amp; instrumentingAgents, unsigned long identifier, ThreadableLoaderClient* client)
</ins><span class="cx"> {
</span><del>-    if (InspectorResourceAgent* resourceAgent = instrumentingAgents-&gt;inspectorResourceAgent())
</del><ins>+    if (InspectorResourceAgent* resourceAgent = instrumentingAgents.inspectorResourceAgent())
</ins><span class="cx">         resourceAgent-&gt;documentThreadableLoaderStartedLoadingForClient(identifier, client);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorInstrumentation::willLoadXHRImpl(InstrumentingAgents* instrumentingAgents, ThreadableLoaderClient* client, const String&amp; method, const URL&amp; url, bool async, PassRefPtr&lt;FormData&gt; formData, const HTTPHeaderMap&amp; headers, bool includeCredentials)
</del><ins>+void InspectorInstrumentation::willLoadXHRImpl(InstrumentingAgents&amp; instrumentingAgents, ThreadableLoaderClient* client, const String&amp; method, const URL&amp; url, bool async, PassRefPtr&lt;FormData&gt; formData, const HTTPHeaderMap&amp; headers, bool includeCredentials)
</ins><span class="cx"> {
</span><del>-    if (InspectorResourceAgent* resourceAgent = instrumentingAgents-&gt;inspectorResourceAgent())
</del><ins>+    if (InspectorResourceAgent* resourceAgent = instrumentingAgents.inspectorResourceAgent())
</ins><span class="cx">         resourceAgent-&gt;willLoadXHR(client, method, url, async, formData, headers, includeCredentials);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorInstrumentation::didFailXHRLoadingImpl(InstrumentingAgents* instrumentingAgents, ThreadableLoaderClient* client)
</del><ins>+void InspectorInstrumentation::didFailXHRLoadingImpl(InstrumentingAgents&amp; instrumentingAgents, ThreadableLoaderClient* client)
</ins><span class="cx"> {
</span><del>-    if (InspectorResourceAgent* resourceAgent = instrumentingAgents-&gt;inspectorResourceAgent())
</del><ins>+    if (InspectorResourceAgent* resourceAgent = instrumentingAgents.inspectorResourceAgent())
</ins><span class="cx">         resourceAgent-&gt;didFailXHRLoading(client);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorInstrumentation::didFinishXHRLoadingImpl(InstrumentingAgents* instrumentingAgents, ThreadableLoaderClient* client, unsigned long identifier, const String&amp; sourceString, const String&amp; url, const String&amp; sendURL, unsigned sendLineNumber, unsigned sendColumnNumber)
</del><ins>+void InspectorInstrumentation::didFinishXHRLoadingImpl(InstrumentingAgents&amp; instrumentingAgents, ThreadableLoaderClient* client, unsigned long identifier, const String&amp; sourceString, const String&amp; url, const String&amp; sendURL, unsigned sendLineNumber, unsigned sendColumnNumber)
</ins><span class="cx"> {
</span><del>-    if (WebConsoleAgent* consoleAgent = instrumentingAgents-&gt;webConsoleAgent())
</del><ins>+    if (WebConsoleAgent* consoleAgent = instrumentingAgents.webConsoleAgent())
</ins><span class="cx">         consoleAgent-&gt;didFinishXHRLoading(identifier, url, sendURL, sendLineNumber, sendColumnNumber);
</span><del>-    if (InspectorResourceAgent* resourceAgent = instrumentingAgents-&gt;inspectorResourceAgent())
</del><ins>+    if (InspectorResourceAgent* resourceAgent = instrumentingAgents.inspectorResourceAgent())
</ins><span class="cx">         resourceAgent-&gt;didFinishXHRLoading(client, identifier, sourceString);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorInstrumentation::didReceiveXHRResponseImpl(InstrumentingAgents* instrumentingAgents, unsigned long identifier)
</del><ins>+void InspectorInstrumentation::didReceiveXHRResponseImpl(InstrumentingAgents&amp; instrumentingAgents, unsigned long identifier)
</ins><span class="cx"> {
</span><del>-    if (InspectorResourceAgent* resourceAgent = instrumentingAgents-&gt;inspectorResourceAgent())
</del><ins>+    if (InspectorResourceAgent* resourceAgent = instrumentingAgents.inspectorResourceAgent())
</ins><span class="cx">         resourceAgent-&gt;didReceiveXHRResponse(identifier);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorInstrumentation::willLoadXHRSynchronouslyImpl(InstrumentingAgents* instrumentingAgents)
</del><ins>+void InspectorInstrumentation::willLoadXHRSynchronouslyImpl(InstrumentingAgents&amp; instrumentingAgents)
</ins><span class="cx"> {
</span><del>-    if (InspectorResourceAgent* resourceAgent = instrumentingAgents-&gt;inspectorResourceAgent())
</del><ins>+    if (InspectorResourceAgent* resourceAgent = instrumentingAgents.inspectorResourceAgent())
</ins><span class="cx">         resourceAgent-&gt;willLoadXHRSynchronously();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorInstrumentation::didLoadXHRSynchronouslyImpl(InstrumentingAgents* instrumentingAgents)
</del><ins>+void InspectorInstrumentation::didLoadXHRSynchronouslyImpl(InstrumentingAgents&amp; instrumentingAgents)
</ins><span class="cx"> {
</span><del>-    if (InspectorResourceAgent* resourceAgent = instrumentingAgents-&gt;inspectorResourceAgent())
</del><ins>+    if (InspectorResourceAgent* resourceAgent = instrumentingAgents.inspectorResourceAgent())
</ins><span class="cx">         resourceAgent-&gt;didLoadXHRSynchronously();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorInstrumentation::scriptImportedImpl(InstrumentingAgents* instrumentingAgents, unsigned long identifier, const String&amp; sourceString)
</del><ins>+void InspectorInstrumentation::scriptImportedImpl(InstrumentingAgents&amp; instrumentingAgents, unsigned long identifier, const String&amp; sourceString)
</ins><span class="cx"> {
</span><del>-    if (InspectorResourceAgent* resourceAgent = instrumentingAgents-&gt;inspectorResourceAgent())
</del><ins>+    if (InspectorResourceAgent* resourceAgent = instrumentingAgents.inspectorResourceAgent())
</ins><span class="cx">         resourceAgent-&gt;setInitialScriptContent(identifier, sourceString);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorInstrumentation::scriptExecutionBlockedByCSPImpl(InstrumentingAgents* instrumentingAgents, const String&amp; directiveText)
</del><ins>+void InspectorInstrumentation::scriptExecutionBlockedByCSPImpl(InstrumentingAgents&amp; instrumentingAgents, const String&amp; directiveText)
</ins><span class="cx"> {
</span><del>-    if (InspectorDebuggerAgent* debuggerAgent = instrumentingAgents-&gt;inspectorDebuggerAgent())
</del><ins>+    if (InspectorDebuggerAgent* debuggerAgent = instrumentingAgents.inspectorDebuggerAgent())
</ins><span class="cx">         debuggerAgent-&gt;scriptExecutionBlockedByCSP(directiveText);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorInstrumentation::didReceiveScriptResponseImpl(InstrumentingAgents* instrumentingAgents, unsigned long identifier)
</del><ins>+void InspectorInstrumentation::didReceiveScriptResponseImpl(InstrumentingAgents&amp; instrumentingAgents, unsigned long identifier)
</ins><span class="cx"> {
</span><del>-    if (InspectorResourceAgent* resourceAgent = instrumentingAgents-&gt;inspectorResourceAgent())
</del><ins>+    if (InspectorResourceAgent* resourceAgent = instrumentingAgents.inspectorResourceAgent())
</ins><span class="cx">         resourceAgent-&gt;didReceiveScriptResponse(identifier);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorInstrumentation::domContentLoadedEventFiredImpl(InstrumentingAgents* instrumentingAgents, Frame* frame)
</del><ins>+void InspectorInstrumentation::domContentLoadedEventFiredImpl(InstrumentingAgents&amp; instrumentingAgents, Frame&amp; frame)
</ins><span class="cx"> {
</span><del>-    if (InspectorTimelineAgent* timelineAgent = instrumentingAgents-&gt;inspectorTimelineAgent())
-        timelineAgent-&gt;didMarkDOMContentEvent(frame);
</del><ins>+    if (InspectorTimelineAgent* timelineAgent = instrumentingAgents.inspectorTimelineAgent())
+        timelineAgent-&gt;didMarkDOMContentEvent(&amp;frame);
</ins><span class="cx"> 
</span><del>-    if (&amp;frame-&gt;page()-&gt;mainFrame() != frame)
</del><ins>+    if (!frame.isMainFrame())
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    if (InspectorDOMAgent* domAgent = instrumentingAgents-&gt;inspectorDOMAgent())
</del><ins>+    if (InspectorDOMAgent* domAgent = instrumentingAgents.inspectorDOMAgent())
</ins><span class="cx">         domAgent-&gt;mainFrameDOMContentLoaded();
</span><span class="cx"> 
</span><del>-    if (InspectorPageAgent* pageAgent = instrumentingAgents-&gt;inspectorPageAgent())
</del><ins>+    if (InspectorPageAgent* pageAgent = instrumentingAgents.inspectorPageAgent())
</ins><span class="cx">         pageAgent-&gt;domContentEventFired();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorInstrumentation::loadEventFiredImpl(InstrumentingAgents* instrumentingAgents, Frame* frame)
</del><ins>+void InspectorInstrumentation::loadEventFiredImpl(InstrumentingAgents&amp; instrumentingAgents, Frame* frame)
</ins><span class="cx"> {
</span><del>-    if (InspectorTimelineAgent* timelineAgent = instrumentingAgents-&gt;inspectorTimelineAgent())
</del><ins>+    if (InspectorTimelineAgent* timelineAgent = instrumentingAgents.inspectorTimelineAgent())
</ins><span class="cx">         timelineAgent-&gt;didMarkLoadEvent(frame);
</span><span class="cx"> 
</span><del>-    if (&amp;frame-&gt;page()-&gt;mainFrame() != frame)
</del><ins>+    if (!frame-&gt;isMainFrame())
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    if (InspectorPageAgent* pageAgent = instrumentingAgents-&gt;inspectorPageAgent())
</del><ins>+    if (InspectorPageAgent* pageAgent = instrumentingAgents.inspectorPageAgent())
</ins><span class="cx">         pageAgent-&gt;loadEventFired();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorInstrumentation::frameDetachedFromParentImpl(InstrumentingAgents* instrumentingAgents, Frame* frame)
</del><ins>+void InspectorInstrumentation::frameDetachedFromParentImpl(InstrumentingAgents&amp; instrumentingAgents, Frame&amp; frame)
</ins><span class="cx"> {
</span><del>-    if (InspectorPageAgent* pageAgent = instrumentingAgents-&gt;inspectorPageAgent())
-        pageAgent-&gt;frameDetached(frame);
</del><ins>+    if (InspectorPageAgent* pageAgent = instrumentingAgents.inspectorPageAgent())
+        pageAgent-&gt;frameDetached(&amp;frame);
</ins><span class="cx"> 
</span><span class="cx"> #if ENABLE(WEB_REPLAY)
</span><del>-    if (frame-&gt;isMainFrame()) {
-        if (InspectorReplayAgent* replayAgent = instrumentingAgents-&gt;inspectorReplayAgent())
-            replayAgent-&gt;frameDetached(frame);
</del><ins>+    if (frame.isMainFrame()) {
+        if (InspectorReplayAgent* replayAgent = instrumentingAgents.inspectorReplayAgent())
+            replayAgent-&gt;frameDetached(&amp;frame);
</ins><span class="cx">     }
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorInstrumentation::didCommitLoadImpl(InstrumentingAgents* instrumentingAgents, Page* page, DocumentLoader* loader)
</del><ins>+void InspectorInstrumentation::didCommitLoadImpl(InstrumentingAgents&amp; instrumentingAgents, Page* page, DocumentLoader* loader)
</ins><span class="cx"> {
</span><del>-    if (!instrumentingAgents-&gt;inspectorEnvironment().developerExtrasEnabled())
</del><ins>+    if (!instrumentingAgents.inspectorEnvironment().developerExtrasEnabled())
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     if (loader-&gt;frame()-&gt;isMainFrame()) {
</span><del>-        if (WebConsoleAgent* consoleAgent = instrumentingAgents-&gt;webConsoleAgent())
</del><ins>+        if (WebConsoleAgent* consoleAgent = instrumentingAgents.webConsoleAgent())
</ins><span class="cx">             consoleAgent-&gt;reset();
</span><span class="cx"> 
</span><del>-        if (InspectorResourceAgent* resourceAgent = instrumentingAgents-&gt;inspectorResourceAgent())
</del><ins>+        if (InspectorResourceAgent* resourceAgent = instrumentingAgents.inspectorResourceAgent())
</ins><span class="cx">             resourceAgent-&gt;mainFrameNavigated(loader);
</span><span class="cx"> 
</span><del>-        if (InspectorCSSAgent* cssAgent = instrumentingAgents-&gt;inspectorCSSAgent())
</del><ins>+        if (InspectorCSSAgent* cssAgent = instrumentingAgents.inspectorCSSAgent())
</ins><span class="cx">             cssAgent-&gt;reset();
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(SQL_DATABASE)
</span><del>-        if (InspectorDatabaseAgent* databaseAgent = instrumentingAgents-&gt;inspectorDatabaseAgent())
</del><ins>+        if (InspectorDatabaseAgent* databaseAgent = instrumentingAgents.inspectorDatabaseAgent())
</ins><span class="cx">             databaseAgent-&gt;clearResources();
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-        if (InspectorDOMAgent* domAgent = instrumentingAgents-&gt;inspectorDOMAgent())
</del><ins>+        if (InspectorDOMAgent* domAgent = instrumentingAgents.inspectorDOMAgent())
</ins><span class="cx">             domAgent-&gt;setDocument(page-&gt;mainFrame().document());
</span><span class="cx"> 
</span><del>-        if (InspectorLayerTreeAgent* layerTreeAgent = instrumentingAgents-&gt;inspectorLayerTreeAgent())
</del><ins>+        if (InspectorLayerTreeAgent* layerTreeAgent = instrumentingAgents.inspectorLayerTreeAgent())
</ins><span class="cx">             layerTreeAgent-&gt;reset();
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (InspectorDOMAgent* domAgent = instrumentingAgents-&gt;inspectorDOMAgent())
</del><ins>+    if (InspectorDOMAgent* domAgent = instrumentingAgents.inspectorDOMAgent())
</ins><span class="cx">         domAgent-&gt;didCommitLoad(loader-&gt;frame()-&gt;document());
</span><span class="cx"> 
</span><del>-    if (InspectorPageAgent* pageAgent = instrumentingAgents-&gt;inspectorPageAgent())
</del><ins>+    if (InspectorPageAgent* pageAgent = instrumentingAgents.inspectorPageAgent())
</ins><span class="cx">         pageAgent-&gt;frameNavigated(loader);
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(WEB_REPLAY)
</span><del>-    if (InspectorReplayAgent* replayAgent = instrumentingAgents-&gt;inspectorReplayAgent())
</del><ins>+    if (InspectorReplayAgent* replayAgent = instrumentingAgents.inspectorReplayAgent())
</ins><span class="cx">         replayAgent-&gt;frameNavigated(loader);
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorInstrumentation::frameDocumentUpdatedImpl(InstrumentingAgents* instrumentingAgents, Frame* frame)
</del><ins>+void InspectorInstrumentation::frameDocumentUpdatedImpl(InstrumentingAgents&amp; instrumentingAgents, Frame* frame)
</ins><span class="cx"> {
</span><del>-    if (!instrumentingAgents-&gt;inspectorEnvironment().developerExtrasEnabled())
</del><ins>+    if (!instrumentingAgents.inspectorEnvironment().developerExtrasEnabled())
</ins><span class="cx">         return;
</span><del>-    if (InspectorDOMAgent* domAgent = instrumentingAgents-&gt;inspectorDOMAgent())
</del><ins>+    if (InspectorDOMAgent* domAgent = instrumentingAgents.inspectorDOMAgent())
</ins><span class="cx">         domAgent-&gt;frameDocumentUpdated(frame);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorInstrumentation::loaderDetachedFromFrameImpl(InstrumentingAgents* instrumentingAgents, DocumentLoader* loader)
</del><ins>+void InspectorInstrumentation::loaderDetachedFromFrameImpl(InstrumentingAgents&amp; instrumentingAgents, DocumentLoader&amp; loader)
</ins><span class="cx"> {
</span><del>-    if (InspectorPageAgent* inspectorPageAgent = instrumentingAgents-&gt;inspectorPageAgent())
-        inspectorPageAgent-&gt;loaderDetachedFromFrame(loader);
</del><ins>+    if (InspectorPageAgent* inspectorPageAgent = instrumentingAgents.inspectorPageAgent())
+        inspectorPageAgent-&gt;loaderDetachedFromFrame(&amp;loader);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void InspectorInstrumentation::frameStartedLoadingImpl(InstrumentingAgents&amp; instrumentingAgents, Frame&amp; frame)
</span><span class="lines">@@ -833,9 +840,9 @@
</span><span class="cx">         inspectorPageAgent-&gt;frameClearedScheduledNavigation(frame);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-InspectorInstrumentationCookie InspectorInstrumentation::willRunJavaScriptDialogImpl(InstrumentingAgents* instrumentingAgents, const String&amp; message)
</del><ins>+InspectorInstrumentationCookie InspectorInstrumentation::willRunJavaScriptDialogImpl(InstrumentingAgents&amp; instrumentingAgents, const String&amp; message)
</ins><span class="cx"> {
</span><del>-    if (InspectorPageAgent* inspectorPageAgent = instrumentingAgents-&gt;inspectorPageAgent())
</del><ins>+    if (InspectorPageAgent* inspectorPageAgent = instrumentingAgents.inspectorPageAgent())
</ins><span class="cx">         inspectorPageAgent-&gt;willRunJavaScriptDialog(message);
</span><span class="cx">     return InspectorInstrumentationCookie(instrumentingAgents, 0);
</span><span class="cx"> }
</span><span class="lines">@@ -846,22 +853,21 @@
</span><span class="cx">         inspectorPageAgent-&gt;didRunJavaScriptDialog();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorInstrumentation::willDestroyCachedResourceImpl(CachedResource* cachedResource)
</del><ins>+void InspectorInstrumentation::willDestroyCachedResourceImpl(CachedResource&amp; cachedResource)
</ins><span class="cx"> {
</span><del>-    if (!instrumentingAgentsSet)
</del><ins>+    if (!s_instrumentingAgentsSet)
</ins><span class="cx">         return;
</span><del>-    HashSet&lt;InstrumentingAgents*&gt;::iterator end = instrumentingAgentsSet-&gt;end();
-    for (HashSet&lt;InstrumentingAgents*&gt;::iterator it = instrumentingAgentsSet-&gt;begin(); it != end; ++it) {
-        InstrumentingAgents* instrumentingAgents = *it;
-        if (InspectorResourceAgent* inspectorResourceAgent = instrumentingAgents-&gt;inspectorResourceAgent())
-            inspectorResourceAgent-&gt;willDestroyCachedResource(cachedResource);
</del><ins>+
+    for (auto* instrumentingAgent : *s_instrumentingAgentsSet) {
+        if (InspectorResourceAgent* inspectorResourceAgent = instrumentingAgent-&gt;inspectorResourceAgent())
+            inspectorResourceAgent-&gt;willDestroyCachedResource(&amp;cachedResource);
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-InspectorInstrumentationCookie InspectorInstrumentation::willWriteHTMLImpl(InstrumentingAgents* instrumentingAgents, unsigned startLine, Frame* frame)
</del><ins>+InspectorInstrumentationCookie InspectorInstrumentation::willWriteHTMLImpl(InstrumentingAgents&amp; instrumentingAgents, unsigned startLine, Frame* frame)
</ins><span class="cx"> {
</span><span class="cx">     int timelineAgentId = 0;
</span><del>-    if (InspectorTimelineAgent* timelineAgent = instrumentingAgents-&gt;inspectorTimelineAgent()) {
</del><ins>+    if (InspectorTimelineAgent* timelineAgent = instrumentingAgents.inspectorTimelineAgent()) {
</ins><span class="cx">         timelineAgent-&gt;willWriteHTML(startLine, frame);
</span><span class="cx">         timelineAgentId = timelineAgent-&gt;id();
</span><span class="cx">     }
</span><span class="lines">@@ -881,109 +887,109 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> // FIXME: Drop this once we no longer generate stacks outside of Inspector.
</span><del>-void InspectorInstrumentation::addMessageToConsoleImpl(InstrumentingAgents* instrumentingAgents, MessageSource source, MessageType type, MessageLevel level, const String&amp; message, PassRefPtr&lt;ScriptCallStack&gt; callStack, unsigned long requestIdentifier)
</del><ins>+void InspectorInstrumentation::addMessageToConsoleImpl(InstrumentingAgents&amp; instrumentingAgents, MessageSource source, MessageType type, MessageLevel level, const String&amp; message, PassRefPtr&lt;ScriptCallStack&gt; callStack, unsigned long requestIdentifier)
</ins><span class="cx"> {
</span><del>-    if (WebConsoleAgent* consoleAgent = instrumentingAgents-&gt;webConsoleAgent())
</del><ins>+    if (WebConsoleAgent* consoleAgent = instrumentingAgents.webConsoleAgent())
</ins><span class="cx">         consoleAgent-&gt;addMessageToConsole(source, type, level, message, callStack, requestIdentifier);
</span><span class="cx">     // FIXME: This should just pass the message on to the debugger agent. JavaScriptCore InspectorDebuggerAgent should know Console MessageTypes.
</span><del>-    if (InspectorDebuggerAgent* debuggerAgent = instrumentingAgents-&gt;inspectorDebuggerAgent()) {
</del><ins>+    if (InspectorDebuggerAgent* debuggerAgent = instrumentingAgents.inspectorDebuggerAgent()) {
</ins><span class="cx">         if (isConsoleAssertMessage(source, type))
</span><span class="cx">             debuggerAgent-&gt;handleConsoleAssert(message);
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorInstrumentation::addMessageToConsoleImpl(InstrumentingAgents* instrumentingAgents, MessageSource source, MessageType type, MessageLevel level, const String&amp; message, JSC::ExecState* state, PassRefPtr&lt;ScriptArguments&gt; arguments, unsigned long requestIdentifier)
</del><ins>+void InspectorInstrumentation::addMessageToConsoleImpl(InstrumentingAgents&amp; instrumentingAgents, MessageSource source, MessageType type, MessageLevel level, const String&amp; message, JSC::ExecState* state, PassRefPtr&lt;ScriptArguments&gt; arguments, unsigned long requestIdentifier)
</ins><span class="cx"> {
</span><del>-    if (WebConsoleAgent* consoleAgent = instrumentingAgents-&gt;webConsoleAgent())
</del><ins>+    if (WebConsoleAgent* consoleAgent = instrumentingAgents.webConsoleAgent())
</ins><span class="cx">         consoleAgent-&gt;addMessageToConsole(source, type, level, message, state, arguments, requestIdentifier);
</span><span class="cx">     // FIXME: This should just pass the message on to the debugger agent. JavaScriptCore InspectorDebuggerAgent should know Console MessageTypes.
</span><del>-    if (InspectorDebuggerAgent* debuggerAgent = instrumentingAgents-&gt;inspectorDebuggerAgent()) {
</del><ins>+    if (InspectorDebuggerAgent* debuggerAgent = instrumentingAgents.inspectorDebuggerAgent()) {
</ins><span class="cx">         if (isConsoleAssertMessage(source, type))
</span><span class="cx">             debuggerAgent-&gt;handleConsoleAssert(message);
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorInstrumentation::addMessageToConsoleImpl(InstrumentingAgents* instrumentingAgents, MessageSource source, MessageType type, MessageLevel level, const String&amp; message, const String&amp; scriptID, unsigned lineNumber, unsigned columnNumber, JSC::ExecState* state, unsigned long requestIdentifier)
</del><ins>+void InspectorInstrumentation::addMessageToConsoleImpl(InstrumentingAgents&amp; instrumentingAgents, MessageSource source, MessageType type, MessageLevel level, const String&amp; message, const String&amp; scriptID, unsigned lineNumber, unsigned columnNumber, JSC::ExecState* state, unsigned long requestIdentifier)
</ins><span class="cx"> {
</span><del>-    if (WebConsoleAgent* consoleAgent = instrumentingAgents-&gt;webConsoleAgent())
</del><ins>+    if (WebConsoleAgent* consoleAgent = instrumentingAgents.webConsoleAgent())
</ins><span class="cx">         consoleAgent-&gt;addMessageToConsole(source, type, level, message, scriptID, lineNumber, columnNumber, state, requestIdentifier);
</span><span class="cx">     // FIXME: This should just pass the message on to the debugger agent. JavaScriptCore InspectorDebuggerAgent should know Console MessageTypes.
</span><del>-    if (InspectorDebuggerAgent* debuggerAgent = instrumentingAgents-&gt;inspectorDebuggerAgent()) {
</del><ins>+    if (InspectorDebuggerAgent* debuggerAgent = instrumentingAgents.inspectorDebuggerAgent()) {
</ins><span class="cx">         if (isConsoleAssertMessage(source, type))
</span><span class="cx">             debuggerAgent-&gt;handleConsoleAssert(message);
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorInstrumentation::consoleCountImpl(InstrumentingAgents* instrumentingAgents, JSC::ExecState* state, PassRefPtr&lt;ScriptArguments&gt; arguments)
</del><ins>+void InspectorInstrumentation::consoleCountImpl(InstrumentingAgents&amp; instrumentingAgents, JSC::ExecState* state, PassRefPtr&lt;ScriptArguments&gt; arguments)
</ins><span class="cx"> {
</span><del>-    if (WebConsoleAgent* consoleAgent = instrumentingAgents-&gt;webConsoleAgent())
</del><ins>+    if (WebConsoleAgent* consoleAgent = instrumentingAgents.webConsoleAgent())
</ins><span class="cx">         consoleAgent-&gt;count(state, arguments);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorInstrumentation::startConsoleTimingImpl(InstrumentingAgents* instrumentingAgents, Frame* frame, const String&amp; title)
</del><ins>+void InspectorInstrumentation::startConsoleTimingImpl(InstrumentingAgents&amp; instrumentingAgents, Frame&amp; frame, const String&amp; title)
</ins><span class="cx"> {
</span><del>-    if (InspectorTimelineAgent* timelineAgent = instrumentingAgents-&gt;inspectorTimelineAgent())
-        timelineAgent-&gt;time(frame, title);
-    if (WebConsoleAgent* consoleAgent = instrumentingAgents-&gt;webConsoleAgent())
</del><ins>+    if (InspectorTimelineAgent* timelineAgent = instrumentingAgents.inspectorTimelineAgent())
+        timelineAgent-&gt;time(&amp;frame, title);
+    if (WebConsoleAgent* consoleAgent = instrumentingAgents.webConsoleAgent())
</ins><span class="cx">         consoleAgent-&gt;startTiming(title);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorInstrumentation::stopConsoleTimingImpl(InstrumentingAgents* instrumentingAgents, Frame* frame, const String&amp; title, PassRefPtr&lt;ScriptCallStack&gt; stack)
</del><ins>+void InspectorInstrumentation::stopConsoleTimingImpl(InstrumentingAgents&amp; instrumentingAgents, Frame&amp; frame, const String&amp; title, PassRefPtr&lt;ScriptCallStack&gt; stack)
</ins><span class="cx"> {
</span><del>-    if (WebConsoleAgent* consoleAgent = instrumentingAgents-&gt;webConsoleAgent())
</del><ins>+    if (WebConsoleAgent* consoleAgent = instrumentingAgents.webConsoleAgent())
</ins><span class="cx">         consoleAgent-&gt;stopTiming(title, stack);
</span><del>-    if (InspectorTimelineAgent* timelineAgent = instrumentingAgents-&gt;inspectorTimelineAgent())
-        timelineAgent-&gt;timeEnd(frame, title);
</del><ins>+    if (InspectorTimelineAgent* timelineAgent = instrumentingAgents.inspectorTimelineAgent())
+        timelineAgent-&gt;timeEnd(&amp;frame, title);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorInstrumentation::consoleTimeStampImpl(InstrumentingAgents* instrumentingAgents, Frame* frame, PassRefPtr&lt;ScriptArguments&gt; arguments)
</del><ins>+void InspectorInstrumentation::consoleTimeStampImpl(InstrumentingAgents&amp; instrumentingAgents, Frame&amp; frame, PassRefPtr&lt;ScriptArguments&gt; arguments)
</ins><span class="cx"> {
</span><del>-    if (InspectorTimelineAgent* timelineAgent = instrumentingAgents-&gt;inspectorTimelineAgent()) {
</del><ins>+    if (InspectorTimelineAgent* timelineAgent = instrumentingAgents.inspectorTimelineAgent()) {
</ins><span class="cx">         String message;
</span><span class="cx">         arguments-&gt;getFirstArgumentAsString(message);
</span><del>-        timelineAgent-&gt;didTimeStamp(frame, message);
</del><ins>+        timelineAgent-&gt;didTimeStamp(&amp;frame, message);
</ins><span class="cx">      }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorInstrumentation::startProfilingImpl(InstrumentingAgents* instrumentingAgents, JSC::ExecState* exec, const String&amp; title)
</del><ins>+void InspectorInstrumentation::startProfilingImpl(InstrumentingAgents&amp; instrumentingAgents, JSC::ExecState* exec, const String&amp; title)
</ins><span class="cx"> {
</span><del>-    if (InspectorTimelineAgent* timelineAgent = instrumentingAgents-&gt;persistentInspectorTimelineAgent())
</del><ins>+    if (InspectorTimelineAgent* timelineAgent = instrumentingAgents.persistentInspectorTimelineAgent())
</ins><span class="cx">         timelineAgent-&gt;startFromConsole(exec, title);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-PassRefPtr&lt;JSC::Profile&gt; InspectorInstrumentation::stopProfilingImpl(InstrumentingAgents* instrumentingAgents, JSC::ExecState* exec, const String&amp; title)
</del><ins>+PassRefPtr&lt;JSC::Profile&gt; InspectorInstrumentation::stopProfilingImpl(InstrumentingAgents&amp; instrumentingAgents, JSC::ExecState* exec, const String&amp; title)
</ins><span class="cx"> {
</span><del>-    if (InspectorTimelineAgent* timelineAgent = instrumentingAgents-&gt;persistentInspectorTimelineAgent())
</del><ins>+    if (InspectorTimelineAgent* timelineAgent = instrumentingAgents.persistentInspectorTimelineAgent())
</ins><span class="cx">         return timelineAgent-&gt;stopFromConsole(exec, title);
</span><span class="cx">     return nullptr;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(SQL_DATABASE)
</span><del>-void InspectorInstrumentation::didOpenDatabaseImpl(InstrumentingAgents* instrumentingAgents, PassRefPtr&lt;Database&gt; database, const String&amp; domain, const String&amp; name, const String&amp; version)
</del><ins>+void InspectorInstrumentation::didOpenDatabaseImpl(InstrumentingAgents&amp; instrumentingAgents, PassRefPtr&lt;Database&gt; database, const String&amp; domain, const String&amp; name, const String&amp; version)
</ins><span class="cx"> {
</span><del>-    if (!instrumentingAgents-&gt;inspectorEnvironment().developerExtrasEnabled())
</del><ins>+    if (!instrumentingAgents.inspectorEnvironment().developerExtrasEnabled())
</ins><span class="cx">         return;
</span><del>-    if (InspectorDatabaseAgent* dbAgent = instrumentingAgents-&gt;inspectorDatabaseAgent())
</del><ins>+    if (InspectorDatabaseAgent* dbAgent = instrumentingAgents.inspectorDatabaseAgent())
</ins><span class="cx">         dbAgent-&gt;didOpenDatabase(database, domain, name, version);
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-void InspectorInstrumentation::didDispatchDOMStorageEventImpl(InstrumentingAgents* instrumentingAgents, const String&amp; key, const String&amp; oldValue, const String&amp; newValue, StorageType storageType, SecurityOrigin* securityOrigin, Page* page)
</del><ins>+void InspectorInstrumentation::didDispatchDOMStorageEventImpl(InstrumentingAgents&amp; instrumentingAgents, const String&amp; key, const String&amp; oldValue, const String&amp; newValue, StorageType storageType, SecurityOrigin* securityOrigin, Page* page)
</ins><span class="cx"> {
</span><del>-    if (InspectorDOMStorageAgent* domStorageAgent = instrumentingAgents-&gt;inspectorDOMStorageAgent())
</del><ins>+    if (InspectorDOMStorageAgent* domStorageAgent = instrumentingAgents.inspectorDOMStorageAgent())
</ins><span class="cx">         domStorageAgent-&gt;didDispatchDOMStorageEvent(key, oldValue, newValue, storageType, securityOrigin, page);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool InspectorInstrumentation::shouldPauseDedicatedWorkerOnStartImpl(InstrumentingAgents* instrumentingAgents)
</del><ins>+bool InspectorInstrumentation::shouldPauseDedicatedWorkerOnStartImpl(InstrumentingAgents&amp; instrumentingAgents)
</ins><span class="cx"> {
</span><del>-    if (InspectorWorkerAgent* workerAgent = instrumentingAgents-&gt;inspectorWorkerAgent())
</del><ins>+    if (InspectorWorkerAgent* workerAgent = instrumentingAgents.inspectorWorkerAgent())
</ins><span class="cx">         return workerAgent-&gt;shouldPauseDedicatedWorkerOnStart();
</span><span class="cx">     return false;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorInstrumentation::didStartWorkerGlobalScopeImpl(InstrumentingAgents* instrumentingAgents, WorkerGlobalScopeProxy* workerGlobalScopeProxy, const URL&amp; url)
</del><ins>+void InspectorInstrumentation::didStartWorkerGlobalScopeImpl(InstrumentingAgents&amp; instrumentingAgents, WorkerGlobalScopeProxy* workerGlobalScopeProxy, const URL&amp; url)
</ins><span class="cx"> {
</span><del>-    if (InspectorWorkerAgent* workerAgent = instrumentingAgents-&gt;inspectorWorkerAgent())
</del><ins>+    if (InspectorWorkerAgent* workerAgent = instrumentingAgents.inspectorWorkerAgent())
</ins><span class="cx">         workerAgent-&gt;didStartWorkerGlobalScope(workerGlobalScopeProxy, url);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -991,160 +997,162 @@
</span><span class="cx"> {
</span><span class="cx">     if (workerThreadStartMode != PauseWorkerGlobalScopeOnStart)
</span><span class="cx">         return;
</span><del>-    InstrumentingAgents* instrumentingAgents = instrumentationForWorkerGlobalScope(workerGlobalScope);
</del><ins>+
+    InstrumentingAgents* instrumentingAgents = instrumentingAgentsForWorkerGlobalScope(workerGlobalScope);
</ins><span class="cx">     if (!instrumentingAgents)
</span><span class="cx">         return;
</span><ins>+
</ins><span class="cx">     if (WorkerRuntimeAgent* runtimeAgent = instrumentingAgents-&gt;workerRuntimeAgent())
</span><span class="cx">         runtimeAgent-&gt;pauseWorkerGlobalScope(workerGlobalScope);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorInstrumentation::workerGlobalScopeTerminatedImpl(InstrumentingAgents* instrumentingAgents, WorkerGlobalScopeProxy* proxy)
</del><ins>+void InspectorInstrumentation::workerGlobalScopeTerminatedImpl(InstrumentingAgents&amp; instrumentingAgents, WorkerGlobalScopeProxy* proxy)
</ins><span class="cx"> {
</span><del>-    if (InspectorWorkerAgent* workerAgent = instrumentingAgents-&gt;inspectorWorkerAgent())
</del><ins>+    if (InspectorWorkerAgent* workerAgent = instrumentingAgents.inspectorWorkerAgent())
</ins><span class="cx">         workerAgent-&gt;workerGlobalScopeTerminated(proxy);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(WEB_SOCKETS)
</span><del>-void InspectorInstrumentation::didCreateWebSocketImpl(InstrumentingAgents* instrumentingAgents, unsigned long identifier, const URL&amp; requestURL, const URL&amp;, const String&amp; protocol, Document* document)
</del><ins>+void InspectorInstrumentation::didCreateWebSocketImpl(InstrumentingAgents&amp; instrumentingAgents, unsigned long identifier, const URL&amp; requestURL, const URL&amp;, const String&amp; protocol, Document* document)
</ins><span class="cx"> {
</span><del>-    if (!instrumentingAgents-&gt;inspectorEnvironment().developerExtrasEnabled())
</del><ins>+    if (!instrumentingAgents.inspectorEnvironment().developerExtrasEnabled())
</ins><span class="cx">         return;
</span><del>-    if (InspectorResourceAgent* resourceAgent = instrumentingAgents-&gt;inspectorResourceAgent())
</del><ins>+    if (InspectorResourceAgent* resourceAgent = instrumentingAgents.inspectorResourceAgent())
</ins><span class="cx">         resourceAgent-&gt;didCreateWebSocket(identifier, requestURL);
</span><del>-    if (InspectorTimelineAgent* timelineAgent = instrumentingAgents-&gt;inspectorTimelineAgent())
</del><ins>+    if (InspectorTimelineAgent* timelineAgent = instrumentingAgents.inspectorTimelineAgent())
</ins><span class="cx">         timelineAgent-&gt;didCreateWebSocket(identifier, requestURL, protocol, document-&gt;frame());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorInstrumentation::willSendWebSocketHandshakeRequestImpl(InstrumentingAgents* instrumentingAgents, unsigned long identifier, const ResourceRequest&amp; request, Document* document)
</del><ins>+void InspectorInstrumentation::willSendWebSocketHandshakeRequestImpl(InstrumentingAgents&amp; instrumentingAgents, unsigned long identifier, const ResourceRequest&amp; request, Document* document)
</ins><span class="cx"> {
</span><del>-    if (InspectorResourceAgent* resourceAgent = instrumentingAgents-&gt;inspectorResourceAgent())
</del><ins>+    if (InspectorResourceAgent* resourceAgent = instrumentingAgents.inspectorResourceAgent())
</ins><span class="cx">         resourceAgent-&gt;willSendWebSocketHandshakeRequest(identifier, request);
</span><del>-    if (InspectorTimelineAgent* timelineAgent = instrumentingAgents-&gt;inspectorTimelineAgent())
</del><ins>+    if (InspectorTimelineAgent* timelineAgent = instrumentingAgents.inspectorTimelineAgent())
</ins><span class="cx">         timelineAgent-&gt;willSendWebSocketHandshakeRequest(identifier, document-&gt;frame());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorInstrumentation::didReceiveWebSocketHandshakeResponseImpl(InstrumentingAgents* instrumentingAgents, unsigned long identifier, const ResourceResponse&amp; response, Document* document)
</del><ins>+void InspectorInstrumentation::didReceiveWebSocketHandshakeResponseImpl(InstrumentingAgents&amp; instrumentingAgents, unsigned long identifier, const ResourceResponse&amp; response, Document* document)
</ins><span class="cx"> {
</span><del>-    if (InspectorResourceAgent* resourceAgent = instrumentingAgents-&gt;inspectorResourceAgent())
</del><ins>+    if (InspectorResourceAgent* resourceAgent = instrumentingAgents.inspectorResourceAgent())
</ins><span class="cx">         resourceAgent-&gt;didReceiveWebSocketHandshakeResponse(identifier, response);
</span><del>-    if (InspectorTimelineAgent* timelineAgent = instrumentingAgents-&gt;inspectorTimelineAgent())
</del><ins>+    if (InspectorTimelineAgent* timelineAgent = instrumentingAgents.inspectorTimelineAgent())
</ins><span class="cx">         timelineAgent-&gt;didReceiveWebSocketHandshakeResponse(identifier, document-&gt;frame());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorInstrumentation::didCloseWebSocketImpl(InstrumentingAgents* instrumentingAgents, unsigned long identifier, Document* document)
</del><ins>+void InspectorInstrumentation::didCloseWebSocketImpl(InstrumentingAgents&amp; instrumentingAgents, unsigned long identifier, Document* document)
</ins><span class="cx"> {
</span><del>-    if (InspectorResourceAgent* resourceAgent = instrumentingAgents-&gt;inspectorResourceAgent())
</del><ins>+    if (InspectorResourceAgent* resourceAgent = instrumentingAgents.inspectorResourceAgent())
</ins><span class="cx">         resourceAgent-&gt;didCloseWebSocket(identifier);
</span><del>-    if (InspectorTimelineAgent* timelineAgent = instrumentingAgents-&gt;inspectorTimelineAgent())
</del><ins>+    if (InspectorTimelineAgent* timelineAgent = instrumentingAgents.inspectorTimelineAgent())
</ins><span class="cx">         timelineAgent-&gt;didDestroyWebSocket(identifier, document-&gt;frame());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorInstrumentation::didReceiveWebSocketFrameImpl(InstrumentingAgents* instrumentingAgents, unsigned long identifier, const WebSocketFrame&amp; frame)
</del><ins>+void InspectorInstrumentation::didReceiveWebSocketFrameImpl(InstrumentingAgents&amp; instrumentingAgents, unsigned long identifier, const WebSocketFrame&amp; frame)
</ins><span class="cx"> {
</span><del>-    if (InspectorResourceAgent* resourceAgent = instrumentingAgents-&gt;inspectorResourceAgent())
</del><ins>+    if (InspectorResourceAgent* resourceAgent = instrumentingAgents.inspectorResourceAgent())
</ins><span class="cx">         resourceAgent-&gt;didReceiveWebSocketFrame(identifier, frame);
</span><span class="cx"> }
</span><del>-void InspectorInstrumentation::didReceiveWebSocketFrameErrorImpl(InstrumentingAgents* instrumentingAgents, unsigned long identifier, const String&amp; errorMessage)
</del><ins>+void InspectorInstrumentation::didReceiveWebSocketFrameErrorImpl(InstrumentingAgents&amp; instrumentingAgents, unsigned long identifier, const String&amp; errorMessage)
</ins><span class="cx"> {
</span><del>-    if (InspectorResourceAgent* resourceAgent = instrumentingAgents-&gt;inspectorResourceAgent())
</del><ins>+    if (InspectorResourceAgent* resourceAgent = instrumentingAgents.inspectorResourceAgent())
</ins><span class="cx">         resourceAgent-&gt;didReceiveWebSocketFrameError(identifier, errorMessage);
</span><span class="cx"> }
</span><del>-void InspectorInstrumentation::didSendWebSocketFrameImpl(InstrumentingAgents* instrumentingAgents, unsigned long identifier, const WebSocketFrame&amp; frame)
</del><ins>+void InspectorInstrumentation::didSendWebSocketFrameImpl(InstrumentingAgents&amp; instrumentingAgents, unsigned long identifier, const WebSocketFrame&amp; frame)
</ins><span class="cx"> {
</span><del>-    if (InspectorResourceAgent* resourceAgent = instrumentingAgents-&gt;inspectorResourceAgent())
</del><ins>+    if (InspectorResourceAgent* resourceAgent = instrumentingAgents.inspectorResourceAgent())
</ins><span class="cx">         resourceAgent-&gt;didSendWebSocketFrame(identifier, frame);
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(WEB_REPLAY)
</span><del>-void InspectorInstrumentation::sessionCreatedImpl(InstrumentingAgents* instrumentingAgents, PassRefPtr&lt;ReplaySession&gt; session)
</del><ins>+void InspectorInstrumentation::sessionCreatedImpl(InstrumentingAgents&amp; instrumentingAgents, PassRefPtr&lt;ReplaySession&gt; session)
</ins><span class="cx"> {
</span><del>-    if (InspectorReplayAgent* replayAgent = instrumentingAgents-&gt;inspectorReplayAgent())
</del><ins>+    if (InspectorReplayAgent* replayAgent = instrumentingAgents.inspectorReplayAgent())
</ins><span class="cx">         replayAgent-&gt;sessionCreated(session);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorInstrumentation::sessionLoadedImpl(InstrumentingAgents* instrumentingAgents, PassRefPtr&lt;ReplaySession&gt; session)
</del><ins>+void InspectorInstrumentation::sessionLoadedImpl(InstrumentingAgents&amp; instrumentingAgents, PassRefPtr&lt;ReplaySession&gt; session)
</ins><span class="cx"> {
</span><del>-    if (InspectorReplayAgent* replayAgent = instrumentingAgents-&gt;inspectorReplayAgent())
</del><ins>+    if (InspectorReplayAgent* replayAgent = instrumentingAgents.inspectorReplayAgent())
</ins><span class="cx">         replayAgent-&gt;sessionLoaded(session);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorInstrumentation::sessionModifiedImpl(InstrumentingAgents* instrumentingAgents, PassRefPtr&lt;ReplaySession&gt; session)
</del><ins>+void InspectorInstrumentation::sessionModifiedImpl(InstrumentingAgents&amp; instrumentingAgents, PassRefPtr&lt;ReplaySession&gt; session)
</ins><span class="cx"> {
</span><del>-    if (InspectorReplayAgent* replayAgent = instrumentingAgents-&gt;inspectorReplayAgent())
</del><ins>+    if (InspectorReplayAgent* replayAgent = instrumentingAgents.inspectorReplayAgent())
</ins><span class="cx">         replayAgent-&gt;sessionModified(session);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorInstrumentation::segmentCreatedImpl(InstrumentingAgents* instrumentingAgents, PassRefPtr&lt;ReplaySessionSegment&gt; segment)
</del><ins>+void InspectorInstrumentation::segmentCreatedImpl(InstrumentingAgents&amp; instrumentingAgents, PassRefPtr&lt;ReplaySessionSegment&gt; segment)
</ins><span class="cx"> {
</span><del>-    if (InspectorReplayAgent* replayAgent = instrumentingAgents-&gt;inspectorReplayAgent())
</del><ins>+    if (InspectorReplayAgent* replayAgent = instrumentingAgents.inspectorReplayAgent())
</ins><span class="cx">         replayAgent-&gt;segmentCreated(segment);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorInstrumentation::segmentCompletedImpl(InstrumentingAgents* instrumentingAgents, PassRefPtr&lt;ReplaySessionSegment&gt; segment)
</del><ins>+void InspectorInstrumentation::segmentCompletedImpl(InstrumentingAgents&amp; instrumentingAgents, PassRefPtr&lt;ReplaySessionSegment&gt; segment)
</ins><span class="cx"> {
</span><del>-    if (InspectorReplayAgent* replayAgent = instrumentingAgents-&gt;inspectorReplayAgent())
</del><ins>+    if (InspectorReplayAgent* replayAgent = instrumentingAgents.inspectorReplayAgent())
</ins><span class="cx">         replayAgent-&gt;segmentCompleted(segment);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorInstrumentation::segmentLoadedImpl(InstrumentingAgents* instrumentingAgents, PassRefPtr&lt;ReplaySessionSegment&gt; segment)
</del><ins>+void InspectorInstrumentation::segmentLoadedImpl(InstrumentingAgents&amp; instrumentingAgents, PassRefPtr&lt;ReplaySessionSegment&gt; segment)
</ins><span class="cx"> {
</span><del>-    if (InspectorReplayAgent* replayAgent = instrumentingAgents-&gt;inspectorReplayAgent())
</del><ins>+    if (InspectorReplayAgent* replayAgent = instrumentingAgents.inspectorReplayAgent())
</ins><span class="cx">         replayAgent-&gt;segmentLoaded(segment);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorInstrumentation::segmentUnloadedImpl(InstrumentingAgents* instrumentingAgents)
</del><ins>+void InspectorInstrumentation::segmentUnloadedImpl(InstrumentingAgents&amp; instrumentingAgents)
</ins><span class="cx"> {
</span><del>-    if (InspectorReplayAgent* replayAgent = instrumentingAgents-&gt;inspectorReplayAgent())
</del><ins>+    if (InspectorReplayAgent* replayAgent = instrumentingAgents.inspectorReplayAgent())
</ins><span class="cx">         replayAgent-&gt;segmentUnloaded();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorInstrumentation::captureStartedImpl(InstrumentingAgents* instrumentingAgents)
</del><ins>+void InspectorInstrumentation::captureStartedImpl(InstrumentingAgents&amp; instrumentingAgents)
</ins><span class="cx"> {
</span><del>-    if (InspectorReplayAgent* replayAgent = instrumentingAgents-&gt;inspectorReplayAgent())
</del><ins>+    if (InspectorReplayAgent* replayAgent = instrumentingAgents.inspectorReplayAgent())
</ins><span class="cx">         replayAgent-&gt;captureStarted();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorInstrumentation::captureStoppedImpl(InstrumentingAgents* instrumentingAgents)
</del><ins>+void InspectorInstrumentation::captureStoppedImpl(InstrumentingAgents&amp; instrumentingAgents)
</ins><span class="cx"> {
</span><del>-    if (InspectorReplayAgent* replayAgent = instrumentingAgents-&gt;inspectorReplayAgent())
</del><ins>+    if (InspectorReplayAgent* replayAgent = instrumentingAgents.inspectorReplayAgent())
</ins><span class="cx">         replayAgent-&gt;captureStopped();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorInstrumentation::playbackStartedImpl(InstrumentingAgents* instrumentingAgents)
</del><ins>+void InspectorInstrumentation::playbackStartedImpl(InstrumentingAgents&amp; instrumentingAgents)
</ins><span class="cx"> {
</span><del>-    if (InspectorReplayAgent* replayAgent = instrumentingAgents-&gt;inspectorReplayAgent())
</del><ins>+    if (InspectorReplayAgent* replayAgent = instrumentingAgents.inspectorReplayAgent())
</ins><span class="cx">         replayAgent-&gt;playbackStarted();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorInstrumentation::playbackPausedImpl(InstrumentingAgents* instrumentingAgents, const ReplayPosition&amp; position)
</del><ins>+void InspectorInstrumentation::playbackPausedImpl(InstrumentingAgents&amp; instrumentingAgents, const ReplayPosition&amp; position)
</ins><span class="cx"> {
</span><del>-    if (InspectorReplayAgent* replayAgent = instrumentingAgents-&gt;inspectorReplayAgent())
</del><ins>+    if (InspectorReplayAgent* replayAgent = instrumentingAgents.inspectorReplayAgent())
</ins><span class="cx">         replayAgent-&gt;playbackPaused(position);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorInstrumentation::playbackHitPositionImpl(InstrumentingAgents* instrumentingAgents, const ReplayPosition&amp; position)
</del><ins>+void InspectorInstrumentation::playbackHitPositionImpl(InstrumentingAgents&amp; instrumentingAgents, const ReplayPosition&amp; position)
</ins><span class="cx"> {
</span><del>-    if (InspectorReplayAgent* replayAgent = instrumentingAgents-&gt;inspectorReplayAgent())
</del><ins>+    if (InspectorReplayAgent* replayAgent = instrumentingAgents.inspectorReplayAgent())
</ins><span class="cx">         replayAgent-&gt;playbackHitPosition(position);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorInstrumentation::playbackFinishedImpl(InstrumentingAgents* instrumentingAgents)
</del><ins>+void InspectorInstrumentation::playbackFinishedImpl(InstrumentingAgents&amp; instrumentingAgents)
</ins><span class="cx"> {
</span><del>-    if (InspectorReplayAgent* replayAgent = instrumentingAgents-&gt;inspectorReplayAgent())
</del><ins>+    if (InspectorReplayAgent* replayAgent = instrumentingAgents.inspectorReplayAgent())
</ins><span class="cx">         replayAgent-&gt;playbackFinished();
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-void InspectorInstrumentation::networkStateChangedImpl(InstrumentingAgents* instrumentingAgents)
</del><ins>+void InspectorInstrumentation::networkStateChangedImpl(InstrumentingAgents&amp; instrumentingAgents)
</ins><span class="cx"> {
</span><del>-    if (InspectorApplicationCacheAgent* applicationCacheAgent = instrumentingAgents-&gt;inspectorApplicationCacheAgent())
</del><ins>+    if (InspectorApplicationCacheAgent* applicationCacheAgent = instrumentingAgents.inspectorApplicationCacheAgent())
</ins><span class="cx">         applicationCacheAgent-&gt;networkStateChanged();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorInstrumentation::updateApplicationCacheStatusImpl(InstrumentingAgents* instrumentingAgents, Frame* frame)
</del><ins>+void InspectorInstrumentation::updateApplicationCacheStatusImpl(InstrumentingAgents&amp; instrumentingAgents, Frame* frame)
</ins><span class="cx"> {
</span><del>-    if (InspectorApplicationCacheAgent* applicationCacheAgent = instrumentingAgents-&gt;inspectorApplicationCacheAgent())
</del><ins>+    if (InspectorApplicationCacheAgent* applicationCacheAgent = instrumentingAgents.inspectorApplicationCacheAgent())
</ins><span class="cx">         applicationCacheAgent-&gt;updateApplicationCacheStatus(frame);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -1172,40 +1180,40 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorInstrumentation::pauseOnNativeEventIfNeeded(InstrumentingAgents* instrumentingAgents, bool isDOMEvent, const String&amp; eventName, bool synchronous)
</del><ins>+void InspectorInstrumentation::pauseOnNativeEventIfNeeded(InstrumentingAgents&amp; instrumentingAgents, bool isDOMEvent, const String&amp; eventName, bool synchronous)
</ins><span class="cx"> {
</span><del>-    if (InspectorDOMDebuggerAgent* domDebuggerAgent = instrumentingAgents-&gt;inspectorDOMDebuggerAgent())
</del><ins>+    if (InspectorDOMDebuggerAgent* domDebuggerAgent = instrumentingAgents.inspectorDOMDebuggerAgent())
</ins><span class="cx">         domDebuggerAgent-&gt;pauseOnNativeEventIfNeeded(isDOMEvent, eventName, synchronous);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorInstrumentation::cancelPauseOnNativeEvent(InstrumentingAgents* instrumentingAgents)
</del><ins>+void InspectorInstrumentation::cancelPauseOnNativeEvent(InstrumentingAgents&amp; instrumentingAgents)
</ins><span class="cx"> {
</span><del>-    if (InspectorDebuggerAgent* debuggerAgent = instrumentingAgents-&gt;inspectorDebuggerAgent())
</del><ins>+    if (InspectorDebuggerAgent* debuggerAgent = instrumentingAgents.inspectorDebuggerAgent())
</ins><span class="cx">         debuggerAgent-&gt;cancelPauseOnNextStatement();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorInstrumentation::didRequestAnimationFrameImpl(InstrumentingAgents* instrumentingAgents, int callbackId, Frame* frame)
</del><ins>+void InspectorInstrumentation::didRequestAnimationFrameImpl(InstrumentingAgents&amp; instrumentingAgents, int callbackId, Frame* frame)
</ins><span class="cx"> {
</span><span class="cx">     pauseOnNativeEventIfNeeded(instrumentingAgents, false, requestAnimationFrameEventName, true);
</span><span class="cx"> 
</span><del>-    if (InspectorTimelineAgent* timelineAgent = instrumentingAgents-&gt;inspectorTimelineAgent())
</del><ins>+    if (InspectorTimelineAgent* timelineAgent = instrumentingAgents.inspectorTimelineAgent())
</ins><span class="cx">         timelineAgent-&gt;didRequestAnimationFrame(callbackId, frame);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorInstrumentation::didCancelAnimationFrameImpl(InstrumentingAgents* instrumentingAgents, int callbackId, Frame* frame)
</del><ins>+void InspectorInstrumentation::didCancelAnimationFrameImpl(InstrumentingAgents&amp; instrumentingAgents, int callbackId, Frame* frame)
</ins><span class="cx"> {
</span><span class="cx">     pauseOnNativeEventIfNeeded(instrumentingAgents, false, cancelAnimationFrameEventName, true);
</span><span class="cx"> 
</span><del>-    if (InspectorTimelineAgent* timelineAgent = instrumentingAgents-&gt;inspectorTimelineAgent())
</del><ins>+    if (InspectorTimelineAgent* timelineAgent = instrumentingAgents.inspectorTimelineAgent())
</ins><span class="cx">         timelineAgent-&gt;didCancelAnimationFrame(callbackId, frame);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-InspectorInstrumentationCookie InspectorInstrumentation::willFireAnimationFrameImpl(InstrumentingAgents* instrumentingAgents, int callbackId, Frame* frame)
</del><ins>+InspectorInstrumentationCookie InspectorInstrumentation::willFireAnimationFrameImpl(InstrumentingAgents&amp; instrumentingAgents, int callbackId, Frame* frame)
</ins><span class="cx"> {
</span><span class="cx">     pauseOnNativeEventIfNeeded(instrumentingAgents, false, animationFrameFiredEventName, false);
</span><span class="cx"> 
</span><span class="cx">     int timelineAgentId = 0;
</span><del>-    if (InspectorTimelineAgent* timelineAgent = instrumentingAgents-&gt;inspectorTimelineAgent()) {
</del><ins>+    if (InspectorTimelineAgent* timelineAgent = instrumentingAgents.inspectorTimelineAgent()) {
</ins><span class="cx">         timelineAgent-&gt;willFireAnimationFrame(callbackId, frame);
</span><span class="cx">         timelineAgentId = timelineAgent-&gt;id();
</span><span class="cx">     }
</span><span class="lines">@@ -1218,28 +1226,31 @@
</span><span class="cx">         timelineAgent-&gt;didFireAnimationFrame();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorInstrumentation::registerInstrumentingAgents(InstrumentingAgents* instrumentingAgents)
</del><ins>+void InspectorInstrumentation::registerInstrumentingAgents(InstrumentingAgents&amp; instrumentingAgents)
</ins><span class="cx"> {
</span><del>-    if (!instrumentingAgentsSet)
-        instrumentingAgentsSet = new HashSet&lt;InstrumentingAgents*&gt;();
-    instrumentingAgentsSet-&gt;add(instrumentingAgents);
</del><ins>+    if (!s_instrumentingAgentsSet)
+        s_instrumentingAgentsSet = new HashSet&lt;InstrumentingAgents*&gt;();
+
+    s_instrumentingAgentsSet-&gt;add(&amp;instrumentingAgents);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorInstrumentation::unregisterInstrumentingAgents(InstrumentingAgents* instrumentingAgents)
</del><ins>+void InspectorInstrumentation::unregisterInstrumentingAgents(InstrumentingAgents&amp; instrumentingAgents)
</ins><span class="cx"> {
</span><del>-    if (!instrumentingAgentsSet)
</del><ins>+    if (!s_instrumentingAgentsSet)
</ins><span class="cx">         return;
</span><del>-    instrumentingAgentsSet-&gt;remove(instrumentingAgents);
-    if (instrumentingAgentsSet-&gt;isEmpty()) {
-        delete instrumentingAgentsSet;
-        instrumentingAgentsSet = nullptr;
</del><ins>+
+    s_instrumentingAgentsSet-&gt;remove(&amp;instrumentingAgents);
+    if (s_instrumentingAgentsSet-&gt;isEmpty()) {
+        delete s_instrumentingAgentsSet;
+        s_instrumentingAgentsSet = nullptr;
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> InspectorTimelineAgent* InspectorInstrumentation::retrieveTimelineAgent(const InspectorInstrumentationCookie&amp; cookie)
</span><span class="cx"> {
</span><del>-    if (!cookie.instrumentingAgents())
</del><ins>+    if (!cookie.isValid())
</ins><span class="cx">         return nullptr;
</span><ins>+
</ins><span class="cx">     InspectorTimelineAgent* timelineAgent = cookie.instrumentingAgents()-&gt;inspectorTimelineAgent();
</span><span class="cx">     if (timelineAgent &amp;&amp; cookie.hasMatchingTimelineAgentId(timelineAgent-&gt;id()))
</span><span class="cx">         return timelineAgent;
</span><span class="lines">@@ -1248,47 +1259,49 @@
</span><span class="cx"> 
</span><span class="cx"> InstrumentingAgents* InspectorInstrumentation::instrumentingAgentsForPage(Page* page)
</span><span class="cx"> {
</span><del>-    if (!page)
-        return nullptr;
-    return instrumentationForPage(page);
</del><ins>+    return page ? instrumentingAgentsForPage(*page) : nullptr;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+InstrumentingAgents* InspectorInstrumentation::instrumentingAgentsForPage(Page&amp; page)
+{
+    ASSERT(isMainThread());
+    return page.inspectorController().m_instrumentingAgents.get();
+}
+
</ins><span class="cx"> InstrumentingAgents* InspectorInstrumentation::instrumentingAgentsForRenderer(RenderObject* renderer)
</span><span class="cx"> {
</span><del>-    return instrumentingAgentsForFrame(&amp;renderer-&gt;frame());
</del><ins>+    return instrumentingAgentsForFrame(renderer-&gt;frame());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> InstrumentingAgents* InspectorInstrumentation::instrumentingAgentsForWorkerGlobalScope(WorkerGlobalScope* workerGlobalScope)
</span><span class="cx"> {
</span><del>-    if (!workerGlobalScope)
-        return nullptr;
-    return instrumentationForWorkerGlobalScope(workerGlobalScope);
</del><ins>+    return workerGlobalScope ? workerGlobalScope-&gt;workerInspectorController().m_instrumentingAgents.get() : nullptr;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> InstrumentingAgents* InspectorInstrumentation::instrumentingAgentsForNonDocumentContext(ScriptExecutionContext* context)
</span><span class="cx"> {
</span><span class="cx">     ASSERT(context);
</span><span class="cx">     if (is&lt;WorkerGlobalScope&gt;(*context))
</span><del>-        return instrumentationForWorkerGlobalScope(downcast&lt;WorkerGlobalScope&gt;(context));
</del><ins>+        return instrumentingAgentsForWorkerGlobalScope(downcast&lt;WorkerGlobalScope&gt;(context));
</ins><span class="cx">     return nullptr;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorInstrumentation::layerTreeDidChangeImpl(InstrumentingAgents* instrumentingAgents)
</del><ins>+void InspectorInstrumentation::layerTreeDidChangeImpl(InstrumentingAgents&amp; instrumentingAgents)
</ins><span class="cx"> {
</span><del>-    if (InspectorLayerTreeAgent* layerTreeAgent = instrumentingAgents-&gt;inspectorLayerTreeAgent())
</del><ins>+    if (InspectorLayerTreeAgent* layerTreeAgent = instrumentingAgents.inspectorLayerTreeAgent())
</ins><span class="cx">         layerTreeAgent-&gt;layerTreeDidChange();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorInstrumentation::renderLayerDestroyedImpl(InstrumentingAgents* instrumentingAgents, const RenderLayer* renderLayer)
</del><ins>+void InspectorInstrumentation::renderLayerDestroyedImpl(InstrumentingAgents&amp; instrumentingAgents, const RenderLayer&amp; renderLayer)
</ins><span class="cx"> {
</span><del>-    if (InspectorLayerTreeAgent* layerTreeAgent = instrumentingAgents-&gt;inspectorLayerTreeAgent())
-        layerTreeAgent-&gt;renderLayerDestroyed(renderLayer);
</del><ins>+    if (InspectorLayerTreeAgent* layerTreeAgent = instrumentingAgents.inspectorLayerTreeAgent())
+        layerTreeAgent-&gt;renderLayerDestroyed(&amp;renderLayer);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorInstrumentation::pseudoElementDestroyedImpl(InstrumentingAgents* instrumentingAgents, PseudoElement* pseudoElement)
</del><ins>+void InspectorInstrumentation::pseudoElementDestroyedImpl(InstrumentingAgents&amp; instrumentingAgents, PseudoElement&amp; pseudoElement)
</ins><span class="cx"> {
</span><del>-    if (InspectorLayerTreeAgent* layerTreeAgent = instrumentingAgents-&gt;inspectorLayerTreeAgent())
-        layerTreeAgent-&gt;pseudoElementDestroyed(pseudoElement);
</del><ins>+    if (InspectorLayerTreeAgent* layerTreeAgent = instrumentingAgents.inspectorLayerTreeAgent())
+        layerTreeAgent-&gt;pseudoElementDestroyed(&amp;pseudoElement);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorInspectorInstrumentationh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/InspectorInstrumentation.h (177924 => 177925)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/InspectorInstrumentation.h        2015-01-05 21:11:44 UTC (rev 177924)
+++ trunk/Source/WebCore/inspector/InspectorInstrumentation.h        2015-01-05 21:30:33 UTC (rev 177925)
</span><span class="lines">@@ -109,32 +109,32 @@
</span><span class="cx"> 
</span><span class="cx"> class InspectorInstrumentation {
</span><span class="cx"> public:
</span><del>-    static void didClearWindowObjectInWorld(Frame*, DOMWrapperWorld&amp;);
</del><ins>+    static void didClearWindowObjectInWorld(Frame&amp;, DOMWrapperWorld&amp;);
</ins><span class="cx">     static bool isDebuggerPaused(Frame*);
</span><span class="cx"> 
</span><del>-    static void willInsertDOMNode(Document*, Node* parent);
-    static void didInsertDOMNode(Document*, Node*);
-    static void willRemoveDOMNode(Document*, Node*);
-    static void didRemoveDOMNode(Document*, Node*);
-    static void willModifyDOMAttr(Document*, Element*, const AtomicString&amp; oldValue, const AtomicString&amp; newValue);
-    static void didModifyDOMAttr(Document*, Element*, const AtomicString&amp; name, const AtomicString&amp; value);
-    static void didRemoveDOMAttr(Document*, Element*, const AtomicString&amp; name);
-    static void characterDataModified(Document*, CharacterData*);
-    static void didInvalidateStyleAttr(Document*, Node*);
</del><ins>+    static void willInsertDOMNode(Document&amp;, Node&amp; parent);
+    static void didInsertDOMNode(Document&amp;, Node&amp;);
+    static void willRemoveDOMNode(Document&amp;, Node&amp;);
+    static void didRemoveDOMNode(Document&amp;, Node&amp;);
+    static void willModifyDOMAttr(Document&amp;, Element&amp;, const AtomicString&amp; oldValue, const AtomicString&amp; newValue);
+    static void didModifyDOMAttr(Document&amp;, Element&amp;, const AtomicString&amp; name, const AtomicString&amp; value);
+    static void didRemoveDOMAttr(Document&amp;, Element&amp;, const AtomicString&amp; name);
+    static void characterDataModified(Document&amp;, CharacterData&amp;);
+    static void didInvalidateStyleAttr(Document&amp;, Node&amp;);
</ins><span class="cx">     static void frameWindowDiscarded(Frame*, DOMWindow*);
</span><del>-    static void mediaQueryResultChanged(Document*);
-    static void didPushShadowRoot(Element* host, ShadowRoot*);
-    static void willPopShadowRoot(Element* host, ShadowRoot*);
-    static void didCreateNamedFlow(Document*, WebKitNamedFlow*);
-    static void willRemoveNamedFlow(Document*, WebKitNamedFlow*);
-    static void didChangeRegionOverset(Document*, WebKitNamedFlow*);
-    static void didRegisterNamedFlowContentElement(Document*, WebKitNamedFlow*, Node* contentElement, Node* nextContentElement = nullptr);
-    static void didUnregisterNamedFlowContentElement(Document*, WebKitNamedFlow*, Node* contentElement);
</del><ins>+    static void mediaQueryResultChanged(Document&amp;);
+    static void didPushShadowRoot(Element&amp; host, ShadowRoot&amp;);
+    static void willPopShadowRoot(Element&amp; host, ShadowRoot&amp;);
+    static void didCreateNamedFlow(Document*, WebKitNamedFlow&amp;);
+    static void willRemoveNamedFlow(Document*, WebKitNamedFlow&amp;);
+    static void didChangeRegionOverset(Document&amp;, WebKitNamedFlow&amp;);
+    static void didRegisterNamedFlowContentElement(Document&amp;, WebKitNamedFlow&amp;, Node&amp; contentElement, Node* nextContentElement = nullptr);
+    static void didUnregisterNamedFlowContentElement(Document&amp;, WebKitNamedFlow&amp;, Node&amp; contentElement);
</ins><span class="cx"> 
</span><del>-    static void mouseDidMoveOverElement(Page*, const HitTestResult&amp;, unsigned modifierFlags);
-    static bool handleMousePress(Page*);
-    static bool handleTouchEvent(Page*, Node*);
-    static bool forcePseudoState(Element*, CSSSelector::PseudoClassType);
</del><ins>+    static void mouseDidMoveOverElement(Page&amp;, const HitTestResult&amp;, unsigned modifierFlags);
+    static bool handleMousePress(Frame&amp;);
+    static bool handleTouchEvent(Frame&amp;, Node&amp;);
+    static bool forcePseudoState(Element&amp;, CSSSelector::PseudoClassType);
</ins><span class="cx"> 
</span><span class="cx">     static void willSendXMLHttpRequest(ScriptExecutionContext*, const String&amp; url);
</span><span class="cx">     static void didScheduleResourceRequest(Document*, const String&amp; url);
</span><span class="lines">@@ -143,50 +143,49 @@
</span><span class="cx"> 
</span><span class="cx">     static InspectorInstrumentationCookie willCallFunction(ScriptExecutionContext*, const String&amp; scriptName, int scriptLine);
</span><span class="cx">     static void didCallFunction(const InspectorInstrumentationCookie&amp;, ScriptExecutionContext*);
</span><del>-    static InspectorInstrumentationCookie willDispatchXHRReadyStateChangeEvent(ScriptExecutionContext*, XMLHttpRequest*);
</del><ins>+    static InspectorInstrumentationCookie willDispatchXHRReadyStateChangeEvent(ScriptExecutionContext*, XMLHttpRequest&amp;);
</ins><span class="cx">     static void didDispatchXHRReadyStateChangeEvent(const InspectorInstrumentationCookie&amp;);
</span><del>-    static InspectorInstrumentationCookie willDispatchEvent(Document*, const Event&amp;, bool hasEventListeners);
</del><ins>+    static InspectorInstrumentationCookie willDispatchEvent(Document&amp;, const Event&amp;, bool hasEventListeners);
</ins><span class="cx">     static void didDispatchEvent(const InspectorInstrumentationCookie&amp;);
</span><del>-    static InspectorInstrumentationCookie willHandleEvent(ScriptExecutionContext*, Event*);
</del><ins>+    static InspectorInstrumentationCookie willHandleEvent(ScriptExecutionContext*, const Event&amp;);
</ins><span class="cx">     static void didHandleEvent(const InspectorInstrumentationCookie&amp;);
</span><del>-    static InspectorInstrumentationCookie willDispatchEventOnWindow(Frame*, const Event&amp; event, DOMWindow* window);
</del><ins>+    static InspectorInstrumentationCookie willDispatchEventOnWindow(Frame*, const Event&amp;, DOMWindow&amp;);
</ins><span class="cx">     static void didDispatchEventOnWindow(const InspectorInstrumentationCookie&amp;);
</span><del>-    static InspectorInstrumentationCookie willEvaluateScript(Frame*, const String&amp; url, int lineNumber);
-    static void didEvaluateScript(const InspectorInstrumentationCookie&amp;, Frame*);
-    static void scriptsEnabled(Page*, bool isEnabled);
-    static void didCreateIsolatedContext(Frame*, JSC::ExecState*, SecurityOrigin*);
</del><ins>+    static InspectorInstrumentationCookie willEvaluateScript(Frame&amp;, const String&amp; url, int lineNumber);
+    static void didEvaluateScript(const InspectorInstrumentationCookie&amp;, Frame&amp;);
+    static void scriptsEnabled(Page&amp;, bool isEnabled);
</ins><span class="cx">     static InspectorInstrumentationCookie willFireTimer(ScriptExecutionContext*, int timerId);
</span><span class="cx">     static void didFireTimer(const InspectorInstrumentationCookie&amp;);
</span><del>-    static void didInvalidateLayout(Frame*);
-    static InspectorInstrumentationCookie willLayout(Frame*);
</del><ins>+    static void didInvalidateLayout(Frame&amp;);
+    static InspectorInstrumentationCookie willLayout(Frame&amp;);
</ins><span class="cx">     static void didLayout(const InspectorInstrumentationCookie&amp;, RenderObject*);
</span><del>-    static void didScroll(Page*);
-    static InspectorInstrumentationCookie willDispatchXHRLoadEvent(ScriptExecutionContext*, XMLHttpRequest*);
</del><ins>+    static void didScroll(Page&amp;);
+    static InspectorInstrumentationCookie willDispatchXHRLoadEvent(ScriptExecutionContext*, XMLHttpRequest&amp;);
</ins><span class="cx">     static void didDispatchXHRLoadEvent(const InspectorInstrumentationCookie&amp;);
</span><del>-    static void willScrollLayer(Frame*);
-    static void didScrollLayer(Frame*);
</del><ins>+    static void willScrollLayer(Frame&amp;);
+    static void didScrollLayer(Frame&amp;);
</ins><span class="cx">     static void willPaint(RenderObject*);
</span><span class="cx">     static void didPaint(RenderObject*, const LayoutRect&amp;);
</span><del>-    static InspectorInstrumentationCookie willRecalculateStyle(Document*);
</del><ins>+    static InspectorInstrumentationCookie willRecalculateStyle(Document&amp;);
</ins><span class="cx">     static void didRecalculateStyle(const InspectorInstrumentationCookie&amp;);
</span><del>-    static void didScheduleStyleRecalculation(Document*);
</del><ins>+    static void didScheduleStyleRecalculation(Document&amp;);
</ins><span class="cx"> 
</span><del>-    static void applyEmulatedMedia(Frame*, String*);
</del><ins>+    static void applyEmulatedMedia(Frame&amp;, String&amp;);
</ins><span class="cx">     static void willSendRequest(Frame*, unsigned long identifier, DocumentLoader*, ResourceRequest&amp;, const ResourceResponse&amp; redirectResponse);
</span><span class="cx">     static void continueAfterPingLoader(Frame&amp;, unsigned long identifier, DocumentLoader*, ResourceRequest&amp;, const ResourceResponse&amp;);
</span><del>-    static void markResourceAsCached(Page*, unsigned long identifier);
-    static void didLoadResourceFromMemoryCache(Page*, DocumentLoader*, CachedResource*);
</del><ins>+    static void markResourceAsCached(Page&amp;, unsigned long identifier);
+    static void didLoadResourceFromMemoryCache(Page&amp;, DocumentLoader*, CachedResource*);
</ins><span class="cx">     static InspectorInstrumentationCookie willReceiveResourceData(Frame*, unsigned long identifier, int length);
</span><span class="cx">     static void didReceiveResourceData(const InspectorInstrumentationCookie&amp;);
</span><span class="cx">     static InspectorInstrumentationCookie willReceiveResourceResponse(Frame*, unsigned long identifier, const ResourceResponse&amp;);
</span><span class="cx">     static void didReceiveResourceResponse(const InspectorInstrumentationCookie&amp;, unsigned long identifier, DocumentLoader*, const ResourceResponse&amp;, ResourceLoader*);
</span><del>-    static void continueAfterXFrameOptionsDenied(Frame*, DocumentLoader*, unsigned long identifier, const ResourceResponse&amp;);
-    static void continueWithPolicyDownload(Frame*, DocumentLoader*, unsigned long identifier, const ResourceResponse&amp;);
-    static void continueWithPolicyIgnore(Frame*, DocumentLoader*, unsigned long identifier, const ResourceResponse&amp;);
</del><ins>+    static void continueAfterXFrameOptionsDenied(Frame*, DocumentLoader&amp;, unsigned long identifier, const ResourceResponse&amp;);
+    static void continueWithPolicyDownload(Frame*, DocumentLoader&amp;, unsigned long identifier, const ResourceResponse&amp;);
+    static void continueWithPolicyIgnore(Frame*, DocumentLoader&amp;, unsigned long identifier, const ResourceResponse&amp;);
</ins><span class="cx">     static void didReceiveData(Frame*, unsigned long identifier, const char* data, int dataLength, int encodedDataLength);
</span><span class="cx">     static void didFinishLoading(Frame*, DocumentLoader*, unsigned long identifier, double finishTime);
</span><span class="cx">     static void didFailLoading(Frame*, DocumentLoader*, unsigned long identifier, const ResourceError&amp;);
</span><del>-    static void documentThreadableLoaderStartedLoadingForClient(ScriptExecutionContext*, unsigned long identifier, ThreadableLoaderClient*);
</del><ins>+    static void documentThreadableLoaderStartedLoadingForClient(Document&amp;, unsigned long identifier, ThreadableLoaderClient*);
</ins><span class="cx">     static void willLoadXHR(ScriptExecutionContext*, ThreadableLoaderClient*, const String&amp;, const URL&amp;, bool, PassRefPtr&lt;FormData&gt;, const HTTPHeaderMap&amp;, bool);
</span><span class="cx">     static void didFailXHRLoading(ScriptExecutionContext*, ThreadableLoaderClient*);
</span><span class="cx">     static void didFinishXHRLoading(ScriptExecutionContext*, ThreadableLoaderClient*, unsigned long identifier, const String&amp; sourceString, const String&amp; url, const String&amp; sendURL, unsigned sendLineNumber, unsigned sendColumnNumber);
</span><span class="lines">@@ -196,44 +195,44 @@
</span><span class="cx">     static void scriptImported(ScriptExecutionContext*, unsigned long identifier, const String&amp; sourceString);
</span><span class="cx">     static void scriptExecutionBlockedByCSP(ScriptExecutionContext*, const String&amp; directiveText);
</span><span class="cx">     static void didReceiveScriptResponse(ScriptExecutionContext*, unsigned long identifier);
</span><del>-    static void domContentLoadedEventFired(Frame*);
</del><ins>+    static void domContentLoadedEventFired(Frame&amp;);
</ins><span class="cx">     static void loadEventFired(Frame*);
</span><del>-    static void frameDetachedFromParent(Frame*);
-    static void didCommitLoad(Frame*, DocumentLoader*);
</del><ins>+    static void frameDetachedFromParent(Frame&amp;);
+    static void didCommitLoad(Frame&amp;, DocumentLoader*);
</ins><span class="cx">     static void frameDocumentUpdated(Frame*);
</span><del>-    static void loaderDetachedFromFrame(Frame*, DocumentLoader*);
</del><ins>+    static void loaderDetachedFromFrame(Frame&amp;, DocumentLoader&amp;);
</ins><span class="cx">     static void frameStartedLoading(Frame&amp;);
</span><span class="cx">     static void frameStoppedLoading(Frame&amp;);
</span><span class="cx">     static void frameScheduledNavigation(Frame&amp;, double delay);
</span><span class="cx">     static void frameClearedScheduledNavigation(Frame&amp;);
</span><del>-    static InspectorInstrumentationCookie willRunJavaScriptDialog(Page*, const String&amp; message);
</del><ins>+    static InspectorInstrumentationCookie willRunJavaScriptDialog(Page&amp;, const String&amp; message);
</ins><span class="cx">     static void didRunJavaScriptDialog(const InspectorInstrumentationCookie&amp;);
</span><del>-    static void willDestroyCachedResource(CachedResource*);
</del><ins>+    static void willDestroyCachedResource(CachedResource&amp;);
</ins><span class="cx"> 
</span><span class="cx">     static InspectorInstrumentationCookie willWriteHTML(Document*, unsigned startLine);
</span><span class="cx">     static void didWriteHTML(const InspectorInstrumentationCookie&amp;, unsigned endLine);
</span><span class="cx"> 
</span><span class="cx">     // FIXME: Remove once we no longer generate stacks outside of Inspector.
</span><del>-    static void addMessageToConsole(Page*, MessageSource, MessageType, MessageLevel, const String&amp; message, PassRefPtr&lt;Inspector::ScriptCallStack&gt;, unsigned long requestIdentifier = 0);
-    static void addMessageToConsole(Page*, MessageSource, MessageType, MessageLevel, const String&amp; message, JSC::ExecState*, PassRefPtr&lt;Inspector::ScriptArguments&gt;, unsigned long requestIdentifier = 0);
-    static void addMessageToConsole(Page*, MessageSource, MessageType, MessageLevel, const String&amp; message, const String&amp; scriptID, unsigned lineNumber, unsigned columnNumber, JSC::ExecState* = nullptr, unsigned long requestIdentifier = 0);
</del><ins>+    static void addMessageToConsole(Page&amp;, MessageSource, MessageType, MessageLevel, const String&amp; message, PassRefPtr&lt;Inspector::ScriptCallStack&gt;, unsigned long requestIdentifier = 0);
+    static void addMessageToConsole(Page&amp;, MessageSource, MessageType, MessageLevel, const String&amp; message, JSC::ExecState*, PassRefPtr&lt;Inspector::ScriptArguments&gt;, unsigned long requestIdentifier = 0);
+    static void addMessageToConsole(Page&amp;, MessageSource, MessageType, MessageLevel, const String&amp; message, const String&amp; scriptID, unsigned lineNumber, unsigned columnNumber, JSC::ExecState* = nullptr, unsigned long requestIdentifier = 0);
</ins><span class="cx"> 
</span><span class="cx">     // FIXME: Convert to ScriptArguments to match non-worker context.
</span><span class="cx">     static void addMessageToConsole(WorkerGlobalScope*, MessageSource, MessageType, MessageLevel, const String&amp; message, PassRefPtr&lt;Inspector::ScriptCallStack&gt;, unsigned long requestIdentifier = 0);
</span><span class="cx">     static void addMessageToConsole(WorkerGlobalScope*, MessageSource, MessageType, MessageLevel, const String&amp; message, const String&amp; scriptID, unsigned lineNumber, unsigned columnNumber, JSC::ExecState* = nullptr, unsigned long requestIdentifier = 0);
</span><span class="cx"> 
</span><del>-    static void consoleCount(Page*, JSC::ExecState*, PassRefPtr&lt;Inspector::ScriptArguments&gt;);
-    static void startConsoleTiming(Frame*, const String&amp; title);
-    static void stopConsoleTiming(Frame*, const String&amp; title, PassRefPtr&lt;Inspector::ScriptCallStack&gt;);
-    static void consoleTimeStamp(Frame*, PassRefPtr&lt;Inspector::ScriptArguments&gt;);
</del><ins>+    static void consoleCount(Page&amp;, JSC::ExecState*, PassRefPtr&lt;Inspector::ScriptArguments&gt;);
+    static void startConsoleTiming(Frame&amp;, const String&amp; title);
+    static void stopConsoleTiming(Frame&amp;, const String&amp; title, PassRefPtr&lt;Inspector::ScriptCallStack&gt;);
+    static void consoleTimeStamp(Frame&amp;, PassRefPtr&lt;Inspector::ScriptArguments&gt;);
</ins><span class="cx"> 
</span><span class="cx">     static void didRequestAnimationFrame(Document*, int callbackId);
</span><span class="cx">     static void didCancelAnimationFrame(Document*, int callbackId);
</span><span class="cx">     static InspectorInstrumentationCookie willFireAnimationFrame(Document*, int callbackId);
</span><span class="cx">     static void didFireAnimationFrame(const InspectorInstrumentationCookie&amp;);
</span><span class="cx"> 
</span><del>-    static void startProfiling(Page*, JSC::ExecState*, const String&amp; title);
-    static PassRefPtr&lt;JSC::Profile&gt; stopProfiling(Page*, JSC::ExecState*, const String&amp; title);
</del><ins>+    static void startProfiling(Page&amp;, JSC::ExecState*, const String&amp; title);
+    static PassRefPtr&lt;JSC::Profile&gt; stopProfiling(Page&amp;, JSC::ExecState*, const String&amp; title);
</ins><span class="cx"> 
</span><span class="cx"> #if ENABLE(SQL_DATABASE)
</span><span class="cx">     static void didOpenDatabase(ScriptExecutionContext*, PassRefPtr&lt;Database&gt;, const String&amp; domain, const String&amp; name, const String&amp; version);
</span><span class="lines">@@ -247,22 +246,22 @@
</span><span class="cx">     static void willEvaluateWorkerScript(WorkerGlobalScope*, int workerThreadStartMode);
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(WEB_REPLAY)
</span><del>-    static void sessionCreated(Page*, PassRefPtr&lt;ReplaySession&gt;);
-    static void sessionLoaded(Page*, PassRefPtr&lt;ReplaySession&gt;);
-    static void sessionModified(Page*, PassRefPtr&lt;ReplaySession&gt;);
</del><ins>+    static void sessionCreated(Page&amp;, PassRefPtr&lt;ReplaySession&gt;);
+    static void sessionLoaded(Page&amp;, PassRefPtr&lt;ReplaySession&gt;);
+    static void sessionModified(Page&amp;, PassRefPtr&lt;ReplaySession&gt;);
</ins><span class="cx"> 
</span><del>-    static void segmentCreated(Page*, PassRefPtr&lt;ReplaySessionSegment&gt;);
-    static void segmentCompleted(Page*, PassRefPtr&lt;ReplaySessionSegment&gt;);
-    static void segmentLoaded(Page*, PassRefPtr&lt;ReplaySessionSegment&gt;);
-    static void segmentUnloaded(Page*);
</del><ins>+    static void segmentCreated(Page&amp;, PassRefPtr&lt;ReplaySessionSegment&gt;);
+    static void segmentCompleted(Page&amp;, PassRefPtr&lt;ReplaySessionSegment&gt;);
+    static void segmentLoaded(Page&amp;, PassRefPtr&lt;ReplaySessionSegment&gt;);
+    static void segmentUnloaded(Page&amp;);
</ins><span class="cx"> 
</span><del>-    static void captureStarted(Page*);
-    static void captureStopped(Page*);
</del><ins>+    static void captureStarted(Page&amp;);
+    static void captureStopped(Page&amp;);
</ins><span class="cx"> 
</span><del>-    static void playbackStarted(Page*);
-    static void playbackPaused(Page*, const ReplayPosition&amp;);
-    static void playbackHitPosition(Page*, const ReplayPosition&amp;);
-    static void playbackFinished(Page*);
</del><ins>+    static void playbackStarted(Page&amp;);
+    static void playbackPaused(Page&amp;, const ReplayPosition&amp;);
+    static void playbackHitPosition(Page&amp;, const ReplayPosition&amp;);
+    static void playbackFinished(Page&amp;);
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(WEB_SOCKETS)
</span><span class="lines">@@ -283,6 +282,10 @@
</span><span class="cx">     static void networkStateChanged(Page*);
</span><span class="cx">     static void updateApplicationCacheStatus(Frame*);
</span><span class="cx"> 
</span><ins>+    static void layerTreeDidChange(Page*);
+    static void renderLayerDestroyed(Page*, const RenderLayer&amp;);
+    static void pseudoElementDestroyed(Page*, PseudoElement&amp;);
+
</ins><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     static void frontendCreated() { s_frontendCounter += 1; }
</span><span class="cx">     static void frontendDeleted() { s_frontendCounter -= 1; }
</span><span class="lines">@@ -298,207 +301,207 @@
</span><span class="cx">     static bool replayAgentEnabled(ScriptExecutionContext*) { return false; }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    static void registerInstrumentingAgents(InstrumentingAgents*);
-    static void unregisterInstrumentingAgents(InstrumentingAgents*);
</del><ins>+    WEBCORE_EXPORT static InstrumentingAgents* instrumentingAgentsForPage(Page*);
</ins><span class="cx"> 
</span><del>-    static void layerTreeDidChange(Page*);
-    static void renderLayerDestroyed(Page*, const RenderLayer*);
-    static void pseudoElementDestroyed(Page*, PseudoElement*);
</del><ins>+    static void registerInstrumentingAgents(InstrumentingAgents&amp;);
+    static void unregisterInstrumentingAgents(InstrumentingAgents&amp;);
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><del>-    static void didClearWindowObjectInWorldImpl(InstrumentingAgents*, Frame*, DOMWrapperWorld&amp;);
-    static bool isDebuggerPausedImpl(InstrumentingAgents*);
</del><ins>+    static void didClearWindowObjectInWorldImpl(InstrumentingAgents&amp;, Frame&amp;, DOMWrapperWorld&amp;);
+    static bool isDebuggerPausedImpl(InstrumentingAgents&amp;);
</ins><span class="cx"> 
</span><del>-    static void willInsertDOMNodeImpl(InstrumentingAgents*, Node* parent);
-    static void didInsertDOMNodeImpl(InstrumentingAgents*, Node*);
-    static void willRemoveDOMNodeImpl(InstrumentingAgents*, Node*);
-    static void didRemoveDOMNodeImpl(InstrumentingAgents*, Node*);
-    static void willModifyDOMAttrImpl(InstrumentingAgents*, Element*, const AtomicString&amp; oldValue, const AtomicString&amp; newValue);
-    static void didModifyDOMAttrImpl(InstrumentingAgents*, Element*, const AtomicString&amp; name, const AtomicString&amp; value);
-    static void didRemoveDOMAttrImpl(InstrumentingAgents*, Element*, const AtomicString&amp; name);
-    static void characterDataModifiedImpl(InstrumentingAgents*, CharacterData*);
-    static void didInvalidateStyleAttrImpl(InstrumentingAgents*, Node*);
-    static void frameWindowDiscardedImpl(InstrumentingAgents*, DOMWindow*);
-    static void mediaQueryResultChangedImpl(InstrumentingAgents*);
-    static void didPushShadowRootImpl(InstrumentingAgents*, Element* host, ShadowRoot*);
-    static void willPopShadowRootImpl(InstrumentingAgents*, Element* host, ShadowRoot*);
-    static void didCreateNamedFlowImpl(InstrumentingAgents*, Document*, WebKitNamedFlow*);
-    static void willRemoveNamedFlowImpl(InstrumentingAgents*, Document*, WebKitNamedFlow*);
-    static void didChangeRegionOversetImpl(InstrumentingAgents*, Document*, WebKitNamedFlow*);
-    static void didRegisterNamedFlowContentElementImpl(InstrumentingAgents*, Document*, WebKitNamedFlow*, Node* contentElement, Node* nextContentElement = nullptr);
-    static void didUnregisterNamedFlowContentElementImpl(InstrumentingAgents*, Document*, WebKitNamedFlow*, Node* contentElement);
</del><ins>+    static void willInsertDOMNodeImpl(InstrumentingAgents&amp;, Node&amp; parent);
+    static void didInsertDOMNodeImpl(InstrumentingAgents&amp;, Node&amp;);
+    static void willRemoveDOMNodeImpl(InstrumentingAgents&amp;, Node&amp;);
+    static void didRemoveDOMNodeImpl(InstrumentingAgents&amp;, Node&amp;);
+    static void willModifyDOMAttrImpl(InstrumentingAgents&amp;, Element&amp;, const AtomicString&amp; oldValue, const AtomicString&amp; newValue);
+    static void didModifyDOMAttrImpl(InstrumentingAgents&amp;, Element&amp;, const AtomicString&amp; name, const AtomicString&amp; value);
+    static void didRemoveDOMAttrImpl(InstrumentingAgents&amp;, Element&amp;, const AtomicString&amp; name);
+    static void characterDataModifiedImpl(InstrumentingAgents&amp;, CharacterData&amp;);
+    static void didInvalidateStyleAttrImpl(InstrumentingAgents&amp;, Node&amp;);
+    static void frameWindowDiscardedImpl(InstrumentingAgents&amp;, DOMWindow*);
+    static void mediaQueryResultChangedImpl(InstrumentingAgents&amp;);
+    static void didPushShadowRootImpl(InstrumentingAgents&amp;, Element&amp; host, ShadowRoot&amp;);
+    static void willPopShadowRootImpl(InstrumentingAgents&amp;, Element&amp; host, ShadowRoot&amp;);
+    static void didCreateNamedFlowImpl(InstrumentingAgents&amp;, Document*, WebKitNamedFlow&amp;);
+    static void willRemoveNamedFlowImpl(InstrumentingAgents&amp;, Document*, WebKitNamedFlow&amp;);
+    static void didChangeRegionOversetImpl(InstrumentingAgents&amp;, Document&amp;, WebKitNamedFlow&amp;);
+    static void didRegisterNamedFlowContentElementImpl(InstrumentingAgents&amp;, Document&amp;, WebKitNamedFlow&amp;, Node&amp; contentElement, Node* nextContentElement = nullptr);
+    static void didUnregisterNamedFlowContentElementImpl(InstrumentingAgents&amp;, Document&amp;, WebKitNamedFlow&amp;, Node&amp; contentElement);
</ins><span class="cx"> 
</span><del>-    static void mouseDidMoveOverElementImpl(InstrumentingAgents*, const HitTestResult&amp;, unsigned modifierFlags);
-    static bool handleTouchEventImpl(InstrumentingAgents*, Node*);
-    static bool handleMousePressImpl(InstrumentingAgents*);
-    static bool forcePseudoStateImpl(InstrumentingAgents*, Element*, CSSSelector::PseudoClassType);
</del><ins>+    static void mouseDidMoveOverElementImpl(InstrumentingAgents&amp;, const HitTestResult&amp;, unsigned modifierFlags);
+    static bool handleTouchEventImpl(InstrumentingAgents&amp;, Node&amp;);
+    static bool handleMousePressImpl(InstrumentingAgents&amp;);
+    static bool forcePseudoStateImpl(InstrumentingAgents&amp;, Element&amp;, CSSSelector::PseudoClassType);
</ins><span class="cx"> 
</span><del>-    static void willSendXMLHttpRequestImpl(InstrumentingAgents*, const String&amp; url);
-    static void didScheduleResourceRequestImpl(InstrumentingAgents*, const String&amp; url, Frame*);
-    static void didInstallTimerImpl(InstrumentingAgents*, int timerId, int timeout, bool singleShot, ScriptExecutionContext*);
-    static void didRemoveTimerImpl(InstrumentingAgents*, int timerId, ScriptExecutionContext*);
</del><ins>+    static void willSendXMLHttpRequestImpl(InstrumentingAgents&amp;, const String&amp; url);
+    static void didScheduleResourceRequestImpl(InstrumentingAgents&amp;, const String&amp; url, Frame*);
+    static void didInstallTimerImpl(InstrumentingAgents&amp;, int timerId, int timeout, bool singleShot, ScriptExecutionContext*);
+    static void didRemoveTimerImpl(InstrumentingAgents&amp;, int timerId, ScriptExecutionContext*);
</ins><span class="cx"> 
</span><del>-    static InspectorInstrumentationCookie willCallFunctionImpl(InstrumentingAgents*, const String&amp; scriptName, int scriptLine, ScriptExecutionContext*);
</del><ins>+    static InspectorInstrumentationCookie willCallFunctionImpl(InstrumentingAgents&amp;, const String&amp; scriptName, int scriptLine, ScriptExecutionContext*);
</ins><span class="cx">     static void didCallFunctionImpl(const InspectorInstrumentationCookie&amp;, ScriptExecutionContext*);
</span><del>-    static InspectorInstrumentationCookie willDispatchXHRReadyStateChangeEventImpl(InstrumentingAgents*, XMLHttpRequest*, ScriptExecutionContext*);
</del><ins>+    static InspectorInstrumentationCookie willDispatchXHRReadyStateChangeEventImpl(InstrumentingAgents&amp;, XMLHttpRequest&amp;, ScriptExecutionContext*);
</ins><span class="cx">     static void didDispatchXHRReadyStateChangeEventImpl(const InspectorInstrumentationCookie&amp;);
</span><del>-    static InspectorInstrumentationCookie willDispatchEventImpl(InstrumentingAgents*, const Event&amp;, bool hasEventListeners, Document*);
-    static InspectorInstrumentationCookie willHandleEventImpl(InstrumentingAgents*, Event*);
</del><ins>+    static InspectorInstrumentationCookie willDispatchEventImpl(InstrumentingAgents&amp;, Document&amp;, const Event&amp;, bool hasEventListeners);
+    static InspectorInstrumentationCookie willHandleEventImpl(InstrumentingAgents&amp;, const Event&amp;);
</ins><span class="cx">     static void didHandleEventImpl(const InspectorInstrumentationCookie&amp;);
</span><span class="cx">     static void didDispatchEventImpl(const InspectorInstrumentationCookie&amp;);
</span><del>-    static InspectorInstrumentationCookie willDispatchEventOnWindowImpl(InstrumentingAgents*, const Event&amp;, DOMWindow*);
</del><ins>+    static InspectorInstrumentationCookie willDispatchEventOnWindowImpl(InstrumentingAgents&amp;, const Event&amp;, DOMWindow&amp;);
</ins><span class="cx">     static void didDispatchEventOnWindowImpl(const InspectorInstrumentationCookie&amp;);
</span><del>-    static InspectorInstrumentationCookie willEvaluateScriptImpl(InstrumentingAgents*, const String&amp; url, int lineNumber, Frame*);
-    static void didEvaluateScriptImpl(const InspectorInstrumentationCookie&amp;, Frame*);
-    static void scriptsEnabledImpl(InstrumentingAgents*, bool isEnabled);
-    static void didCreateIsolatedContextImpl(InstrumentingAgents*, Frame*, JSC::ExecState*, SecurityOrigin*);
-    static InspectorInstrumentationCookie willFireTimerImpl(InstrumentingAgents*, int timerId, ScriptExecutionContext*);
</del><ins>+    static InspectorInstrumentationCookie willEvaluateScriptImpl(InstrumentingAgents&amp;, Frame&amp;, const String&amp; url, int lineNumber);
+    static void didEvaluateScriptImpl(const InspectorInstrumentationCookie&amp;, Frame&amp;);
+    static void scriptsEnabledImpl(InstrumentingAgents&amp;, bool isEnabled);
+    static InspectorInstrumentationCookie willFireTimerImpl(InstrumentingAgents&amp;, int timerId, ScriptExecutionContext*);
</ins><span class="cx">     static void didFireTimerImpl(const InspectorInstrumentationCookie&amp;);
</span><del>-    static void didInvalidateLayoutImpl(InstrumentingAgents*, Frame*);
-    static InspectorInstrumentationCookie willLayoutImpl(InstrumentingAgents*, Frame*);
</del><ins>+    static void didInvalidateLayoutImpl(InstrumentingAgents&amp;, Frame&amp;);
+    static InspectorInstrumentationCookie willLayoutImpl(InstrumentingAgents&amp;, Frame&amp;);
</ins><span class="cx">     static void didLayoutImpl(const InspectorInstrumentationCookie&amp;, RenderObject*);
</span><del>-    static void didScrollImpl(InstrumentingAgents*);
-    static InspectorInstrumentationCookie willDispatchXHRLoadEventImpl(InstrumentingAgents*, XMLHttpRequest*, ScriptExecutionContext*);
</del><ins>+    static void didScrollImpl(InstrumentingAgents&amp;);
+    static InspectorInstrumentationCookie willDispatchXHRLoadEventImpl(InstrumentingAgents&amp;, XMLHttpRequest&amp;, ScriptExecutionContext*);
</ins><span class="cx">     static void didDispatchXHRLoadEventImpl(const InspectorInstrumentationCookie&amp;);
</span><del>-    static void willScrollLayerImpl(InstrumentingAgents*, Frame*);
-    static void didScrollLayerImpl(InstrumentingAgents*);
-    static void willPaintImpl(InstrumentingAgents*, RenderObject*);
-    static void didPaintImpl(InstrumentingAgents*, RenderObject*, const LayoutRect&amp;);
-    static InspectorInstrumentationCookie willRecalculateStyleImpl(InstrumentingAgents*, Frame*);
</del><ins>+    static void willScrollLayerImpl(InstrumentingAgents&amp;, Frame&amp;);
+    static void didScrollLayerImpl(InstrumentingAgents&amp;);
+    static void willPaintImpl(InstrumentingAgents&amp;, RenderObject*);
+    static void didPaintImpl(InstrumentingAgents&amp;, RenderObject*, const LayoutRect&amp;);
+    static InspectorInstrumentationCookie willRecalculateStyleImpl(InstrumentingAgents&amp;, Document&amp;);
</ins><span class="cx">     static void didRecalculateStyleImpl(const InspectorInstrumentationCookie&amp;);
</span><del>-    static void didScheduleStyleRecalculationImpl(InstrumentingAgents*, Document*);
</del><ins>+    static void didScheduleStyleRecalculationImpl(InstrumentingAgents&amp;, Document&amp;);
</ins><span class="cx"> 
</span><del>-    static void applyEmulatedMediaImpl(InstrumentingAgents*, String*);
-    static void willSendRequestImpl(InstrumentingAgents*, unsigned long identifier, DocumentLoader*, ResourceRequest&amp;, const ResourceResponse&amp; redirectResponse);
-    static void continueAfterPingLoaderImpl(InstrumentingAgents*, unsigned long identifier, DocumentLoader*, ResourceRequest&amp;, const ResourceResponse&amp;);
-    static void markResourceAsCachedImpl(InstrumentingAgents*, unsigned long identifier);
-    static void didLoadResourceFromMemoryCacheImpl(InstrumentingAgents*, DocumentLoader*, CachedResource*);
-    static InspectorInstrumentationCookie willReceiveResourceDataImpl(InstrumentingAgents*, unsigned long identifier, Frame*, int length);
</del><ins>+    static void applyEmulatedMediaImpl(InstrumentingAgents&amp;, String&amp;);
+    static void willSendRequestImpl(InstrumentingAgents&amp;, unsigned long identifier, DocumentLoader*, ResourceRequest&amp;, const ResourceResponse&amp; redirectResponse);
+    static void continueAfterPingLoaderImpl(InstrumentingAgents&amp;, unsigned long identifier, DocumentLoader*, ResourceRequest&amp;, const ResourceResponse&amp;);
+    static void markResourceAsCachedImpl(InstrumentingAgents&amp;, unsigned long identifier);
+    static void didLoadResourceFromMemoryCacheImpl(InstrumentingAgents&amp;, DocumentLoader*, CachedResource*);
+    static InspectorInstrumentationCookie willReceiveResourceDataImpl(InstrumentingAgents&amp;, Frame*, unsigned long identifier, int length);
</ins><span class="cx">     static void didReceiveResourceDataImpl(const InspectorInstrumentationCookie&amp;);
</span><del>-    static InspectorInstrumentationCookie willReceiveResourceResponseImpl(InstrumentingAgents*, unsigned long identifier, const ResourceResponse&amp;, Frame*);
</del><ins>+    static InspectorInstrumentationCookie willReceiveResourceResponseImpl(InstrumentingAgents&amp;, Frame*, unsigned long identifier, const ResourceResponse&amp;);
</ins><span class="cx">     static void didReceiveResourceResponseImpl(const InspectorInstrumentationCookie&amp;, unsigned long identifier, DocumentLoader*, const ResourceResponse&amp;, ResourceLoader*);
</span><del>-    static void didReceiveResourceResponseButCanceledImpl(Frame*, DocumentLoader*, unsigned long identifier, const ResourceResponse&amp;);
-    static void continueAfterXFrameOptionsDeniedImpl(Frame*, DocumentLoader*, unsigned long identifier, const ResourceResponse&amp;);
-    static void continueWithPolicyDownloadImpl(Frame*, DocumentLoader*, unsigned long identifier, const ResourceResponse&amp;);
-    static void continueWithPolicyIgnoreImpl(Frame*, DocumentLoader*, unsigned long identifier, const ResourceResponse&amp;);
-    static void didReceiveDataImpl(InstrumentingAgents*, unsigned long identifier, const char* data, int dataLength, int encodedDataLength);
-    static void didFinishLoadingImpl(InstrumentingAgents*, unsigned long identifier, DocumentLoader*, double finishTime);
-    static void didFailLoadingImpl(InstrumentingAgents*, unsigned long identifier, DocumentLoader*, const ResourceError&amp;);
-    static void documentThreadableLoaderStartedLoadingForClientImpl(InstrumentingAgents*, unsigned long identifier, ThreadableLoaderClient*);
-    static void willLoadXHRImpl(InstrumentingAgents*, ThreadableLoaderClient*, const String&amp;, const URL&amp;, bool, PassRefPtr&lt;FormData&gt;, const HTTPHeaderMap&amp;, bool);
-    static void didFailXHRLoadingImpl(InstrumentingAgents*, ThreadableLoaderClient*);
-    static void didFinishXHRLoadingImpl(InstrumentingAgents*, ThreadableLoaderClient*, unsigned long identifier, const String&amp; sourceString, const String&amp; url, const String&amp; sendURL, unsigned sendLineNumber, unsigned sendColumnNumber);
-    static void didReceiveXHRResponseImpl(InstrumentingAgents*, unsigned long identifier);
-    static void willLoadXHRSynchronouslyImpl(InstrumentingAgents*);
-    static void didLoadXHRSynchronouslyImpl(InstrumentingAgents*);
-    static void scriptImportedImpl(InstrumentingAgents*, unsigned long identifier, const String&amp; sourceString);
-    static void scriptExecutionBlockedByCSPImpl(InstrumentingAgents*, const String&amp; directiveText);
-    static void didReceiveScriptResponseImpl(InstrumentingAgents*, unsigned long identifier);
-    static void domContentLoadedEventFiredImpl(InstrumentingAgents*, Frame*);
-    static void loadEventFiredImpl(InstrumentingAgents*, Frame*);
-    static void frameDetachedFromParentImpl(InstrumentingAgents*, Frame*);
-    static void didCommitLoadImpl(InstrumentingAgents*, Page*, DocumentLoader*);
-    static void frameDocumentUpdatedImpl(InstrumentingAgents*, Frame*);
-    static void loaderDetachedFromFrameImpl(InstrumentingAgents*, DocumentLoader*);
</del><ins>+    static void didReceiveResourceResponseButCanceledImpl(Frame*, DocumentLoader&amp;, unsigned long identifier, const ResourceResponse&amp;);
+    static void continueAfterXFrameOptionsDeniedImpl(Frame*, DocumentLoader&amp;, unsigned long identifier, const ResourceResponse&amp;);
+    static void continueWithPolicyDownloadImpl(Frame*, DocumentLoader&amp;, unsigned long identifier, const ResourceResponse&amp;);
+    static void continueWithPolicyIgnoreImpl(Frame*, DocumentLoader&amp;, unsigned long identifier, const ResourceResponse&amp;);
+    static void didReceiveDataImpl(InstrumentingAgents&amp;, unsigned long identifier, const char* data, int dataLength, int encodedDataLength);
+    static void didFinishLoadingImpl(InstrumentingAgents&amp;, unsigned long identifier, DocumentLoader*, double finishTime);
+    static void didFailLoadingImpl(InstrumentingAgents&amp;, unsigned long identifier, DocumentLoader*, const ResourceError&amp;);
+    static void documentThreadableLoaderStartedLoadingForClientImpl(InstrumentingAgents&amp;, unsigned long identifier, ThreadableLoaderClient*);
+    static void willLoadXHRImpl(InstrumentingAgents&amp;, ThreadableLoaderClient*, const String&amp;, const URL&amp;, bool, PassRefPtr&lt;FormData&gt;, const HTTPHeaderMap&amp;, bool);
+    static void didFailXHRLoadingImpl(InstrumentingAgents&amp;, ThreadableLoaderClient*);
+    static void didFinishXHRLoadingImpl(InstrumentingAgents&amp;, ThreadableLoaderClient*, unsigned long identifier, const String&amp; sourceString, const String&amp; url, const String&amp; sendURL, unsigned sendLineNumber, unsigned sendColumnNumber);
+    static void didReceiveXHRResponseImpl(InstrumentingAgents&amp;, unsigned long identifier);
+    static void willLoadXHRSynchronouslyImpl(InstrumentingAgents&amp;);
+    static void didLoadXHRSynchronouslyImpl(InstrumentingAgents&amp;);
+    static void scriptImportedImpl(InstrumentingAgents&amp;, unsigned long identifier, const String&amp; sourceString);
+    static void scriptExecutionBlockedByCSPImpl(InstrumentingAgents&amp;, const String&amp; directiveText);
+    static void didReceiveScriptResponseImpl(InstrumentingAgents&amp;, unsigned long identifier);
+    static void domContentLoadedEventFiredImpl(InstrumentingAgents&amp;, Frame&amp;);
+    static void loadEventFiredImpl(InstrumentingAgents&amp;, Frame*);
+    static void frameDetachedFromParentImpl(InstrumentingAgents&amp;, Frame&amp;);
+    static void didCommitLoadImpl(InstrumentingAgents&amp;, Page*, DocumentLoader*);
+    static void frameDocumentUpdatedImpl(InstrumentingAgents&amp;, Frame*);
+    static void loaderDetachedFromFrameImpl(InstrumentingAgents&amp;, DocumentLoader&amp;);
</ins><span class="cx">     static void frameStartedLoadingImpl(InstrumentingAgents&amp;, Frame&amp;);
</span><span class="cx">     static void frameStoppedLoadingImpl(InstrumentingAgents&amp;, Frame&amp;);
</span><span class="cx">     static void frameScheduledNavigationImpl(InstrumentingAgents&amp;, Frame&amp;, double delay);
</span><span class="cx">     static void frameClearedScheduledNavigationImpl(InstrumentingAgents&amp;, Frame&amp;);
</span><del>-    static InspectorInstrumentationCookie willRunJavaScriptDialogImpl(InstrumentingAgents*, const String&amp; message);
</del><ins>+    static InspectorInstrumentationCookie willRunJavaScriptDialogImpl(InstrumentingAgents&amp;, const String&amp; message);
</ins><span class="cx">     static void didRunJavaScriptDialogImpl(const InspectorInstrumentationCookie&amp;);
</span><del>-    static void willDestroyCachedResourceImpl(CachedResource*);
</del><ins>+    static void willDestroyCachedResourceImpl(CachedResource&amp;);
</ins><span class="cx"> 
</span><del>-    static InspectorInstrumentationCookie willWriteHTMLImpl(InstrumentingAgents*, unsigned startLine, Frame*);
</del><ins>+    static InspectorInstrumentationCookie willWriteHTMLImpl(InstrumentingAgents&amp;, unsigned startLine, Frame*);
</ins><span class="cx">     static void didWriteHTMLImpl(const InspectorInstrumentationCookie&amp;, unsigned endLine);
</span><span class="cx"> 
</span><del>-    static void addMessageToConsoleImpl(InstrumentingAgents*, MessageSource, MessageType, MessageLevel, const String&amp; message, JSC::ExecState*, PassRefPtr&lt;Inspector::ScriptArguments&gt;, unsigned long requestIdentifier);
-    static void addMessageToConsoleImpl(InstrumentingAgents*, MessageSource, MessageType, MessageLevel, const String&amp; message, const String&amp; scriptID, unsigned lineNumber, unsigned columnNumber, JSC::ExecState*, unsigned long requestIdentifier);
</del><ins>+    static void addMessageToConsoleImpl(InstrumentingAgents&amp;, MessageSource, MessageType, MessageLevel, const String&amp; message, JSC::ExecState*, PassRefPtr&lt;Inspector::ScriptArguments&gt;, unsigned long requestIdentifier);
+    static void addMessageToConsoleImpl(InstrumentingAgents&amp;, MessageSource, MessageType, MessageLevel, const String&amp; message, const String&amp; scriptID, unsigned lineNumber, unsigned columnNumber, JSC::ExecState*, unsigned long requestIdentifier);
</ins><span class="cx"> 
</span><span class="cx">     // FIXME: Remove once we no longer generate stacks outside of Inspector.
</span><del>-    static void addMessageToConsoleImpl(InstrumentingAgents*, MessageSource, MessageType, MessageLevel, const String&amp; message, PassRefPtr&lt;Inspector::ScriptCallStack&gt;, unsigned long requestIdentifier);
</del><ins>+    static void addMessageToConsoleImpl(InstrumentingAgents&amp;, MessageSource, MessageType, MessageLevel, const String&amp; message, PassRefPtr&lt;Inspector::ScriptCallStack&gt;, unsigned long requestIdentifier);
</ins><span class="cx"> 
</span><del>-    static void consoleCountImpl(InstrumentingAgents*, JSC::ExecState*, PassRefPtr&lt;Inspector::ScriptArguments&gt;);
-    static void startConsoleTimingImpl(InstrumentingAgents*, Frame*, const String&amp; title);
-    static void stopConsoleTimingImpl(InstrumentingAgents*, Frame*, const String&amp; title, PassRefPtr&lt;Inspector::ScriptCallStack&gt;);
-    static void consoleTimeStampImpl(InstrumentingAgents*, Frame*, PassRefPtr&lt;Inspector::ScriptArguments&gt;);
</del><ins>+    static void consoleCountImpl(InstrumentingAgents&amp;, JSC::ExecState*, PassRefPtr&lt;Inspector::ScriptArguments&gt;);
+    static void startConsoleTimingImpl(InstrumentingAgents&amp;, Frame&amp;, const String&amp; title);
+    static void stopConsoleTimingImpl(InstrumentingAgents&amp;, Frame&amp;, const String&amp; title, PassRefPtr&lt;Inspector::ScriptCallStack&gt;);
+    static void consoleTimeStampImpl(InstrumentingAgents&amp;, Frame&amp;, PassRefPtr&lt;Inspector::ScriptArguments&gt;);
</ins><span class="cx"> 
</span><del>-    static void didRequestAnimationFrameImpl(InstrumentingAgents*, int callbackId, Frame*);
-    static void didCancelAnimationFrameImpl(InstrumentingAgents*, int callbackId, Frame*);
-    static InspectorInstrumentationCookie willFireAnimationFrameImpl(InstrumentingAgents*, int callbackId, Frame*);
</del><ins>+    static void didRequestAnimationFrameImpl(InstrumentingAgents&amp;, int callbackId, Frame*);
+    static void didCancelAnimationFrameImpl(InstrumentingAgents&amp;, int callbackId, Frame*);
+    static InspectorInstrumentationCookie willFireAnimationFrameImpl(InstrumentingAgents&amp;, int callbackId, Frame*);
</ins><span class="cx">     static void didFireAnimationFrameImpl(const InspectorInstrumentationCookie&amp;);
</span><span class="cx"> 
</span><del>-    static void startProfilingImpl(InstrumentingAgents*, JSC::ExecState*, const String&amp; title);
-    static PassRefPtr&lt;JSC::Profile&gt; stopProfilingImpl(InstrumentingAgents*, JSC::ExecState*, const String&amp; title);
</del><ins>+    static void startProfilingImpl(InstrumentingAgents&amp;, JSC::ExecState*, const String&amp; title);
+    static PassRefPtr&lt;JSC::Profile&gt; stopProfilingImpl(InstrumentingAgents&amp;, JSC::ExecState*, const String&amp; title);
</ins><span class="cx"> 
</span><span class="cx"> #if ENABLE(SQL_DATABASE)
</span><del>-    static void didOpenDatabaseImpl(InstrumentingAgents*, PassRefPtr&lt;Database&gt;, const String&amp; domain, const String&amp; name, const String&amp; version);
</del><ins>+    static void didOpenDatabaseImpl(InstrumentingAgents&amp;, PassRefPtr&lt;Database&gt;, const String&amp; domain, const String&amp; name, const String&amp; version);
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    static void didDispatchDOMStorageEventImpl(InstrumentingAgents*, const String&amp; key, const String&amp; oldValue, const String&amp; newValue, StorageType, SecurityOrigin*, Page*);
</del><ins>+    static void didDispatchDOMStorageEventImpl(InstrumentingAgents&amp;, const String&amp; key, const String&amp; oldValue, const String&amp; newValue, StorageType, SecurityOrigin*, Page*);
</ins><span class="cx"> 
</span><del>-    static bool shouldPauseDedicatedWorkerOnStartImpl(InstrumentingAgents*);
-    static void didStartWorkerGlobalScopeImpl(InstrumentingAgents*, WorkerGlobalScopeProxy*, const URL&amp;);
-    static void workerGlobalScopeTerminatedImpl(InstrumentingAgents*, WorkerGlobalScopeProxy*);
</del><ins>+    static bool shouldPauseDedicatedWorkerOnStartImpl(InstrumentingAgents&amp;);
+    static void didStartWorkerGlobalScopeImpl(InstrumentingAgents&amp;, WorkerGlobalScopeProxy*, const URL&amp;);
+    static void workerGlobalScopeTerminatedImpl(InstrumentingAgents&amp;, WorkerGlobalScopeProxy*);
</ins><span class="cx"> 
</span><span class="cx"> #if ENABLE(WEB_REPLAY)
</span><del>-    static void sessionCreatedImpl(InstrumentingAgents*, PassRefPtr&lt;ReplaySession&gt;);
-    static void sessionLoadedImpl(InstrumentingAgents*, PassRefPtr&lt;ReplaySession&gt;);
-    static void sessionModifiedImpl(InstrumentingAgents*, PassRefPtr&lt;ReplaySession&gt;);
</del><ins>+    static void sessionCreatedImpl(InstrumentingAgents&amp;, PassRefPtr&lt;ReplaySession&gt;);
+    static void sessionLoadedImpl(InstrumentingAgents&amp;, PassRefPtr&lt;ReplaySession&gt;);
+    static void sessionModifiedImpl(InstrumentingAgents&amp;, PassRefPtr&lt;ReplaySession&gt;);
</ins><span class="cx"> 
</span><del>-    static void segmentCreatedImpl(InstrumentingAgents*, PassRefPtr&lt;ReplaySessionSegment&gt;);
-    static void segmentCompletedImpl(InstrumentingAgents*, PassRefPtr&lt;ReplaySessionSegment&gt;);
-    static void segmentLoadedImpl(InstrumentingAgents*, PassRefPtr&lt;ReplaySessionSegment&gt;);
-    static void segmentUnloadedImpl(InstrumentingAgents*);
</del><ins>+    static void segmentCreatedImpl(InstrumentingAgents&amp;, PassRefPtr&lt;ReplaySessionSegment&gt;);
+    static void segmentCompletedImpl(InstrumentingAgents&amp;, PassRefPtr&lt;ReplaySessionSegment&gt;);
+    static void segmentLoadedImpl(InstrumentingAgents&amp;, PassRefPtr&lt;ReplaySessionSegment&gt;);
+    static void segmentUnloadedImpl(InstrumentingAgents&amp;);
</ins><span class="cx"> 
</span><del>-    static void captureStartedImpl(InstrumentingAgents*);
-    static void captureStoppedImpl(InstrumentingAgents*);
</del><ins>+    static void captureStartedImpl(InstrumentingAgents&amp;);
+    static void captureStoppedImpl(InstrumentingAgents&amp;);
</ins><span class="cx"> 
</span><del>-    static void playbackStartedImpl(InstrumentingAgents*);
-    static void playbackPausedImpl(InstrumentingAgents*, const ReplayPosition&amp;);
-    static void playbackHitPositionImpl(InstrumentingAgents*, const ReplayPosition&amp;);
-    static void playbackFinishedImpl(InstrumentingAgents*);
</del><ins>+    static void playbackStartedImpl(InstrumentingAgents&amp;);
+    static void playbackPausedImpl(InstrumentingAgents&amp;, const ReplayPosition&amp;);
+    static void playbackHitPositionImpl(InstrumentingAgents&amp;, const ReplayPosition&amp;);
+    static void playbackFinishedImpl(InstrumentingAgents&amp;);
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(WEB_SOCKETS)
</span><del>-    static void didCreateWebSocketImpl(InstrumentingAgents*, unsigned long identifier, const URL&amp; requestURL, const URL&amp; documentURL, const String&amp; protocol, Document*);
-    static void willSendWebSocketHandshakeRequestImpl(InstrumentingAgents*, unsigned long identifier, const ResourceRequest&amp;, Document*);
-    static void didReceiveWebSocketHandshakeResponseImpl(InstrumentingAgents*, unsigned long identifier, const ResourceResponse&amp;, Document*);
-    static void didCloseWebSocketImpl(InstrumentingAgents*, unsigned long identifier, Document*);
-    static void didReceiveWebSocketFrameImpl(InstrumentingAgents*, unsigned long identifier, const WebSocketFrame&amp;);
-    static void didSendWebSocketFrameImpl(InstrumentingAgents*, unsigned long identifier, const WebSocketFrame&amp;);
-    static void didReceiveWebSocketFrameErrorImpl(InstrumentingAgents*, unsigned long identifier, const String&amp;);
</del><ins>+    static void didCreateWebSocketImpl(InstrumentingAgents&amp;, unsigned long identifier, const URL&amp; requestURL, const URL&amp; documentURL, const String&amp; protocol, Document*);
+    static void willSendWebSocketHandshakeRequestImpl(InstrumentingAgents&amp;, unsigned long identifier, const ResourceRequest&amp;, Document*);
+    static void didReceiveWebSocketHandshakeResponseImpl(InstrumentingAgents&amp;, unsigned long identifier, const ResourceResponse&amp;, Document*);
+    static void didCloseWebSocketImpl(InstrumentingAgents&amp;, unsigned long identifier, Document*);
+    static void didReceiveWebSocketFrameImpl(InstrumentingAgents&amp;, unsigned long identifier, const WebSocketFrame&amp;);
+    static void didSendWebSocketFrameImpl(InstrumentingAgents&amp;, unsigned long identifier, const WebSocketFrame&amp;);
+    static void didReceiveWebSocketFrameErrorImpl(InstrumentingAgents&amp;, unsigned long identifier, const String&amp;);
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    static void networkStateChangedImpl(InstrumentingAgents*);
-    static void updateApplicationCacheStatusImpl(InstrumentingAgents*, Frame*);
</del><ins>+    static void networkStateChangedImpl(InstrumentingAgents&amp;);
+    static void updateApplicationCacheStatusImpl(InstrumentingAgents&amp;, Frame*);
</ins><span class="cx"> 
</span><del>-    WEBCORE_EXPORT static InstrumentingAgents* instrumentingAgentsForPage(Page*);
</del><ins>+    static void layerTreeDidChangeImpl(InstrumentingAgents&amp;);
+    static void renderLayerDestroyedImpl(InstrumentingAgents&amp;, const RenderLayer&amp;);
+    static void pseudoElementDestroyedImpl(InstrumentingAgents&amp;, PseudoElement&amp;);
+
+    static InstrumentingAgents* instrumentingAgentsForPage(Page&amp;);
+    static InstrumentingAgents* instrumentingAgentsForFrame(Frame&amp;);
</ins><span class="cx">     static InstrumentingAgents* instrumentingAgentsForFrame(Frame*);
</span><span class="cx">     static InstrumentingAgents* instrumentingAgentsForContext(ScriptExecutionContext*);
</span><ins>+    static InstrumentingAgents* instrumentingAgentsForDocument(Document&amp;);
</ins><span class="cx">     static InstrumentingAgents* instrumentingAgentsForDocument(Document*);
</span><span class="cx">     static InstrumentingAgents* instrumentingAgentsForRenderer(RenderObject*);
</span><span class="cx"> 
</span><span class="cx">     static InstrumentingAgents* instrumentingAgentsForWorkerGlobalScope(WorkerGlobalScope*);
</span><span class="cx">     static InstrumentingAgents* instrumentingAgentsForNonDocumentContext(ScriptExecutionContext*);
</span><span class="cx"> 
</span><del>-    static void pauseOnNativeEventIfNeeded(InstrumentingAgents*, bool isDOMEvent, const String&amp; eventName, bool synchronous);
-    static void cancelPauseOnNativeEvent(InstrumentingAgents*);
</del><span class="cx">     static InspectorTimelineAgent* retrieveTimelineAgent(const InspectorInstrumentationCookie&amp;);
</span><span class="cx"> 
</span><del>-    static void layerTreeDidChangeImpl(InstrumentingAgents*);
-    static void renderLayerDestroyedImpl(InstrumentingAgents*, const RenderLayer*);
-    static void pseudoElementDestroyedImpl(InstrumentingAgents*, PseudoElement*);
</del><ins>+    static void pauseOnNativeEventIfNeeded(InstrumentingAgents&amp;, bool isDOMEvent, const String&amp; eventName, bool synchronous);
+    static void cancelPauseOnNativeEvent(InstrumentingAgents&amp;);
</ins><span class="cx"> 
</span><span class="cx">     WEBCORE_EXPORT static int s_frontendCounter;
</span><span class="cx"> #endif
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-inline void InspectorInstrumentation::didClearWindowObjectInWorld(Frame* frame, DOMWrapperWorld&amp; world)
</del><ins>+inline void InspectorInstrumentation::didClearWindowObjectInWorld(Frame&amp; frame, DOMWrapperWorld&amp; world)
</ins><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForFrame(frame))
</span><del>-        didClearWindowObjectInWorldImpl(instrumentingAgents, frame, world);
</del><ins>+        didClearWindowObjectInWorldImpl(*instrumentingAgents, frame, world);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(frame);
</span><span class="cx">     UNUSED_PARAM(world);
</span><span class="lines">@@ -510,67 +513,67 @@
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     FAST_RETURN_IF_NO_FRONTENDS(false);
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForFrame(frame))
</span><del>-        return isDebuggerPausedImpl(instrumentingAgents);
</del><ins>+        return isDebuggerPausedImpl(*instrumentingAgents);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(frame);
</span><span class="cx"> #endif
</span><span class="cx">     return false;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline void InspectorInstrumentation::willInsertDOMNode(Document* document, Node* parent)
</del><ins>+inline void InspectorInstrumentation::willInsertDOMNode(Document&amp; document, Node&amp; parent)
</ins><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     FAST_RETURN_IF_NO_FRONTENDS(void());
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForDocument(document))
</span><del>-        willInsertDOMNodeImpl(instrumentingAgents, parent);
</del><ins>+        willInsertDOMNodeImpl(*instrumentingAgents, parent);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(document);
</span><span class="cx">     UNUSED_PARAM(parent);
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline void InspectorInstrumentation::didInsertDOMNode(Document* document, Node* node)
</del><ins>+inline void InspectorInstrumentation::didInsertDOMNode(Document&amp; document, Node&amp; node)
</ins><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     FAST_RETURN_IF_NO_FRONTENDS(void());
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForDocument(document))
</span><del>-        didInsertDOMNodeImpl(instrumentingAgents, node);
</del><ins>+        didInsertDOMNodeImpl(*instrumentingAgents, node);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(document);
</span><span class="cx">     UNUSED_PARAM(node);
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline void InspectorInstrumentation::willRemoveDOMNode(Document* document, Node* node)
</del><ins>+inline void InspectorInstrumentation::willRemoveDOMNode(Document&amp; document, Node&amp; node)
</ins><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     FAST_RETURN_IF_NO_FRONTENDS(void());
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForDocument(document))
</span><del>-        willRemoveDOMNodeImpl(instrumentingAgents, node);
</del><ins>+        willRemoveDOMNodeImpl(*instrumentingAgents, node);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(document);
</span><span class="cx">     UNUSED_PARAM(node);
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline void InspectorInstrumentation::didRemoveDOMNode(Document* document, Node* node)
</del><ins>+inline void InspectorInstrumentation::didRemoveDOMNode(Document&amp; document, Node&amp; node)
</ins><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     FAST_RETURN_IF_NO_FRONTENDS(void());
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForDocument(document))
</span><del>-        didRemoveDOMNodeImpl(instrumentingAgents, node);
</del><ins>+        didRemoveDOMNodeImpl(*instrumentingAgents, node);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(document);
</span><span class="cx">     UNUSED_PARAM(node);
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline void InspectorInstrumentation::willModifyDOMAttr(Document* document, Element* element, const AtomicString&amp; oldValue, const AtomicString&amp; newValue)
</del><ins>+inline void InspectorInstrumentation::willModifyDOMAttr(Document&amp; document, Element&amp; element, const AtomicString&amp; oldValue, const AtomicString&amp; newValue)
</ins><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     FAST_RETURN_IF_NO_FRONTENDS(void());
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForDocument(document))
</span><del>-        willModifyDOMAttrImpl(instrumentingAgents, element, oldValue, newValue);
</del><ins>+        willModifyDOMAttrImpl(*instrumentingAgents, element, oldValue, newValue);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(document);
</span><span class="cx">     UNUSED_PARAM(element);
</span><span class="lines">@@ -579,12 +582,12 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline void InspectorInstrumentation::didModifyDOMAttr(Document* document, Element* element, const AtomicString&amp; name, const AtomicString&amp; value)
</del><ins>+inline void InspectorInstrumentation::didModifyDOMAttr(Document&amp; document, Element&amp; element, const AtomicString&amp; name, const AtomicString&amp; value)
</ins><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     FAST_RETURN_IF_NO_FRONTENDS(void());
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForDocument(document))
</span><del>-        didModifyDOMAttrImpl(instrumentingAgents, element, name, value);
</del><ins>+        didModifyDOMAttrImpl(*instrumentingAgents, element, name, value);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(document);
</span><span class="cx">     UNUSED_PARAM(element);
</span><span class="lines">@@ -593,12 +596,12 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline void InspectorInstrumentation::didRemoveDOMAttr(Document* document, Element* element, const AtomicString&amp; name)
</del><ins>+inline void InspectorInstrumentation::didRemoveDOMAttr(Document&amp; document, Element&amp; element, const AtomicString&amp; name)
</ins><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     FAST_RETURN_IF_NO_FRONTENDS(void());
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForDocument(document))
</span><del>-        didRemoveDOMAttrImpl(instrumentingAgents, element, name);
</del><ins>+        didRemoveDOMAttrImpl(*instrumentingAgents, element, name);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(document);
</span><span class="cx">     UNUSED_PARAM(element);
</span><span class="lines">@@ -606,12 +609,12 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline void InspectorInstrumentation::didInvalidateStyleAttr(Document* document, Node* node)
</del><ins>+inline void InspectorInstrumentation::didInvalidateStyleAttr(Document&amp; document, Node&amp; node)
</ins><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     FAST_RETURN_IF_NO_FRONTENDS(void());
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForDocument(document))
</span><del>-        didInvalidateStyleAttrImpl(instrumentingAgents, node);
</del><ins>+        didInvalidateStyleAttrImpl(*instrumentingAgents, node);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(document);
</span><span class="cx">     UNUSED_PARAM(node);
</span><span class="lines">@@ -622,90 +625,90 @@
</span><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForFrame(frame))
</span><del>-        frameWindowDiscardedImpl(instrumentingAgents, domWindow);
</del><ins>+        frameWindowDiscardedImpl(*instrumentingAgents, domWindow);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(frame);
</span><span class="cx">     UNUSED_PARAM(domWindow);
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline void InspectorInstrumentation::mediaQueryResultChanged(Document* document)
</del><ins>+inline void InspectorInstrumentation::mediaQueryResultChanged(Document&amp; document)
</ins><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     FAST_RETURN_IF_NO_FRONTENDS(void());
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForDocument(document))
</span><del>-        mediaQueryResultChangedImpl(instrumentingAgents);
</del><ins>+        mediaQueryResultChangedImpl(*instrumentingAgents);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(document);
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline void InspectorInstrumentation::didPushShadowRoot(Element* host, ShadowRoot* root)
</del><ins>+inline void InspectorInstrumentation::didPushShadowRoot(Element&amp; host, ShadowRoot&amp; root)
</ins><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     FAST_RETURN_IF_NO_FRONTENDS(void());
</span><del>-    if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForDocument(&amp;host-&gt;document()))
-        didPushShadowRootImpl(instrumentingAgents, host, root);
</del><ins>+    if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForDocument(host.document()))
+        didPushShadowRootImpl(*instrumentingAgents, host, root);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(host);
</span><span class="cx">     UNUSED_PARAM(root);
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline void InspectorInstrumentation::willPopShadowRoot(Element* host, ShadowRoot* root)
</del><ins>+inline void InspectorInstrumentation::willPopShadowRoot(Element&amp; host, ShadowRoot&amp; root)
</ins><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     FAST_RETURN_IF_NO_FRONTENDS(void());
</span><del>-    if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForDocument(&amp;host-&gt;document()))
-        willPopShadowRootImpl(instrumentingAgents, host, root);
</del><ins>+    if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForDocument(host.document()))
+        willPopShadowRootImpl(*instrumentingAgents, host, root);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(host);
</span><span class="cx">     UNUSED_PARAM(root);
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline void InspectorInstrumentation::didCreateNamedFlow(Document* document, WebKitNamedFlow* namedFlow)
</del><ins>+inline void InspectorInstrumentation::didCreateNamedFlow(Document* document, WebKitNamedFlow&amp; namedFlow)
</ins><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     FAST_RETURN_IF_NO_FRONTENDS(void());
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForDocument(document))
</span><del>-        didCreateNamedFlowImpl(instrumentingAgents, document, namedFlow);
</del><ins>+        didCreateNamedFlowImpl(*instrumentingAgents, document, namedFlow);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(document);
</span><span class="cx">     UNUSED_PARAM(namedFlow);
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline void InspectorInstrumentation::willRemoveNamedFlow(Document* document, WebKitNamedFlow* namedFlow)
</del><ins>+inline void InspectorInstrumentation::willRemoveNamedFlow(Document* document, WebKitNamedFlow&amp; namedFlow)
</ins><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     FAST_RETURN_IF_NO_FRONTENDS(void());
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForDocument(document))
</span><del>-        willRemoveNamedFlowImpl(instrumentingAgents, document, namedFlow);
</del><ins>+        willRemoveNamedFlowImpl(*instrumentingAgents, document, namedFlow);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(document);
</span><span class="cx">     UNUSED_PARAM(namedFlow);
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline void InspectorInstrumentation::didChangeRegionOverset(Document* document, WebKitNamedFlow* namedFlow)
</del><ins>+inline void InspectorInstrumentation::didChangeRegionOverset(Document&amp; document, WebKitNamedFlow&amp; namedFlow)
</ins><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     FAST_RETURN_IF_NO_FRONTENDS(void());
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForDocument(document))
</span><del>-        didChangeRegionOversetImpl(instrumentingAgents, document, namedFlow);
</del><ins>+        didChangeRegionOversetImpl(*instrumentingAgents, document, namedFlow);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(document);
</span><span class="cx">     UNUSED_PARAM(namedFlow);
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline void InspectorInstrumentation::didRegisterNamedFlowContentElement(Document* document, WebKitNamedFlow* namedFlow, Node* contentElement, Node* nextContentElement)
</del><ins>+inline void InspectorInstrumentation::didRegisterNamedFlowContentElement(Document&amp; document, WebKitNamedFlow&amp; namedFlow, Node&amp; contentElement, Node* nextContentElement)
</ins><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     FAST_RETURN_IF_NO_FRONTENDS(void());
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForDocument(document))
</span><del>-        didRegisterNamedFlowContentElementImpl(instrumentingAgents, document, namedFlow, contentElement, nextContentElement);
</del><ins>+        didRegisterNamedFlowContentElementImpl(*instrumentingAgents, document, namedFlow, contentElement, nextContentElement);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(document);
</span><span class="cx">     UNUSED_PARAM(namedFlow);
</span><span class="lines">@@ -714,12 +717,12 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline void InspectorInstrumentation::didUnregisterNamedFlowContentElement(Document* document, WebKitNamedFlow* namedFlow, Node* contentElement)
</del><ins>+inline void InspectorInstrumentation::didUnregisterNamedFlowContentElement(Document&amp; document, WebKitNamedFlow&amp; namedFlow, Node&amp; contentElement)
</ins><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     FAST_RETURN_IF_NO_FRONTENDS(void());
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForDocument(document))
</span><del>-        didUnregisterNamedFlowContentElementImpl(instrumentingAgents, document, namedFlow, contentElement);
</del><ins>+        didUnregisterNamedFlowContentElementImpl(*instrumentingAgents, document, namedFlow, contentElement);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(document);
</span><span class="cx">     UNUSED_PARAM(namedFlow);
</span><span class="lines">@@ -727,12 +730,12 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline void InspectorInstrumentation::mouseDidMoveOverElement(Page* page, const HitTestResult&amp; result, unsigned modifierFlags)
</del><ins>+inline void InspectorInstrumentation::mouseDidMoveOverElement(Page&amp; page, const HitTestResult&amp; result, unsigned modifierFlags)
</ins><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     FAST_RETURN_IF_NO_FRONTENDS(void());
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForPage(page))
</span><del>-        mouseDidMoveOverElementImpl(instrumentingAgents, result, modifierFlags);
</del><ins>+        mouseDidMoveOverElementImpl(*instrumentingAgents, result, modifierFlags);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(page);
</span><span class="cx">     UNUSED_PARAM(result);
</span><span class="lines">@@ -740,37 +743,37 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline bool InspectorInstrumentation::handleTouchEvent(Page* page, Node* node)
</del><ins>+inline bool InspectorInstrumentation::handleTouchEvent(Frame&amp; frame, Node&amp; node)
</ins><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     FAST_RETURN_IF_NO_FRONTENDS(false);
</span><del>-    if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForPage(page))
-        return handleTouchEventImpl(instrumentingAgents, node);
</del><ins>+    if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForFrame(frame))
+        return handleTouchEventImpl(*instrumentingAgents, node);
</ins><span class="cx"> #else
</span><del>-    UNUSED_PARAM(page);
</del><ins>+    UNUSED_PARAM(frame);
</ins><span class="cx">     UNUSED_PARAM(node);
</span><span class="cx"> #endif
</span><span class="cx">     return false;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline bool InspectorInstrumentation::handleMousePress(Page* page)
</del><ins>+inline bool InspectorInstrumentation::handleMousePress(Frame&amp; frame)
</ins><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     FAST_RETURN_IF_NO_FRONTENDS(false);
</span><del>-    if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForPage(page))
-        return handleMousePressImpl(instrumentingAgents);
</del><ins>+    if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForFrame(frame))
+        return handleMousePressImpl(*instrumentingAgents);
</ins><span class="cx"> #else
</span><del>-    UNUSED_PARAM(page);
</del><ins>+    UNUSED_PARAM(frame);
</ins><span class="cx"> #endif
</span><span class="cx">     return false;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline bool InspectorInstrumentation::forcePseudoState(Element* element, CSSSelector::PseudoClassType pseudoState)
</del><ins>+inline bool InspectorInstrumentation::forcePseudoState(Element&amp; element, CSSSelector::PseudoClassType pseudoState)
</ins><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     FAST_RETURN_IF_NO_FRONTENDS(false);
</span><del>-    if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForDocument(&amp;element-&gt;document()))
-        return forcePseudoStateImpl(instrumentingAgents, element, pseudoState);
</del><ins>+    if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForDocument(element.document()))
+        return forcePseudoStateImpl(*instrumentingAgents, element, pseudoState);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(element);
</span><span class="cx">     UNUSED_PARAM(pseudoState);
</span><span class="lines">@@ -778,12 +781,12 @@
</span><span class="cx">     return false;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline void InspectorInstrumentation::characterDataModified(Document* document, CharacterData* characterData)
</del><ins>+inline void InspectorInstrumentation::characterDataModified(Document&amp; document, CharacterData&amp; characterData)
</ins><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     FAST_RETURN_IF_NO_FRONTENDS(void());
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForDocument(document))
</span><del>-        characterDataModifiedImpl(instrumentingAgents, characterData);
</del><ins>+        characterDataModifiedImpl(*instrumentingAgents, characterData);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(document);
</span><span class="cx">     UNUSED_PARAM(characterData);
</span><span class="lines">@@ -795,7 +798,7 @@
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     FAST_RETURN_IF_NO_FRONTENDS(void());
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForContext(context))
</span><del>-        willSendXMLHttpRequestImpl(instrumentingAgents, url);
</del><ins>+        willSendXMLHttpRequestImpl(*instrumentingAgents, url);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(context);
</span><span class="cx">     UNUSED_PARAM(url);
</span><span class="lines">@@ -807,7 +810,7 @@
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     FAST_RETURN_IF_NO_FRONTENDS(void());
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForDocument(document))
</span><del>-        didScheduleResourceRequestImpl(instrumentingAgents, url, document-&gt;frame());
</del><ins>+        didScheduleResourceRequestImpl(*instrumentingAgents, url, document-&gt;frame());
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(document);
</span><span class="cx">     UNUSED_PARAM(url);
</span><span class="lines">@@ -819,7 +822,7 @@
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     FAST_RETURN_IF_NO_FRONTENDS(void());
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForContext(context))
</span><del>-        didInstallTimerImpl(instrumentingAgents, timerId, timeout, singleShot, context);
</del><ins>+        didInstallTimerImpl(*instrumentingAgents, timerId, timeout, singleShot, context);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(context);
</span><span class="cx">     UNUSED_PARAM(timerId);
</span><span class="lines">@@ -833,7 +836,7 @@
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     FAST_RETURN_IF_NO_FRONTENDS(void());
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForContext(context))
</span><del>-        didRemoveTimerImpl(instrumentingAgents, timerId, context);
</del><ins>+        didRemoveTimerImpl(*instrumentingAgents, timerId, context);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(context);
</span><span class="cx">     UNUSED_PARAM(timerId);
</span><span class="lines">@@ -845,7 +848,7 @@
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     FAST_RETURN_IF_NO_FRONTENDS(InspectorInstrumentationCookie());
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForContext(context))
</span><del>-        return willCallFunctionImpl(instrumentingAgents, scriptName, scriptLine, context);
</del><ins>+        return willCallFunctionImpl(*instrumentingAgents, scriptName, scriptLine, context);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(context);
</span><span class="cx">     UNUSED_PARAM(scriptName);
</span><span class="lines">@@ -867,12 +870,12 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline InspectorInstrumentationCookie InspectorInstrumentation::willDispatchXHRReadyStateChangeEvent(ScriptExecutionContext* context, XMLHttpRequest* request)
</del><ins>+inline InspectorInstrumentationCookie InspectorInstrumentation::willDispatchXHRReadyStateChangeEvent(ScriptExecutionContext* context, XMLHttpRequest&amp; request)
</ins><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     FAST_RETURN_IF_NO_FRONTENDS(InspectorInstrumentationCookie());
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForContext(context))
</span><del>-        return willDispatchXHRReadyStateChangeEventImpl(instrumentingAgents, request, context);
</del><ins>+        return willDispatchXHRReadyStateChangeEventImpl(*instrumentingAgents, request, context);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(context);
</span><span class="cx">     UNUSED_PARAM(request);
</span><span class="lines">@@ -891,12 +894,12 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline InspectorInstrumentationCookie InspectorInstrumentation::willDispatchEvent(Document* document, const Event&amp; event, bool hasEventListeners)
</del><ins>+inline InspectorInstrumentationCookie InspectorInstrumentation::willDispatchEvent(Document&amp; document, const Event&amp; event, bool hasEventListeners)
</ins><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     FAST_RETURN_IF_NO_FRONTENDS(InspectorInstrumentationCookie());
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForDocument(document))
</span><del>-        return willDispatchEventImpl(instrumentingAgents, event, hasEventListeners, document);
</del><ins>+        return willDispatchEventImpl(*instrumentingAgents, document, event, hasEventListeners);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(document);
</span><span class="cx">     UNUSED_PARAM(event);
</span><span class="lines">@@ -916,12 +919,12 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline InspectorInstrumentationCookie InspectorInstrumentation::willHandleEvent(ScriptExecutionContext* context, Event* event)
</del><ins>+inline InspectorInstrumentationCookie InspectorInstrumentation::willHandleEvent(ScriptExecutionContext* context, const Event&amp; event)
</ins><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     FAST_RETURN_IF_NO_FRONTENDS(InspectorInstrumentationCookie());
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForContext(context))
</span><del>-        return willHandleEventImpl(instrumentingAgents, event);
</del><ins>+        return willHandleEventImpl(*instrumentingAgents, event);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(context);
</span><span class="cx">     UNUSED_PARAM(event);
</span><span class="lines">@@ -940,12 +943,12 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline InspectorInstrumentationCookie InspectorInstrumentation::willDispatchEventOnWindow(Frame* frame, const Event&amp; event, DOMWindow* window)
</del><ins>+inline InspectorInstrumentationCookie InspectorInstrumentation::willDispatchEventOnWindow(Frame* frame, const Event&amp; event, DOMWindow&amp; window)
</ins><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     FAST_RETURN_IF_NO_FRONTENDS(InspectorInstrumentationCookie());
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForFrame(frame))
</span><del>-        return willDispatchEventOnWindowImpl(instrumentingAgents, event, window);
</del><ins>+        return willDispatchEventOnWindowImpl(*instrumentingAgents, event, window);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(frame);
</span><span class="cx">     UNUSED_PARAM(event);
</span><span class="lines">@@ -965,12 +968,12 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline InspectorInstrumentationCookie InspectorInstrumentation::willEvaluateScript(Frame* frame, const String&amp; url, int lineNumber)
</del><ins>+inline InspectorInstrumentationCookie InspectorInstrumentation::willEvaluateScript(Frame&amp; frame, const String&amp; url, int lineNumber)
</ins><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     FAST_RETURN_IF_NO_FRONTENDS(InspectorInstrumentationCookie());
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForFrame(frame))
</span><del>-        return willEvaluateScriptImpl(instrumentingAgents, url, lineNumber, frame);
</del><ins>+        return willEvaluateScriptImpl(*instrumentingAgents, frame, url, lineNumber);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(frame);
</span><span class="cx">     UNUSED_PARAM(url);
</span><span class="lines">@@ -979,7 +982,7 @@
</span><span class="cx">     return InspectorInstrumentationCookie();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline void InspectorInstrumentation::didEvaluateScript(const InspectorInstrumentationCookie&amp; cookie, Frame* frame)
</del><ins>+inline void InspectorInstrumentation::didEvaluateScript(const InspectorInstrumentationCookie&amp; cookie, Frame&amp; frame)
</ins><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     FAST_RETURN_IF_NO_FRONTENDS(void());
</span><span class="lines">@@ -991,37 +994,24 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline void InspectorInstrumentation::scriptsEnabled(Page* page, bool isEnabled)
</del><ins>+inline void InspectorInstrumentation::scriptsEnabled(Page&amp; page, bool isEnabled)
</ins><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     FAST_RETURN_IF_NO_FRONTENDS(void());
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForPage(page))
</span><del>-        return scriptsEnabledImpl(instrumentingAgents, isEnabled);
</del><ins>+        return scriptsEnabledImpl(*instrumentingAgents, isEnabled);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(page);
</span><span class="cx">     UNUSED_PARAM(isEnabled);
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline void InspectorInstrumentation::didCreateIsolatedContext(Frame* frame, JSC::ExecState* scriptState, SecurityOrigin* origin)
-{
-#if ENABLE(INSPECTOR)
-    FAST_RETURN_IF_NO_FRONTENDS(void());
-    if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForFrame(frame))
-        return didCreateIsolatedContextImpl(instrumentingAgents, frame, scriptState, origin);
-#else
-    UNUSED_PARAM(frame);
-    UNUSED_PARAM(scriptState);
-    UNUSED_PARAM(origin);
-#endif
-}
-
</del><span class="cx"> inline InspectorInstrumentationCookie InspectorInstrumentation::willFireTimer(ScriptExecutionContext* context, int timerId)
</span><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     FAST_RETURN_IF_NO_FRONTENDS(InspectorInstrumentationCookie());
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForContext(context))
</span><del>-        return willFireTimerImpl(instrumentingAgents, timerId, context);
</del><ins>+        return willFireTimerImpl(*instrumentingAgents, timerId, context);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(context);
</span><span class="cx">     UNUSED_PARAM(timerId);
</span><span class="lines">@@ -1040,23 +1030,23 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline void InspectorInstrumentation::didInvalidateLayout(Frame* frame)
</del><ins>+inline void InspectorInstrumentation::didInvalidateLayout(Frame&amp; frame)
</ins><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     FAST_RETURN_IF_NO_FRONTENDS(void());
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForFrame(frame))
</span><del>-        didInvalidateLayoutImpl(instrumentingAgents, frame);
</del><ins>+        didInvalidateLayoutImpl(*instrumentingAgents, frame);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(frame);
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline InspectorInstrumentationCookie InspectorInstrumentation::willLayout(Frame* frame)
</del><ins>+inline InspectorInstrumentationCookie InspectorInstrumentation::willLayout(Frame&amp; frame)
</ins><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     FAST_RETURN_IF_NO_FRONTENDS(InspectorInstrumentationCookie());
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForFrame(frame))
</span><del>-        return willLayoutImpl(instrumentingAgents, frame);
</del><ins>+        return willLayoutImpl(*instrumentingAgents, frame);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(frame);
</span><span class="cx"> #endif
</span><span class="lines">@@ -1075,23 +1065,23 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline void InspectorInstrumentation::didScroll(Page* page)
</del><ins>+inline void InspectorInstrumentation::didScroll(Page&amp; page)
</ins><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     FAST_RETURN_IF_NO_FRONTENDS(void());
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForPage(page))
</span><del>-        didScrollImpl(instrumentingAgents);
</del><ins>+        didScrollImpl(*instrumentingAgents);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(page);
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline InspectorInstrumentationCookie InspectorInstrumentation::willDispatchXHRLoadEvent(ScriptExecutionContext* context, XMLHttpRequest* request)
</del><ins>+inline InspectorInstrumentationCookie InspectorInstrumentation::willDispatchXHRLoadEvent(ScriptExecutionContext* context, XMLHttpRequest&amp; request)
</ins><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     FAST_RETURN_IF_NO_FRONTENDS(InspectorInstrumentationCookie());
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForContext(context))
</span><del>-        return willDispatchXHRLoadEventImpl(instrumentingAgents, request, context);
</del><ins>+        return willDispatchXHRLoadEventImpl(*instrumentingAgents, request, context);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(context);
</span><span class="cx">     UNUSED_PARAM(request);
</span><span class="lines">@@ -1115,7 +1105,7 @@
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     FAST_RETURN_IF_NO_FRONTENDS(void());
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForRenderer(renderer))
</span><del>-        return willPaintImpl(instrumentingAgents, renderer);
</del><ins>+        return willPaintImpl(*instrumentingAgents, renderer);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(renderer);
</span><span class="cx"> #endif
</span><span class="lines">@@ -1126,41 +1116,41 @@
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     FAST_RETURN_IF_NO_FRONTENDS(void());
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForRenderer(renderer))
</span><del>-        didPaintImpl(instrumentingAgents, renderer, rect);
</del><ins>+        didPaintImpl(*instrumentingAgents, renderer, rect);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(renderer);
</span><span class="cx">     UNUSED_PARAM(rect);
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline void InspectorInstrumentation::willScrollLayer(Frame* frame)
</del><ins>+inline void InspectorInstrumentation::willScrollLayer(Frame&amp; frame)
</ins><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     FAST_RETURN_IF_NO_FRONTENDS(void());
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForFrame(frame))
</span><del>-        willScrollLayerImpl(instrumentingAgents, frame);
</del><ins>+        willScrollLayerImpl(*instrumentingAgents, frame);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(frame);
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline void InspectorInstrumentation::didScrollLayer(Frame* frame)
</del><ins>+inline void InspectorInstrumentation::didScrollLayer(Frame&amp; frame)
</ins><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     FAST_RETURN_IF_NO_FRONTENDS(void());
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForFrame(frame))
</span><del>-        didScrollLayerImpl(instrumentingAgents);
</del><ins>+        didScrollLayerImpl(*instrumentingAgents);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(frame);
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline InspectorInstrumentationCookie InspectorInstrumentation::willRecalculateStyle(Document* document)
</del><ins>+inline InspectorInstrumentationCookie InspectorInstrumentation::willRecalculateStyle(Document&amp; document)
</ins><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     FAST_RETURN_IF_NO_FRONTENDS(InspectorInstrumentationCookie());
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForDocument(document))
</span><del>-        return willRecalculateStyleImpl(instrumentingAgents, document-&gt;frame());
</del><ins>+        return willRecalculateStyleImpl(*instrumentingAgents, document);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(document);
</span><span class="cx"> #endif
</span><span class="lines">@@ -1178,23 +1168,23 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline void InspectorInstrumentation::didScheduleStyleRecalculation(Document* document)
</del><ins>+inline void InspectorInstrumentation::didScheduleStyleRecalculation(Document&amp; document)
</ins><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     FAST_RETURN_IF_NO_FRONTENDS(void());
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForDocument(document))
</span><del>-        didScheduleStyleRecalculationImpl(instrumentingAgents, document);
</del><ins>+        didScheduleStyleRecalculationImpl(*instrumentingAgents, document);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(document);
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline void InspectorInstrumentation::applyEmulatedMedia(Frame* frame, String* media)
</del><ins>+inline void InspectorInstrumentation::applyEmulatedMedia(Frame&amp; frame, String&amp; media)
</ins><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     FAST_RETURN_IF_NO_FRONTENDS(void());
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForFrame(frame))
</span><del>-        applyEmulatedMediaImpl(instrumentingAgents, media);
</del><ins>+        applyEmulatedMediaImpl(*instrumentingAgents, media);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(frame);
</span><span class="cx">     UNUSED_PARAM(media);
</span><span class="lines">@@ -1205,7 +1195,7 @@
</span><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForFrame(frame))
</span><del>-        willSendRequestImpl(instrumentingAgents, identifier, loader, request, redirectResponse);
</del><ins>+        willSendRequestImpl(*instrumentingAgents, identifier, loader, request, redirectResponse);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(frame);
</span><span class="cx">     UNUSED_PARAM(identifier);
</span><span class="lines">@@ -1219,7 +1209,7 @@
</span><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForFrame(&amp;frame))
</span><del>-        InspectorInstrumentation::continueAfterPingLoaderImpl(instrumentingAgents, identifier, loader, request, response);
</del><ins>+        InspectorInstrumentation::continueAfterPingLoaderImpl(*instrumentingAgents, identifier, loader, request, response);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(frame);
</span><span class="cx">     UNUSED_PARAM(identifier);
</span><span class="lines">@@ -1229,22 +1219,22 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline void InspectorInstrumentation::markResourceAsCached(Page* page, unsigned long identifier)
</del><ins>+inline void InspectorInstrumentation::markResourceAsCached(Page&amp; page, unsigned long identifier)
</ins><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForPage(page))
</span><del>-        markResourceAsCachedImpl(instrumentingAgents, identifier);
</del><ins>+        markResourceAsCachedImpl(*instrumentingAgents, identifier);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(page);
</span><span class="cx">     UNUSED_PARAM(identifier);
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline void InspectorInstrumentation::didLoadResourceFromMemoryCache(Page* page, DocumentLoader* loader, CachedResource* resource)
</del><ins>+inline void InspectorInstrumentation::didLoadResourceFromMemoryCache(Page&amp; page, DocumentLoader* loader, CachedResource* resource)
</ins><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForPage(page))
</span><del>-        didLoadResourceFromMemoryCacheImpl(instrumentingAgents, loader, resource);
</del><ins>+        didLoadResourceFromMemoryCacheImpl(*instrumentingAgents, loader, resource);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(page);
</span><span class="cx">     UNUSED_PARAM(loader);
</span><span class="lines">@@ -1257,7 +1247,7 @@
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     FAST_RETURN_IF_NO_FRONTENDS(InspectorInstrumentationCookie());
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForFrame(frame))
</span><del>-        return willReceiveResourceDataImpl(instrumentingAgents, identifier, frame, length);
</del><ins>+        return willReceiveResourceDataImpl(*instrumentingAgents, frame, identifier, length);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(frame);
</span><span class="cx">     UNUSED_PARAM(identifier);
</span><span class="lines">@@ -1281,7 +1271,7 @@
</span><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForFrame(frame))
</span><del>-        return willReceiveResourceResponseImpl(instrumentingAgents, identifier, response, frame);
</del><ins>+        return willReceiveResourceResponseImpl(*instrumentingAgents, frame, identifier, response);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(frame);
</span><span class="cx">     UNUSED_PARAM(identifier);
</span><span class="lines">@@ -1305,7 +1295,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline void InspectorInstrumentation::continueAfterXFrameOptionsDenied(Frame* frame, DocumentLoader* loader, unsigned long identifier, const ResourceResponse&amp; r)
</del><ins>+inline void InspectorInstrumentation::continueAfterXFrameOptionsDenied(Frame* frame, DocumentLoader&amp; loader, unsigned long identifier, const ResourceResponse&amp; r)
</ins><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     FAST_RETURN_IF_NO_FRONTENDS(void());
</span><span class="lines">@@ -1318,7 +1308,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline void InspectorInstrumentation::continueWithPolicyDownload(Frame* frame, DocumentLoader* loader, unsigned long identifier, const ResourceResponse&amp; r)
</del><ins>+inline void InspectorInstrumentation::continueWithPolicyDownload(Frame* frame, DocumentLoader&amp; loader, unsigned long identifier, const ResourceResponse&amp; r)
</ins><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     FAST_RETURN_IF_NO_FRONTENDS(void());
</span><span class="lines">@@ -1331,7 +1321,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline void InspectorInstrumentation::continueWithPolicyIgnore(Frame* frame, DocumentLoader* loader, unsigned long identifier, const ResourceResponse&amp; r)
</del><ins>+inline void InspectorInstrumentation::continueWithPolicyIgnore(Frame* frame, DocumentLoader&amp; loader, unsigned long identifier, const ResourceResponse&amp; r)
</ins><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     FAST_RETURN_IF_NO_FRONTENDS(void());
</span><span class="lines">@@ -1348,7 +1338,7 @@
</span><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForFrame(frame))
</span><del>-        didReceiveDataImpl(instrumentingAgents, identifier, data, dataLength, encodedDataLength);
</del><ins>+        didReceiveDataImpl(*instrumentingAgents, identifier, data, dataLength, encodedDataLength);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(frame);
</span><span class="cx">     UNUSED_PARAM(identifier);
</span><span class="lines">@@ -1362,7 +1352,7 @@
</span><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForFrame(frame))
</span><del>-        didFinishLoadingImpl(instrumentingAgents, identifier, loader, finishTime);
</del><ins>+        didFinishLoadingImpl(*instrumentingAgents, identifier, loader, finishTime);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(frame);
</span><span class="cx">     UNUSED_PARAM(loader);
</span><span class="lines">@@ -1375,7 +1365,7 @@
</span><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForFrame(frame))
</span><del>-        didFailLoadingImpl(instrumentingAgents, identifier, loader, error);
</del><ins>+        didFailLoadingImpl(*instrumentingAgents, identifier, loader, error);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(frame);
</span><span class="cx">     UNUSED_PARAM(loader);
</span><span class="lines">@@ -1384,13 +1374,13 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline void InspectorInstrumentation::documentThreadableLoaderStartedLoadingForClient(ScriptExecutionContext* context, unsigned long identifier, ThreadableLoaderClient* client)
</del><ins>+inline void InspectorInstrumentation::documentThreadableLoaderStartedLoadingForClient(Document&amp; document, unsigned long identifier, ThreadableLoaderClient* client)
</ins><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><del>-    if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForContext(context))
-        documentThreadableLoaderStartedLoadingForClientImpl(instrumentingAgents, identifier, client);
</del><ins>+    if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForDocument(document))
+        documentThreadableLoaderStartedLoadingForClientImpl(*instrumentingAgents, identifier, client);
</ins><span class="cx"> #else
</span><del>-    UNUSED_PARAM(context);
</del><ins>+    UNUSED_PARAM(document);
</ins><span class="cx">     UNUSED_PARAM(identifier);
</span><span class="cx">     UNUSED_PARAM(client);
</span><span class="cx"> #endif
</span><span class="lines">@@ -1400,7 +1390,7 @@
</span><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForContext(context))
</span><del>-        willLoadXHRImpl(instrumentingAgents, client, method, url, async, formData, headers, includeCredentials);
</del><ins>+        willLoadXHRImpl(*instrumentingAgents, client, method, url, async, formData, headers, includeCredentials);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(context);
</span><span class="cx">     UNUSED_PARAM(client);
</span><span class="lines">@@ -1417,7 +1407,7 @@
</span><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForContext(context))
</span><del>-        didFailXHRLoadingImpl(instrumentingAgents, client);
</del><ins>+        didFailXHRLoadingImpl(*instrumentingAgents, client);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(context);
</span><span class="cx">     UNUSED_PARAM(client);
</span><span class="lines">@@ -1429,7 +1419,7 @@
</span><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForContext(context))
</span><del>-        didFinishXHRLoadingImpl(instrumentingAgents, client, identifier, sourceString, url, sendURL, sendLineNumber, sendColumnNumber);
</del><ins>+        didFinishXHRLoadingImpl(*instrumentingAgents, client, identifier, sourceString, url, sendURL, sendLineNumber, sendColumnNumber);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(context);
</span><span class="cx">     UNUSED_PARAM(client);
</span><span class="lines">@@ -1446,7 +1436,7 @@
</span><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForContext(context))
</span><del>-        didReceiveXHRResponseImpl(instrumentingAgents, identifier);
</del><ins>+        didReceiveXHRResponseImpl(*instrumentingAgents, identifier);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(context);
</span><span class="cx">     UNUSED_PARAM(identifier);
</span><span class="lines">@@ -1457,7 +1447,7 @@
</span><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForContext(context))
</span><del>-        willLoadXHRSynchronouslyImpl(instrumentingAgents);
</del><ins>+        willLoadXHRSynchronouslyImpl(*instrumentingAgents);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(context);
</span><span class="cx"> #endif
</span><span class="lines">@@ -1467,7 +1457,7 @@
</span><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForContext(context))
</span><del>-        didLoadXHRSynchronouslyImpl(instrumentingAgents);
</del><ins>+        didLoadXHRSynchronouslyImpl(*instrumentingAgents);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(context);
</span><span class="cx"> #endif
</span><span class="lines">@@ -1477,7 +1467,7 @@
</span><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForContext(context))
</span><del>-        scriptImportedImpl(instrumentingAgents, identifier, sourceString);
</del><ins>+        scriptImportedImpl(*instrumentingAgents, identifier, sourceString);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(context);
</span><span class="cx">     UNUSED_PARAM(identifier);
</span><span class="lines">@@ -1489,7 +1479,7 @@
</span><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForContext(context))
</span><del>-        scriptExecutionBlockedByCSPImpl(instrumentingAgents, directiveText);
</del><ins>+        scriptExecutionBlockedByCSPImpl(*instrumentingAgents, directiveText);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(context);
</span><span class="cx">     UNUSED_PARAM(directiveText);
</span><span class="lines">@@ -1500,18 +1490,18 @@
</span><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForContext(context))
</span><del>-        didReceiveScriptResponseImpl(instrumentingAgents, identifier);
</del><ins>+        didReceiveScriptResponseImpl(*instrumentingAgents, identifier);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(context);
</span><span class="cx">     UNUSED_PARAM(identifier);
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline void InspectorInstrumentation::domContentLoadedEventFired(Frame* frame)
</del><ins>+inline void InspectorInstrumentation::domContentLoadedEventFired(Frame&amp; frame)
</ins><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForFrame(frame))
</span><del>-        domContentLoadedEventFiredImpl(instrumentingAgents, frame);
</del><ins>+        domContentLoadedEventFiredImpl(*instrumentingAgents, frame);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(frame);
</span><span class="cx"> #endif
</span><span class="lines">@@ -1521,27 +1511,27 @@
</span><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForFrame(frame))
</span><del>-        loadEventFiredImpl(instrumentingAgents, frame);
</del><ins>+        loadEventFiredImpl(*instrumentingAgents, frame);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(frame);
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline void InspectorInstrumentation::frameDetachedFromParent(Frame* frame)
</del><ins>+inline void InspectorInstrumentation::frameDetachedFromParent(Frame&amp; frame)
</ins><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForFrame(frame))
</span><del>-        frameDetachedFromParentImpl(instrumentingAgents, frame);
</del><ins>+        frameDetachedFromParentImpl(*instrumentingAgents, frame);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(frame);
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline void InspectorInstrumentation::didCommitLoad(Frame* frame, DocumentLoader* loader)
</del><ins>+inline void InspectorInstrumentation::didCommitLoad(Frame&amp; frame, DocumentLoader* loader)
</ins><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForFrame(frame))
</span><del>-        didCommitLoadImpl(instrumentingAgents, frame-&gt;page(), loader);
</del><ins>+        didCommitLoadImpl(*instrumentingAgents, frame.page(), loader);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(frame);
</span><span class="cx">     UNUSED_PARAM(loader);
</span><span class="lines">@@ -1553,17 +1543,17 @@
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     FAST_RETURN_IF_NO_FRONTENDS(void());
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForFrame(frame))
</span><del>-        frameDocumentUpdatedImpl(instrumentingAgents, frame);
</del><ins>+        frameDocumentUpdatedImpl(*instrumentingAgents, frame);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(frame);
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline void InspectorInstrumentation::loaderDetachedFromFrame(Frame* frame, DocumentLoader* loader)
</del><ins>+inline void InspectorInstrumentation::loaderDetachedFromFrame(Frame&amp; frame, DocumentLoader&amp; loader)
</ins><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForFrame(frame))
</span><del>-        loaderDetachedFromFrameImpl(instrumentingAgents, loader);
</del><ins>+        loaderDetachedFromFrameImpl(*instrumentingAgents, loader);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(frame);
</span><span class="cx">     UNUSED_PARAM(loader);
</span><span class="lines">@@ -1611,12 +1601,12 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline InspectorInstrumentationCookie InspectorInstrumentation::willRunJavaScriptDialog(Page* page, const String&amp; message)
</del><ins>+inline InspectorInstrumentationCookie InspectorInstrumentation::willRunJavaScriptDialog(Page&amp; page, const String&amp; message)
</ins><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     FAST_RETURN_IF_NO_FRONTENDS(InspectorInstrumentationCookie());
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForPage(page))
</span><del>-        return willRunJavaScriptDialogImpl(instrumentingAgents, message);
</del><ins>+        return willRunJavaScriptDialogImpl(*instrumentingAgents, message);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(page);
</span><span class="cx">     UNUSED_PARAM(message);
</span><span class="lines">@@ -1635,7 +1625,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline void InspectorInstrumentation::willDestroyCachedResource(CachedResource* cachedResource)
</del><ins>+inline void InspectorInstrumentation::willDestroyCachedResource(CachedResource&amp; cachedResource)
</ins><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     FAST_RETURN_IF_NO_FRONTENDS(void());
</span><span class="lines">@@ -1650,7 +1640,7 @@
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     FAST_RETURN_IF_NO_FRONTENDS(InspectorInstrumentationCookie());
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForDocument(document))
</span><del>-        return willWriteHTMLImpl(instrumentingAgents, startLine, document-&gt;frame());
</del><ins>+        return willWriteHTMLImpl(*instrumentingAgents, startLine, document-&gt;frame());
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(document);
</span><span class="cx">     UNUSED_PARAM(startLine);
</span><span class="lines">@@ -1675,7 +1665,7 @@
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     FAST_RETURN_IF_NO_FRONTENDS(void());
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForPage(page))
</span><del>-        didDispatchDOMStorageEventImpl(instrumentingAgents, key, oldValue, newValue, storageType, securityOrigin, page);
</del><ins>+        didDispatchDOMStorageEventImpl(*instrumentingAgents, key, oldValue, newValue, storageType, securityOrigin, page);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(key);
</span><span class="cx">     UNUSED_PARAM(oldValue);
</span><span class="lines">@@ -1691,7 +1681,7 @@
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     FAST_RETURN_IF_NO_FRONTENDS(false);
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForContext(context))
</span><del>-        return shouldPauseDedicatedWorkerOnStartImpl(instrumentingAgents);
</del><ins>+        return shouldPauseDedicatedWorkerOnStartImpl(*instrumentingAgents);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(context);
</span><span class="cx"> #endif
</span><span class="lines">@@ -1702,7 +1692,7 @@
</span><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForContext(context))
</span><del>-        didStartWorkerGlobalScopeImpl(instrumentingAgents, proxy, url);
</del><ins>+        didStartWorkerGlobalScopeImpl(*instrumentingAgents, proxy, url);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(context);
</span><span class="cx">     UNUSED_PARAM(proxy);
</span><span class="lines">@@ -1714,7 +1704,7 @@
</span><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForContext(context))
</span><del>-        workerGlobalScopeTerminatedImpl(instrumentingAgents, proxy);
</del><ins>+        workerGlobalScopeTerminatedImpl(*instrumentingAgents, proxy);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(context);
</span><span class="cx">     UNUSED_PARAM(proxy);
</span><span class="lines">@@ -1726,7 +1716,7 @@
</span><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForDocument(document))
</span><del>-        didCreateWebSocketImpl(instrumentingAgents, identifier, requestURL, documentURL, protocol, document);
</del><ins>+        didCreateWebSocketImpl(*instrumentingAgents, identifier, requestURL, documentURL, protocol, document);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(document);
</span><span class="cx">     UNUSED_PARAM(identifier);
</span><span class="lines">@@ -1740,7 +1730,7 @@
</span><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForDocument(document))
</span><del>-        willSendWebSocketHandshakeRequestImpl(instrumentingAgents, identifier, request, document);
</del><ins>+        willSendWebSocketHandshakeRequestImpl(*instrumentingAgents, identifier, request, document);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(document);
</span><span class="cx">     UNUSED_PARAM(identifier);
</span><span class="lines">@@ -1752,7 +1742,7 @@
</span><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForDocument(document))
</span><del>-        didReceiveWebSocketHandshakeResponseImpl(instrumentingAgents, identifier, response, document);
</del><ins>+        didReceiveWebSocketHandshakeResponseImpl(*instrumentingAgents, identifier, response, document);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(document);
</span><span class="cx">     UNUSED_PARAM(identifier);
</span><span class="lines">@@ -1764,7 +1754,7 @@
</span><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForDocument(document))
</span><del>-        didCloseWebSocketImpl(instrumentingAgents, identifier, document);
</del><ins>+        didCloseWebSocketImpl(*instrumentingAgents, identifier, document);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(document);
</span><span class="cx">     UNUSED_PARAM(identifier);
</span><span class="lines">@@ -1774,7 +1764,7 @@
</span><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForDocument(document))
</span><del>-        didReceiveWebSocketFrameImpl(instrumentingAgents, identifier, frame);
</del><ins>+        didReceiveWebSocketFrameImpl(*instrumentingAgents, identifier, frame);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(document);
</span><span class="cx">     UNUSED_PARAM(identifier);
</span><span class="lines">@@ -1785,7 +1775,7 @@
</span><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForDocument(document))
</span><del>-        didReceiveWebSocketFrameErrorImpl(instrumentingAgents, identifier, errorMessage);
</del><ins>+        didReceiveWebSocketFrameErrorImpl(*instrumentingAgents, identifier, errorMessage);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(document);
</span><span class="cx">     UNUSED_PARAM(identifier);
</span><span class="lines">@@ -1796,7 +1786,7 @@
</span><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForDocument(document))
</span><del>-        didSendWebSocketFrameImpl(instrumentingAgents, identifier, frame);
</del><ins>+        didSendWebSocketFrameImpl(*instrumentingAgents, identifier, frame);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(document);
</span><span class="cx">     UNUSED_PARAM(identifier);
</span><span class="lines">@@ -1806,151 +1796,151 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(WEB_REPLAY)
</span><del>-inline void InspectorInstrumentation::sessionCreated(Page* page, PassRefPtr&lt;ReplaySession&gt; session)
</del><ins>+inline void InspectorInstrumentation::sessionCreated(Page&amp; page, PassRefPtr&lt;ReplaySession&gt; session)
</ins><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     FAST_RETURN_IF_NO_FRONTENDS(void());
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForPage(page))
</span><del>-        sessionCreatedImpl(instrumentingAgents, session);
</del><ins>+        sessionCreatedImpl(*instrumentingAgents, session);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(page);
</span><span class="cx">     UNUSED_PARAM(session);
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline void InspectorInstrumentation::sessionLoaded(Page* page, PassRefPtr&lt;ReplaySession&gt; session)
</del><ins>+inline void InspectorInstrumentation::sessionLoaded(Page&amp; page, PassRefPtr&lt;ReplaySession&gt; session)
</ins><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     FAST_RETURN_IF_NO_FRONTENDS(void());
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForPage(page))
</span><del>-        sessionLoadedImpl(instrumentingAgents, session);
</del><ins>+        sessionLoadedImpl(*instrumentingAgents, session);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(page);
</span><span class="cx">     UNUSED_PARAM(session);
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline void InspectorInstrumentation::sessionModified(Page* page, PassRefPtr&lt;ReplaySession&gt; session)
</del><ins>+inline void InspectorInstrumentation::sessionModified(Page&amp; page, PassRefPtr&lt;ReplaySession&gt; session)
</ins><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     FAST_RETURN_IF_NO_FRONTENDS(void());
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForPage(page))
</span><del>-        sessionModifiedImpl(instrumentingAgents, session);
</del><ins>+        sessionModifiedImpl(*instrumentingAgents, session);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(page);
</span><span class="cx">     UNUSED_PARAM(session);
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline void InspectorInstrumentation::segmentCreated(Page* page, PassRefPtr&lt;ReplaySessionSegment&gt; segment)
</del><ins>+inline void InspectorInstrumentation::segmentCreated(Page&amp; page, PassRefPtr&lt;ReplaySessionSegment&gt; segment)
</ins><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     FAST_RETURN_IF_NO_FRONTENDS(void());
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForPage(page))
</span><del>-        segmentCreatedImpl(instrumentingAgents, segment);
</del><ins>+        segmentCreatedImpl(*instrumentingAgents, segment);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(page);
</span><span class="cx">     UNUSED_PARAM(segment);
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline void InspectorInstrumentation::segmentCompleted(Page* page, PassRefPtr&lt;ReplaySessionSegment&gt; segment)
</del><ins>+inline void InspectorInstrumentation::segmentCompleted(Page&amp; page, PassRefPtr&lt;ReplaySessionSegment&gt; segment)
</ins><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     FAST_RETURN_IF_NO_FRONTENDS(void());
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForPage(page))
</span><del>-        segmentCompletedImpl(instrumentingAgents, segment);
</del><ins>+        segmentCompletedImpl(*instrumentingAgents, segment);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(page);
</span><span class="cx">     UNUSED_PARAM(segment);
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline void InspectorInstrumentation::segmentLoaded(Page* page, PassRefPtr&lt;ReplaySessionSegment&gt; segment)
</del><ins>+inline void InspectorInstrumentation::segmentLoaded(Page&amp; page, PassRefPtr&lt;ReplaySessionSegment&gt; segment)
</ins><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     FAST_RETURN_IF_NO_FRONTENDS(void());
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForPage(page))
</span><del>-        segmentLoadedImpl(instrumentingAgents, segment);
</del><ins>+        segmentLoadedImpl(*instrumentingAgents, segment);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(page);
</span><span class="cx">     UNUSED_PARAM(segment);
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline void InspectorInstrumentation::segmentUnloaded(Page* page)
</del><ins>+inline void InspectorInstrumentation::segmentUnloaded(Page&amp; page)
</ins><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     FAST_RETURN_IF_NO_FRONTENDS(void());
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForPage(page))
</span><del>-        segmentUnloadedImpl(instrumentingAgents);
</del><ins>+        segmentUnloadedImpl(*instrumentingAgents);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(page);
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline void InspectorInstrumentation::captureStarted(Page* page)
</del><ins>+inline void InspectorInstrumentation::captureStarted(Page&amp; page)
</ins><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     FAST_RETURN_IF_NO_FRONTENDS(void());
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForPage(page))
</span><del>-        captureStartedImpl(instrumentingAgents);
</del><ins>+        captureStartedImpl(*instrumentingAgents);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(page);
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline void InspectorInstrumentation::captureStopped(Page* page)
</del><ins>+inline void InspectorInstrumentation::captureStopped(Page&amp; page)
</ins><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     FAST_RETURN_IF_NO_FRONTENDS(void());
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForPage(page))
</span><del>-        captureStoppedImpl(instrumentingAgents);
</del><ins>+        captureStoppedImpl(*instrumentingAgents);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(page);
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline void InspectorInstrumentation::playbackStarted(Page* page)
</del><ins>+inline void InspectorInstrumentation::playbackStarted(Page&amp; page)
</ins><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     FAST_RETURN_IF_NO_FRONTENDS(void());
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForPage(page))
</span><del>-        playbackStartedImpl(instrumentingAgents);
</del><ins>+        playbackStartedImpl(*instrumentingAgents);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(page);
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline void InspectorInstrumentation::playbackPaused(Page* page, const ReplayPosition&amp; position)
</del><ins>+inline void InspectorInstrumentation::playbackPaused(Page&amp; page, const ReplayPosition&amp; position)
</ins><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     FAST_RETURN_IF_NO_FRONTENDS(void());
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForPage(page))
</span><del>-        playbackPausedImpl(instrumentingAgents, position);
</del><ins>+        playbackPausedImpl(*instrumentingAgents, position);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(page);
</span><span class="cx">     UNUSED_PARAM(position);
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline void InspectorInstrumentation::playbackFinished(Page* page)
</del><ins>+inline void InspectorInstrumentation::playbackFinished(Page&amp; page)
</ins><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     FAST_RETURN_IF_NO_FRONTENDS(void());
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForPage(page))
</span><del>-        playbackFinishedImpl(instrumentingAgents);
</del><ins>+        playbackFinishedImpl(*instrumentingAgents);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(page);
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline void InspectorInstrumentation::playbackHitPosition(Page* page, const ReplayPosition&amp; position)
</del><ins>+inline void InspectorInstrumentation::playbackHitPosition(Page&amp; page, const ReplayPosition&amp; position)
</ins><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     FAST_RETURN_IF_NO_FRONTENDS(void());
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForPage(page))
</span><del>-        playbackHitPositionImpl(instrumentingAgents, position);
</del><ins>+        playbackHitPositionImpl(*instrumentingAgents, position);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(page);
</span><span class="cx">     UNUSED_PARAM(position);
</span><span class="lines">@@ -1963,7 +1953,7 @@
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     FAST_RETURN_IF_NO_FRONTENDS(void());
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForPage(page))
</span><del>-        networkStateChangedImpl(instrumentingAgents);
</del><ins>+        networkStateChangedImpl(*instrumentingAgents);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(page);
</span><span class="cx"> #endif
</span><span class="lines">@@ -1974,7 +1964,7 @@
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     FAST_RETURN_IF_NO_FRONTENDS(void());
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForFrame(frame))
</span><del>-        updateApplicationCacheStatusImpl(instrumentingAgents, frame);
</del><ins>+        updateApplicationCacheStatusImpl(*instrumentingAgents, frame);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(frame);
</span><span class="cx"> #endif
</span><span class="lines">@@ -1984,7 +1974,7 @@
</span><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForDocument(document))
</span><del>-        didRequestAnimationFrameImpl(instrumentingAgents, callbackId, document-&gt;frame());
</del><ins>+        didRequestAnimationFrameImpl(*instrumentingAgents, callbackId, document-&gt;frame());
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(document);
</span><span class="cx">     UNUSED_PARAM(callbackId);
</span><span class="lines">@@ -1995,7 +1985,7 @@
</span><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForDocument(document))
</span><del>-        didCancelAnimationFrameImpl(instrumentingAgents, callbackId, document-&gt;frame());
</del><ins>+        didCancelAnimationFrameImpl(*instrumentingAgents, callbackId, document-&gt;frame());
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(document);
</span><span class="cx">     UNUSED_PARAM(callbackId);
</span><span class="lines">@@ -2006,7 +1996,7 @@
</span><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForDocument(document))
</span><del>-        return willFireAnimationFrameImpl(instrumentingAgents, callbackId, document-&gt;frame());
</del><ins>+        return willFireAnimationFrameImpl(*instrumentingAgents, callbackId, document-&gt;frame());
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(document);
</span><span class="cx">     UNUSED_PARAM(callbackId);
</span><span class="lines">@@ -2029,28 +2019,28 @@
</span><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForPage(page))
</span><del>-        layerTreeDidChangeImpl(instrumentingAgents);
</del><ins>+        layerTreeDidChangeImpl(*instrumentingAgents);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(page);
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline void InspectorInstrumentation::renderLayerDestroyed(Page* page, const RenderLayer* renderLayer)
</del><ins>+inline void InspectorInstrumentation::renderLayerDestroyed(Page* page, const RenderLayer&amp; renderLayer)
</ins><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForPage(page))
</span><del>-        renderLayerDestroyedImpl(instrumentingAgents, renderLayer);
</del><ins>+        renderLayerDestroyedImpl(*instrumentingAgents, renderLayer);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(page);
</span><span class="cx">     UNUSED_PARAM(renderLayer);
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline void InspectorInstrumentation::pseudoElementDestroyed(Page* page, PseudoElement* pseudoElement)
</del><ins>+inline void InspectorInstrumentation::pseudoElementDestroyed(Page* page, PseudoElement&amp; pseudoElement)
</ins><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForPage(page))
</span><del>-        pseudoElementDestroyedImpl(instrumentingAgents, pseudoElement);
</del><ins>+        pseudoElementDestroyedImpl(*instrumentingAgents, pseudoElement);
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(page);
</span><span class="cx">     UNUSED_PARAM(pseudoElement);
</span><span class="lines">@@ -2069,22 +2059,27 @@
</span><span class="cx"> 
</span><span class="cx"> inline InstrumentingAgents* InspectorInstrumentation::instrumentingAgentsForFrame(Frame* frame)
</span><span class="cx"> {
</span><del>-    if (frame)
-        return instrumentingAgentsForPage(frame-&gt;page());
-    return nullptr;
</del><ins>+    return frame ? instrumentingAgentsForFrame(*frame) : nullptr;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+inline InstrumentingAgents* InspectorInstrumentation::instrumentingAgentsForFrame(Frame&amp; frame)
+{
+    return instrumentingAgentsForPage(frame.page());
+}
+
</ins><span class="cx"> inline InstrumentingAgents* InspectorInstrumentation::instrumentingAgentsForDocument(Document* document)
</span><span class="cx"> {
</span><del>-    if (document) {
-        Page* page = document-&gt;page();
</del><ins>+    return document ? instrumentingAgentsForDocument(*document) : nullptr;
+}
+
+inline InstrumentingAgents* InspectorInstrumentation::instrumentingAgentsForDocument(Document&amp; document)
+{
+    Page* page = document.page();
</ins><span class="cx"> #if ENABLE(TEMPLATE_ELEMENT)
</span><del>-        if (!page &amp;&amp; document-&gt;templateDocumentHost())
-            page = document-&gt;templateDocumentHost()-&gt;page();
</del><ins>+    if (!page &amp;&amp; document.templateDocumentHost())
+        page = document.templateDocumentHost()-&gt;page();
</ins><span class="cx"> #endif
</span><del>-        return instrumentingAgentsForPage(page);
-    }
-    return nullptr;
</del><ins>+    return instrumentingAgentsForPage(page);
</ins><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorInspectorInstrumentationCookiecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/InspectorInstrumentationCookie.cpp (177924 => 177925)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/InspectorInstrumentationCookie.cpp        2015-01-05 21:11:44 UTC (rev 177924)
+++ trunk/Source/WebCore/inspector/InspectorInstrumentationCookie.cpp        2015-01-05 21:30:33 UTC (rev 177925)
</span><span class="lines">@@ -38,13 +38,12 @@
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="cx"> InspectorInstrumentationCookie::InspectorInstrumentationCookie()
</span><del>-    : m_instrumentingAgents(nullptr)
-    , m_timelineAgentId(0)
</del><ins>+    : m_timelineAgentId(0)
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-InspectorInstrumentationCookie::InspectorInstrumentationCookie(InstrumentingAgents* agents, int timelineAgentId)
-    : m_instrumentingAgents(agents)
</del><ins>+InspectorInstrumentationCookie::InspectorInstrumentationCookie(InstrumentingAgents&amp; agents, int timelineAgentId)
+    : m_instrumentingAgents(&amp;agents)
</ins><span class="cx">     , m_timelineAgentId(timelineAgentId)
</span><span class="cx"> {
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorInspectorInstrumentationCookieh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/InspectorInstrumentationCookie.h (177924 => 177925)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/InspectorInstrumentationCookie.h        2015-01-05 21:11:44 UTC (rev 177924)
+++ trunk/Source/WebCore/inspector/InspectorInstrumentationCookie.h        2015-01-05 21:30:33 UTC (rev 177925)
</span><span class="lines">@@ -33,16 +33,17 @@
</span><span class="cx"> 
</span><span class="cx"> #include &lt;wtf/RefPtr.h&gt;
</span><span class="cx"> 
</span><ins>+#if ENABLE(INSPECTOR)
+
</ins><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="cx"> class InspectorInstrumentation;
</span><span class="cx"> class InstrumentingAgents;
</span><span class="cx"> 
</span><span class="cx"> class InspectorInstrumentationCookie {
</span><del>-#if ENABLE(INSPECTOR)
</del><span class="cx"> public:
</span><span class="cx">     InspectorInstrumentationCookie();
</span><del>-    InspectorInstrumentationCookie(InstrumentingAgents*, int);
</del><ins>+    InspectorInstrumentationCookie(InstrumentingAgents&amp;, int);
</ins><span class="cx">     InspectorInstrumentationCookie(const InspectorInstrumentationCookie&amp;);
</span><span class="cx">     InspectorInstrumentationCookie&amp; operator=(const InspectorInstrumentationCookie&amp;);
</span><span class="cx">     ~InspectorInstrumentationCookie();
</span><span class="lines">@@ -54,9 +55,10 @@
</span><span class="cx"> private:
</span><span class="cx">     RefPtr&lt;InstrumentingAgents&gt; m_instrumentingAgents;
</span><span class="cx">     int m_timelineAgentId;
</span><del>-#endif
</del><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span><ins>+#endif // ENABLE(INSPECTOR)
+
</ins><span class="cx"> #endif // InspectorInstrumentationCookie_h
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorInstrumentingAgentscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/InstrumentingAgents.cpp (177924 => 177925)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/InstrumentingAgents.cpp        2015-01-05 21:11:44 UTC (rev 177924)
+++ trunk/Source/WebCore/inspector/InstrumentingAgents.cpp        2015-01-05 21:30:33 UTC (rev 177925)
</span><span class="lines">@@ -99,17 +99,6 @@
</span><span class="cx">     m_inspectorWorkerAgent = nullptr;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-InstrumentingAgents* instrumentationForPage(Page* page)
-{
-    ASSERT(isMainThread());
-    return page ? page-&gt;inspectorController().m_instrumentingAgents.get() : nullptr;
-}
-
-InstrumentingAgents* instrumentationForWorkerGlobalScope(WorkerGlobalScope* workerGlobalScope)
-{
-    return workerGlobalScope ? workerGlobalScope-&gt;workerInspectorController().m_instrumentingAgents.get() : nullptr;
-}
-
</del><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span><span class="cx"> #endif // ENABLE(INSPECTOR)
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorInstrumentingAgentsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/InstrumentingAgents.h (177924 => 177925)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/InstrumentingAgents.h        2015-01-05 21:11:44 UTC (rev 177924)
+++ trunk/Source/WebCore/inspector/InstrumentingAgents.h        2015-01-05 21:30:33 UTC (rev 177925)
</span><span class="lines">@@ -168,9 +168,6 @@
</span><span class="cx">     InspectorWorkerAgent* m_inspectorWorkerAgent;
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-WEBCORE_EXPORT InstrumentingAgents* instrumentationForPage(Page*);
-InstrumentingAgents* instrumentationForWorkerGlobalScope(WorkerGlobalScope*);
-
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #endif // !defined(InstrumentingAgents_h)
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorWorkerInspectorControllerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/WorkerInspectorController.h (177924 => 177925)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/WorkerInspectorController.h        2015-01-05 21:11:44 UTC (rev 177924)
+++ trunk/Source/WebCore/inspector/WorkerInspectorController.h        2015-01-05 21:30:33 UTC (rev 177925)
</span><span class="lines">@@ -77,7 +77,7 @@
</span><span class="cx">     virtual PassRefPtr&lt;WTF::Stopwatch&gt; executionStopwatch() override;
</span><span class="cx"> 
</span><span class="cx"> private:
</span><del>-    friend InstrumentingAgents* instrumentationForWorkerGlobalScope(WorkerGlobalScope*);
</del><ins>+    friend class InspectorInstrumentation;
</ins><span class="cx"> 
</span><span class="cx">     WorkerGlobalScope&amp; m_workerGlobalScope;
</span><span class="cx">     RefPtr&lt;InstrumentingAgents&gt; m_instrumentingAgents;
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderDocumentLoadercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/DocumentLoader.cpp (177924 => 177925)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/DocumentLoader.cpp        2015-01-05 21:11:44 UTC (rev 177924)
+++ trunk/Source/WebCore/loader/DocumentLoader.cpp        2015-01-05 21:30:33 UTC (rev 177925)
</span><span class="lines">@@ -612,7 +612,7 @@
</span><span class="cx">         unsigned long identifier = m_identifierForLoadWithoutResourceLoader ? m_identifierForLoadWithoutResourceLoader : m_mainResource-&gt;identifier();
</span><span class="cx">         ASSERT(identifier);
</span><span class="cx">         if (frameLoader()-&gt;shouldInterruptLoadForXFrameOptions(content, response.url(), identifier)) {
</span><del>-            InspectorInstrumentation::continueAfterXFrameOptionsDenied(m_frame, this, identifier, response);
</del><ins>+            InspectorInstrumentation::continueAfterXFrameOptionsDenied(m_frame, *this, identifier, response);
</ins><span class="cx">             String message = &quot;Refused to display '&quot; + response.url().stringCenterEllipsizedToLength() + &quot;' in a frame because it set 'X-Frame-Options' to '&quot; + content + &quot;'.&quot;;
</span><span class="cx">             frame()-&gt;document()-&gt;addConsoleMessage(MessageSource::Security, MessageLevel::Error, message, identifier);
</span><span class="cx">             frame()-&gt;document()-&gt;enforceSandboxFlags(SandboxOrigin);
</span><span class="lines">@@ -709,7 +709,7 @@
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         if (ResourceLoader* mainResourceLoader = this-&gt;mainResourceLoader())
</span><del>-            InspectorInstrumentation::continueWithPolicyDownload(m_frame, this, mainResourceLoader-&gt;identifier(), m_response);
</del><ins>+            InspectorInstrumentation::continueWithPolicyDownload(m_frame, *this, mainResourceLoader-&gt;identifier(), m_response);
</ins><span class="cx"> 
</span><span class="cx">         // When starting the request, we didn't know that it would result in download and not navigation. Now we know that main document URL didn't change.
</span><span class="cx">         // Download may use this knowledge for purposes unrelated to cookies, notably for setting file quarantine data.
</span><span class="lines">@@ -723,7 +723,7 @@
</span><span class="cx">     }
</span><span class="cx">     case PolicyIgnore:
</span><span class="cx">         if (ResourceLoader* mainResourceLoader = this-&gt;mainResourceLoader())
</span><del>-            InspectorInstrumentation::continueWithPolicyIgnore(m_frame, this, mainResourceLoader-&gt;identifier(), m_response);
</del><ins>+            InspectorInstrumentation::continueWithPolicyIgnore(m_frame, *this, mainResourceLoader-&gt;identifier(), m_response);
</ins><span class="cx">         stopLoadingForPolicyChange();
</span><span class="cx">         return;
</span><span class="cx">     
</span><span class="lines">@@ -948,7 +948,7 @@
</span><span class="cx">         m_mainResource-&gt;removeClient(this);
</span><span class="cx"> 
</span><span class="cx">     m_applicationCacheHost-&gt;setDOMApplicationCache(0);
</span><del>-    InspectorInstrumentation::loaderDetachedFromFrame(m_frame, this);
</del><ins>+    InspectorInstrumentation::loaderDetachedFromFrame(*m_frame, *this);
</ins><span class="cx">     m_frame = 0;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderDocumentThreadableLoadercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/DocumentThreadableLoader.cpp (177924 => 177925)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/DocumentThreadableLoader.cpp        2015-01-05 21:11:44 UTC (rev 177924)
+++ trunk/Source/WebCore/loader/DocumentThreadableLoader.cpp        2015-01-05 21:30:33 UTC (rev 177925)
</span><span class="lines">@@ -286,11 +286,7 @@
</span><span class="cx"> 
</span><span class="cx">     // Preflight data should be invisible to clients.
</span><span class="cx">     if (m_actualRequest) {
</span><del>-#if ENABLE(INSPECTOR)
</del><span class="cx">         InspectorInstrumentation::didReceiveData(m_document.frame(), identifier, 0, 0, dataLength);
</span><del>-#else
-        UNUSED_PARAM(identifier);
-#endif
</del><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -311,9 +307,8 @@
</span><span class="cx"> void DocumentThreadableLoader::didFinishLoading(unsigned long identifier, double finishTime)
</span><span class="cx"> {
</span><span class="cx">     if (m_actualRequest) {
</span><del>-#if ENABLE(INSPECTOR)
</del><span class="cx">         InspectorInstrumentation::didFinishLoading(m_document.frame(), m_document.frame()-&gt;loader().documentLoader(), identifier, finishTime);
</span><del>-#endif
</del><ins>+
</ins><span class="cx">         ASSERT(!m_sameOriginRequest);
</span><span class="cx">         ASSERT(m_options.crossOriginRequestPolicy == UseAccessControl);
</span><span class="cx">         preflightSuccess();
</span><span class="lines">@@ -323,12 +318,8 @@
</span><span class="cx"> 
</span><span class="cx"> void DocumentThreadableLoader::didFail(unsigned long identifier, const ResourceError&amp; error)
</span><span class="cx"> {
</span><del>-#if ENABLE(INSPECTOR)
</del><span class="cx">     if (m_actualRequest)
</span><span class="cx">         InspectorInstrumentation::didFailLoading(m_document.frame(), m_document.frame()-&gt;loader().documentLoader(), identifier, error);
</span><del>-#else
-    UNUSED_PARAM(identifier);
-#endif
</del><span class="cx"> 
</span><span class="cx">     m_client-&gt;didFail(error);
</span><span class="cx"> }
</span><span class="lines">@@ -349,12 +340,9 @@
</span><span class="cx"> void DocumentThreadableLoader::preflightFailure(unsigned long identifier, const String&amp; url, const String&amp; errorDescription)
</span><span class="cx"> {
</span><span class="cx">     ResourceError error(errorDomainWebKitInternal, 0, url, errorDescription);
</span><del>-#if ENABLE(INSPECTOR)
</del><span class="cx">     if (m_actualRequest)
</span><span class="cx">         InspectorInstrumentation::didFailLoading(m_document.frame(), m_document.frame()-&gt;loader().documentLoader(), identifier, error);
</span><del>-#else
-    UNUSED_PARAM(identifier);
-#endif
</del><ins>+
</ins><span class="cx">     m_actualRequest = nullptr; // Prevent didFinishLoading() from bypassing access check.
</span><span class="cx">     m_client-&gt;didFailAccessControlCheck(error);
</span><span class="cx"> }
</span><span class="lines">@@ -388,7 +376,7 @@
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">             if (m_resource-&gt;loader()) {
</span><span class="cx">                 unsigned long identifier = m_resource-&gt;loader()-&gt;identifier();
</span><del>-                InspectorInstrumentation::documentThreadableLoaderStartedLoadingForClient(&amp;m_document, identifier, m_client);
</del><ins>+                InspectorInstrumentation::documentThreadableLoaderStartedLoadingForClient(m_document, identifier, m_client);
</ins><span class="cx">             }
</span><span class="cx"> #endif
</span><span class="cx">             m_resource-&gt;addClient(this);
</span><span class="lines">@@ -404,7 +392,7 @@
</span><span class="cx">     if (m_document.frame())
</span><span class="cx">         identifier = m_document.frame()-&gt;loader().loadResourceSynchronously(request, m_options.allowCredentials(), m_options.clientCredentialPolicy(), error, response, data);
</span><span class="cx"> 
</span><del>-    InspectorInstrumentation::documentThreadableLoaderStartedLoadingForClient(&amp;m_document, identifier, m_client);
</del><ins>+    InspectorInstrumentation::documentThreadableLoaderStartedLoadingForClient(m_document, identifier, m_client);
</ins><span class="cx"> 
</span><span class="cx">     if (!error.isNull() &amp;&amp; response.httpStatusCode() &lt;= 0) {
</span><span class="cx">         if (requestURL.isLocalFile()) {
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderFrameLoadercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/FrameLoader.cpp (177924 => 177925)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/FrameLoader.cpp        2015-01-05 21:11:44 UTC (rev 177924)
+++ trunk/Source/WebCore/loader/FrameLoader.cpp        2015-01-05 21:30:33 UTC (rev 177925)
</span><span class="lines">@@ -2501,7 +2501,7 @@
</span><span class="cx">     // handlers might start a new subresource load in this frame.
</span><span class="cx">     stopAllLoaders();
</span><span class="cx"> 
</span><del>-    InspectorInstrumentation::frameDetachedFromParent(&amp;m_frame);
</del><ins>+    InspectorInstrumentation::frameDetachedFromParent(m_frame);
</ins><span class="cx"> 
</span><span class="cx">     detachViewsAndDocumentLoader();
</span><span class="cx"> 
</span><span class="lines">@@ -3035,14 +3035,14 @@
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     if (!page-&gt;areMemoryCacheClientCallsEnabled()) {
</span><del>-        InspectorInstrumentation::didLoadResourceFromMemoryCache(page, m_documentLoader.get(), resource);
</del><ins>+        InspectorInstrumentation::didLoadResourceFromMemoryCache(*page, m_documentLoader.get(), resource);
</ins><span class="cx">         m_documentLoader-&gt;recordMemoryCacheLoadForFutureClientNotification(resource-&gt;resourceRequest());
</span><span class="cx">         m_documentLoader-&gt;didTellClientAboutLoad(resource-&gt;url());
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (m_client.dispatchDidLoadResourceFromMemoryCache(m_documentLoader.get(), newRequest, resource-&gt;response(), resource-&gt;encodedSize())) {
</span><del>-        InspectorInstrumentation::didLoadResourceFromMemoryCache(page, m_documentLoader.get(), resource);
</del><ins>+        InspectorInstrumentation::didLoadResourceFromMemoryCache(*page, m_documentLoader.get(), resource);
</ins><span class="cx">         m_documentLoader-&gt;didTellClientAboutLoad(resource-&gt;url());
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="lines">@@ -3050,7 +3050,7 @@
</span><span class="cx">     unsigned long identifier;
</span><span class="cx">     ResourceError error;
</span><span class="cx">     requestFromDelegate(newRequest, identifier, error);
</span><del>-    InspectorInstrumentation::markResourceAsCached(page, identifier);
</del><ins>+    InspectorInstrumentation::markResourceAsCached(*page, identifier);
</ins><span class="cx">     notifier().sendRemainingDelegateMessages(m_documentLoader.get(), identifier, newRequest, resource-&gt;response(), 0, resource-&gt;encodedSize(), 0, error);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -3325,10 +3325,10 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     if (Page* page = m_frame.page())
</span><del>-        page-&gt;inspectorController().didClearWindowObjectInWorld(&amp;m_frame, world);
</del><ins>+        page-&gt;inspectorController().didClearWindowObjectInWorld(m_frame, world);
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    InspectorInstrumentation::didClearWindowObjectInWorld(&amp;m_frame, world);
</del><ins>+    InspectorInstrumentation::didClearWindowObjectInWorld(m_frame, world);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void FrameLoader::dispatchGlobalObjectAvailableInAllWorlds()
</span><span class="lines">@@ -3385,7 +3385,7 @@
</span><span class="cx">         m_frame.page()-&gt;resetSeenMediaEngines();
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    InspectorInstrumentation::didCommitLoad(&amp;m_frame, m_documentLoader.get());
</del><ins>+    InspectorInstrumentation::didCommitLoad(m_frame, m_documentLoader.get());
</ins><span class="cx"> 
</span><span class="cx"> #if ENABLE(REMOTE_INSPECTOR)
</span><span class="cx">     if (m_frame.isMainFrame())
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderResourceLoadSchedulercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/ResourceLoadScheduler.cpp (177924 => 177925)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/ResourceLoadScheduler.cpp        2015-01-05 21:11:44 UTC (rev 177924)
+++ trunk/Source/WebCore/loader/ResourceLoadScheduler.cpp        2015-01-05 21:30:33 UTC (rev 177925)
</span><span class="lines">@@ -200,7 +200,7 @@
</span><span class="cx"> 
</span><span class="cx"> void ResourceLoadScheduler::notifyDidScheduleResourceRequest(ResourceLoader* loader)
</span><span class="cx"> {
</span><del>-    InspectorInstrumentation::didScheduleResourceRequest(loader-&gt;frameLoader() ? loader-&gt;frameLoader()-&gt;frame().document() : 0, loader-&gt;url());
</del><ins>+    InspectorInstrumentation::didScheduleResourceRequest(loader-&gt;frameLoader() ? loader-&gt;frameLoader()-&gt;frame().document() : nullptr, loader-&gt;url());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #if USE(QUICK_LOOK)
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderResourceLoadercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/ResourceLoader.cpp (177924 => 177925)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/ResourceLoader.cpp        2015-01-05 21:11:44 UTC (rev 177924)
+++ trunk/Source/WebCore/loader/ResourceLoader.cpp        2015-01-05 21:30:33 UTC (rev 177925)
</span><span class="lines">@@ -272,10 +272,8 @@
</span><span class="cx"> 
</span><span class="cx">         frameLoader()-&gt;notifier().willSendRequest(this, request, redirectResponse);
</span><span class="cx">     }
</span><del>-#if ENABLE(INSPECTOR)
</del><span class="cx">     else
</span><span class="cx">         InspectorInstrumentation::willSendRequest(m_frame.get(), m_identifier, m_frame-&gt;loader().documentLoader(), request, redirectResponse);
</span><del>-#endif
</del><span class="cx"> 
</span><span class="cx">     if (!redirectResponse.isNull())
</span><span class="cx">         platformStrategies()-&gt;loaderStrategy()-&gt;resourceLoadScheduler()-&gt;crossOriginRedirectReceived(this, request.url());
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderappcacheApplicationCacheGroupcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/appcache/ApplicationCacheGroup.cpp (177924 => 177925)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/appcache/ApplicationCacheGroup.cpp        2015-01-05 21:11:44 UTC (rev 177924)
+++ trunk/Source/WebCore/loader/appcache/ApplicationCacheGroup.cpp        2015-01-05 21:30:33 UTC (rev 177925)
</span><span class="lines">@@ -502,7 +502,7 @@
</span><span class="cx"> void ApplicationCacheGroup::didReceiveResponse(ResourceHandle* handle, const ResourceResponse&amp; response)
</span><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><del>-    DocumentLoader* loader = (handle == m_manifestHandle) ? 0 : m_frame-&gt;loader().documentLoader();
</del><ins>+    DocumentLoader* loader = (handle == m_manifestHandle) ? nullptr : m_frame-&gt;loader().documentLoader();
</ins><span class="cx">     InspectorInstrumentationCookie cookie = InspectorInstrumentation::willReceiveResourceResponse(m_frame, m_currentResourceIdentifier, response);
</span><span class="cx">     InspectorInstrumentation::didReceiveResourceResponse(cookie, m_currentResourceIdentifier, loader, response, 0);
</span><span class="cx"> #endif
</span><span class="lines">@@ -577,9 +577,7 @@
</span><span class="cx"> {
</span><span class="cx">     UNUSED_PARAM(encodedDataLength);
</span><span class="cx"> 
</span><del>-#if ENABLE(INSPECTOR)
</del><span class="cx">     InspectorInstrumentation::didReceiveData(m_frame, m_currentResourceIdentifier, 0, length, 0);
</span><del>-#endif
</del><span class="cx"> 
</span><span class="cx">     if (handle == m_manifestHandle) {
</span><span class="cx">         didReceiveManifestData(data, length);
</span><span class="lines">@@ -594,11 +592,7 @@
</span><span class="cx"> 
</span><span class="cx"> void ApplicationCacheGroup::didFinishLoading(ResourceHandle* handle, double finishTime)
</span><span class="cx"> {
</span><del>-#if ENABLE(INSPECTOR)
</del><span class="cx">     InspectorInstrumentation::didFinishLoading(m_frame, m_frame-&gt;loader().documentLoader(), m_currentResourceIdentifier, finishTime);
</span><del>-#else
-    UNUSED_PARAM(finishTime);
-#endif
</del><span class="cx"> 
</span><span class="cx">     if (handle == m_manifestHandle) {
</span><span class="cx">         didFinishLoadingManifest();
</span><span class="lines">@@ -633,11 +627,7 @@
</span><span class="cx"> 
</span><span class="cx"> void ApplicationCacheGroup::didFail(ResourceHandle* handle, const ResourceError&amp; error)
</span><span class="cx"> {
</span><del>-#if ENABLE(INSPECTOR)
</del><span class="cx">     InspectorInstrumentation::didFailLoading(m_frame, m_frame-&gt;loader().documentLoader(), m_currentResourceIdentifier, error);
</span><del>-#else
-    UNUSED_PARAM(error);
-#endif
</del><span class="cx"> 
</span><span class="cx">     if (handle == m_manifestHandle) {
</span><span class="cx">         // A network error is logged elsewhere, no need to log again. Also, it's normal for manifest fetching to fail when working offline.
</span></span></pre></div>
<a id="trunkSourceWebCoreloadercacheCachedResourcecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/cache/CachedResource.cpp (177924 => 177925)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/cache/CachedResource.cpp        2015-01-05 21:11:44 UTC (rev 177924)
+++ trunk/Source/WebCore/loader/cache/CachedResource.cpp        2015-01-05 21:30:33 UTC (rev 177925)
</span><span class="lines">@@ -483,7 +483,7 @@
</span><span class="cx"> bool CachedResource::deleteIfPossible()
</span><span class="cx"> {
</span><span class="cx">     if (canDelete() &amp;&amp; !inCache()) {
</span><del>-        InspectorInstrumentation::willDestroyCachedResource(this);
</del><ins>+        InspectorInstrumentation::willDestroyCachedResource(*this);
</ins><span class="cx">         delete this;
</span><span class="cx">         return true;
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkSourceWebCorepageChromecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/Chrome.cpp (177924 => 177925)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/Chrome.cpp        2015-01-05 21:11:44 UTC (rev 177924)
+++ trunk/Source/WebCore/page/Chrome.cpp        2015-01-05 21:30:33 UTC (rev 177925)
</span><span class="lines">@@ -95,7 +95,7 @@
</span><span class="cx"> void Chrome::scroll(const IntSize&amp; scrollDelta, const IntRect&amp; rectToScroll, const IntRect&amp; clipRect)
</span><span class="cx"> {
</span><span class="cx">     m_client.scroll(scrollDelta, rectToScroll, clipRect);
</span><del>-    InspectorInstrumentation::didScroll(&amp;m_page);
</del><ins>+    InspectorInstrumentation::didScroll(m_page);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #if USE(TILED_BACKING_STORE)
</span><span class="lines">@@ -297,7 +297,7 @@
</span><span class="cx">     // otherwise cause the load to continue while we're in the middle of executing JavaScript.
</span><span class="cx">     PageGroupLoadDeferrer deferrer(m_page, true);
</span><span class="cx"> 
</span><del>-    InspectorInstrumentationCookie cookie = InspectorInstrumentation::willRunJavaScriptDialog(&amp;m_page, message);
</del><ins>+    InspectorInstrumentationCookie cookie = InspectorInstrumentation::willRunJavaScriptDialog(m_page, message);
</ins><span class="cx">     bool ok = m_client.runBeforeUnloadConfirmPanel(message, frame);
</span><span class="cx">     InspectorInstrumentation::didRunJavaScriptDialog(cookie);
</span><span class="cx">     return ok;
</span><span class="lines">@@ -321,7 +321,7 @@
</span><span class="cx">     notifyPopupOpeningObservers();
</span><span class="cx">     String displayMessage = frame-&gt;displayStringModifiedByEncoding(message);
</span><span class="cx"> 
</span><del>-    InspectorInstrumentationCookie cookie = InspectorInstrumentation::willRunJavaScriptDialog(&amp;m_page, displayMessage);
</del><ins>+    InspectorInstrumentationCookie cookie = InspectorInstrumentation::willRunJavaScriptDialog(m_page, displayMessage);
</ins><span class="cx">     m_client.runJavaScriptAlert(frame, displayMessage);
</span><span class="cx">     InspectorInstrumentation::didRunJavaScriptDialog(cookie);
</span><span class="cx"> }
</span><span class="lines">@@ -339,7 +339,7 @@
</span><span class="cx">     notifyPopupOpeningObservers();
</span><span class="cx">     String displayMessage = frame-&gt;displayStringModifiedByEncoding(message);
</span><span class="cx"> 
</span><del>-    InspectorInstrumentationCookie cookie = InspectorInstrumentation::willRunJavaScriptDialog(&amp;m_page, displayMessage);
</del><ins>+    InspectorInstrumentationCookie cookie = InspectorInstrumentation::willRunJavaScriptDialog(m_page, displayMessage);
</ins><span class="cx">     bool ok = m_client.runJavaScriptConfirm(frame, displayMessage);
</span><span class="cx">     InspectorInstrumentation::didRunJavaScriptDialog(cookie);
</span><span class="cx">     return ok;
</span><span class="lines">@@ -358,7 +358,7 @@
</span><span class="cx">     notifyPopupOpeningObservers();
</span><span class="cx">     String displayPrompt = frame-&gt;displayStringModifiedByEncoding(prompt);
</span><span class="cx"> 
</span><del>-    InspectorInstrumentationCookie cookie = InspectorInstrumentation::willRunJavaScriptDialog(&amp;m_page, displayPrompt);
</del><ins>+    InspectorInstrumentationCookie cookie = InspectorInstrumentation::willRunJavaScriptDialog(m_page, displayPrompt);
</ins><span class="cx">     bool ok = m_client.runJavaScriptPrompt(frame, displayPrompt, frame-&gt;displayStringModifiedByEncoding(defaultValue), result);
</span><span class="cx">     InspectorInstrumentation::didRunJavaScriptDialog(cookie);
</span><span class="cx"> 
</span><span class="lines">@@ -394,7 +394,7 @@
</span><span class="cx">         prefetchDNS(result.absoluteLinkURL().host());
</span><span class="cx">     m_client.mouseDidMoveOverElement(result, modifierFlags);
</span><span class="cx"> 
</span><del>-    InspectorInstrumentation::mouseDidMoveOverElement(&amp;m_page, result, modifierFlags);
</del><ins>+    InspectorInstrumentation::mouseDidMoveOverElement(m_page, result, modifierFlags);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void Chrome::setToolTip(const HitTestResult&amp; result)
</span></span></pre></div>
<a id="trunkSourceWebCorepageDOMWindowcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/DOMWindow.cpp (177924 => 177925)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/DOMWindow.cpp        2015-01-05 21:11:44 UTC (rev 177924)
+++ trunk/Source/WebCore/page/DOMWindow.cpp        2015-01-05 21:30:33 UTC (rev 177925)
</span><span class="lines">@@ -1860,7 +1860,7 @@
</span><span class="cx">     // For load events, send a separate load event to the enclosing frame only.
</span><span class="cx">     // This is a DOM extension and is independent of bubbling/capturing rules of
</span><span class="cx">     // the DOM.
</span><del>-    Element* ownerElement = m_frame ? m_frame-&gt;ownerElement() : 0;
</del><ins>+    Element* ownerElement = m_frame ? m_frame-&gt;ownerElement() : nullptr;
</ins><span class="cx">     if (ownerElement)
</span><span class="cx">         ownerElement-&gt;dispatchEvent(Event::create(eventNames().loadEvent, false, false));
</span><span class="cx"> 
</span><span class="lines">@@ -1892,7 +1892,7 @@
</span><span class="cx">     event-&gt;setCurrentTarget(this);
</span><span class="cx">     event-&gt;setEventPhase(Event::AT_TARGET);
</span><span class="cx"> 
</span><del>-    InspectorInstrumentationCookie cookie = InspectorInstrumentation::willDispatchEventOnWindow(frame(), *event, this);
</del><ins>+    InspectorInstrumentationCookie cookie = InspectorInstrumentation::willDispatchEventOnWindow(frame(), *event, *this);
</ins><span class="cx"> 
</span><span class="cx">     bool result = fireEventListeners(event.get());
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorepageEventHandlercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/EventHandler.cpp (177924 => 177925)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/EventHandler.cpp        2015-01-05 21:11:44 UTC (rev 177924)
+++ trunk/Source/WebCore/page/EventHandler.cpp        2015-01-05 21:30:33 UTC (rev 177925)
</span><span class="lines">@@ -1636,7 +1636,7 @@
</span><span class="cx"> {
</span><span class="cx">     RefPtr&lt;FrameView&gt; protector(m_frame.view());
</span><span class="cx"> 
</span><del>-    if (InspectorInstrumentation::handleMousePress(m_frame.page())) {
</del><ins>+    if (InspectorInstrumentation::handleMousePress(m_frame)) {
</ins><span class="cx">         invalidateClick();
</span><span class="cx">         return true;
</span><span class="cx">     }
</span><span class="lines">@@ -3865,7 +3865,7 @@
</span><span class="cx">             Node* node = result.innerElement();
</span><span class="cx">             ASSERT(node);
</span><span class="cx"> 
</span><del>-            if (InspectorInstrumentation::handleTouchEvent(m_frame.page(), node))
</del><ins>+            if (node &amp;&amp; InspectorInstrumentation::handleTouchEvent(m_frame, *node))
</ins><span class="cx">                 return true;
</span><span class="cx"> 
</span><span class="cx">             Document&amp; doc = node-&gt;document();
</span></span></pre></div>
<a id="trunkSourceWebCorepageFrameViewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/FrameView.cpp (177924 => 177925)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/FrameView.cpp        2015-01-05 21:11:44 UTC (rev 177924)
+++ trunk/Source/WebCore/page/FrameView.cpp        2015-01-05 21:30:33 UTC (rev 177925)
</span><span class="lines">@@ -1152,7 +1152,7 @@
</span><span class="cx">     if (isPainting())
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    InspectorInstrumentationCookie cookie = InspectorInstrumentation::willLayout(&amp;frame());
</del><ins>+    InspectorInstrumentationCookie cookie = InspectorInstrumentation::willLayout(frame());
</ins><span class="cx">     AnimationUpdateBlock animationUpdateBlock(&amp;frame().animation());
</span><span class="cx">     
</span><span class="cx">     if (!allowSubtree &amp;&amp; m_layoutRoot) {
</span><span class="lines">@@ -1186,7 +1186,7 @@
</span><span class="cx">         if (!styleResolver || styleResolver-&gt;hasMediaQueriesAffectedByViewportChange()) {
</span><span class="cx">             document.styleResolverChanged(DeferRecalcStyle);
</span><span class="cx">             // FIXME: This instrumentation event is not strictly accurate since cached media query results do not persist across StyleResolver rebuilds.
</span><del>-            InspectorInstrumentation::mediaQueryResultChanged(&amp;document);
</del><ins>+            InspectorInstrumentation::mediaQueryResultChanged(document);
</ins><span class="cx">         } else
</span><span class="cx">             document.evaluateMediaQueryList();
</span><span class="cx"> 
</span><span class="lines">@@ -1454,7 +1454,7 @@
</span><span class="cx"> {
</span><span class="cx">     // See if we have an override type.
</span><span class="cx">     String overrideType = frame().loader().client().overrideMediaType();
</span><del>-    InspectorInstrumentation::applyEmulatedMedia(&amp;frame(), &amp;overrideType);
</del><ins>+    InspectorInstrumentation::applyEmulatedMedia(frame(), overrideType);
</ins><span class="cx">     if (!overrideType.isNull())
</span><span class="cx">         return overrideType;
</span><span class="cx">     return m_mediaType;
</span><span class="lines">@@ -2446,7 +2446,7 @@
</span><span class="cx">         return;
</span><span class="cx">     if (!frame().document()-&gt;shouldScheduleLayout())
</span><span class="cx">         return;
</span><del>-    InspectorInstrumentation::didInvalidateLayout(&amp;frame());
</del><ins>+    InspectorInstrumentation::didInvalidateLayout(frame());
</ins><span class="cx">     // When frame flattening is enabled, the contents of the frame could affect the layout of the parent frames.
</span><span class="cx">     // Also invalidate parent frame starting from the owner element of this frame.
</span><span class="cx">     if (frame().ownerRenderer() &amp;&amp; isInChildFrameWithFrameFlattening())
</span><span class="lines">@@ -2495,7 +2495,7 @@
</span><span class="cx">         std::chrono::milliseconds delay = renderView.document().minimumLayoutDelay();
</span><span class="cx">         ASSERT(!newRelayoutRoot.container() || !newRelayoutRoot.container()-&gt;needsLayout());
</span><span class="cx">         m_layoutRoot = &amp;newRelayoutRoot;
</span><del>-        InspectorInstrumentation::didInvalidateLayout(&amp;frame());
</del><ins>+        InspectorInstrumentation::didInvalidateLayout(frame());
</ins><span class="cx">         m_delayedLayout = delay.count();
</span><span class="cx">         m_layoutTimer.startOneShot(delay);
</span><span class="cx">         return;
</span><span class="lines">@@ -2507,7 +2507,7 @@
</span><span class="cx">     if (!m_layoutRoot) {
</span><span class="cx">         // Just relayout the subtree.
</span><span class="cx">         newRelayoutRoot.markContainingBlocksForLayout(false);
</span><del>-        InspectorInstrumentation::didInvalidateLayout(&amp;frame());
</del><ins>+        InspectorInstrumentation::didInvalidateLayout(frame());
</ins><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -2523,7 +2523,7 @@
</span><span class="cx">         m_layoutRoot-&gt;markContainingBlocksForLayout(false, &amp;newRelayoutRoot);
</span><span class="cx">         m_layoutRoot = &amp;newRelayoutRoot;
</span><span class="cx">         ASSERT(!m_layoutRoot-&gt;container() || !m_layoutRoot-&gt;container()-&gt;needsLayout());
</span><del>-        InspectorInstrumentation::didInvalidateLayout(&amp;frame());
</del><ins>+        InspectorInstrumentation::didInvalidateLayout(frame());
</ins><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -2531,7 +2531,7 @@
</span><span class="cx">     m_layoutRoot-&gt;markContainingBlocksForLayout(false);
</span><span class="cx">     m_layoutRoot = 0;
</span><span class="cx">     newRelayoutRoot.markContainingBlocksForLayout(false);
</span><del>-    InspectorInstrumentation::didInvalidateLayout(&amp;frame());
</del><ins>+    InspectorInstrumentation::didInvalidateLayout(frame());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool FrameView::layoutPending() const
</span></span></pre></div>
<a id="trunkSourceWebCorepagePageConsoleClientcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/PageConsoleClient.cpp (177924 => 177925)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/PageConsoleClient.cpp        2015-01-05 21:11:44 UTC (rev 177924)
+++ trunk/Source/WebCore/page/PageConsoleClient.cpp        2015-01-05 21:30:33 UTC (rev 177925)
</span><span class="lines">@@ -117,9 +117,9 @@
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     if (callStack)
</span><del>-        InspectorInstrumentation::addMessageToConsole(&amp;m_page, source, MessageType::Log, level, message, callStack, requestIdentifier);
</del><ins>+        InspectorInstrumentation::addMessageToConsole(m_page, source, MessageType::Log, level, message, callStack, requestIdentifier);
</ins><span class="cx">     else
</span><del>-        InspectorInstrumentation::addMessageToConsole(&amp;m_page, source, MessageType::Log, level, message, url, lineNumber, columnNumber, state, requestIdentifier);
</del><ins>+        InspectorInstrumentation::addMessageToConsole(m_page, source, MessageType::Log, level, message, url, lineNumber, columnNumber, state, requestIdentifier);
</ins><span class="cx"> 
</span><span class="cx">     if (source == MessageSource::CSS)
</span><span class="cx">         return;
</span><span class="lines">@@ -142,7 +142,7 @@
</span><span class="cx"> 
</span><span class="cx">     String message;
</span><span class="cx">     bool gotMessage = arguments-&gt;getFirstArgumentAsString(message);
</span><del>-    InspectorInstrumentation::addMessageToConsole(&amp;m_page, MessageSource::ConsoleAPI, type, level, message, exec, arguments);
</del><ins>+    InspectorInstrumentation::addMessageToConsole(m_page, MessageSource::ConsoleAPI, type, level, message, exec, arguments);
</ins><span class="cx"> 
</span><span class="cx">     if (m_page.usesEphemeralSession())
</span><span class="cx">         return;
</span><span class="lines">@@ -160,34 +160,34 @@
</span><span class="cx"> 
</span><span class="cx"> void PageConsoleClient::count(JSC::ExecState* exec, PassRefPtr&lt;ScriptArguments&gt; arguments)
</span><span class="cx"> {
</span><del>-    InspectorInstrumentation::consoleCount(&amp;m_page, exec, arguments);
</del><ins>+    InspectorInstrumentation::consoleCount(m_page, exec, arguments);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void PageConsoleClient::profile(JSC::ExecState* exec, const String&amp; title)
</span><span class="cx"> {
</span><del>-    InspectorInstrumentation::startProfiling(&amp;m_page, exec, title);
</del><ins>+    InspectorInstrumentation::startProfiling(m_page, exec, title);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void PageConsoleClient::profileEnd(JSC::ExecState* exec, const String&amp; title)
</span><span class="cx"> {
</span><del>-    if (RefPtr&lt;JSC::Profile&gt; profile = InspectorInstrumentation::stopProfiling(&amp;m_page, exec, title))
</del><ins>+    if (RefPtr&lt;JSC::Profile&gt; profile = InspectorInstrumentation::stopProfiling(m_page, exec, title))
</ins><span class="cx">         m_profiles.append(profile.release());
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void PageConsoleClient::time(JSC::ExecState*, const String&amp; title)
</span><span class="cx"> {
</span><del>-    InspectorInstrumentation::startConsoleTiming(&amp;m_page.mainFrame(), title);
</del><ins>+    InspectorInstrumentation::startConsoleTiming(m_page.mainFrame(), title);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void PageConsoleClient::timeEnd(JSC::ExecState* exec, const String&amp; title)
</span><span class="cx"> {
</span><span class="cx">     RefPtr&lt;ScriptCallStack&gt; callStack(createScriptCallStackForConsole(exec, 1));
</span><del>-    InspectorInstrumentation::stopConsoleTiming(&amp;m_page.mainFrame(), title, callStack.release());
</del><ins>+    InspectorInstrumentation::stopConsoleTiming(m_page.mainFrame(), title, callStack.release());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void PageConsoleClient::timeStamp(JSC::ExecState*, PassRefPtr&lt;ScriptArguments&gt; arguments)
</span><span class="cx"> {
</span><del>-    InspectorInstrumentation::consoleTimeStamp(&amp;m_page.mainFrame(), arguments);
</del><ins>+    InspectorInstrumentation::consoleTimeStamp(m_page.mainFrame(), arguments);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void PageConsoleClient::clearProfiles()
</span></span></pre></div>
<a id="trunkSourceWebCorepageSettingscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/Settings.cpp (177924 => 177925)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/Settings.cpp        2015-01-05 21:11:44 UTC (rev 177924)
+++ trunk/Source/WebCore/page/Settings.cpp        2015-01-05 21:30:33 UTC (rev 177925)
</span><span class="lines">@@ -414,7 +414,7 @@
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx">     m_page-&gt;setNeedsRecalcStyleInAllFrames();
</span><span class="cx"> #endif
</span><del>-    InspectorInstrumentation::scriptsEnabled(m_page, m_isScriptEnabled);
</del><ins>+    InspectorInstrumentation::scriptsEnabled(*m_page, m_isScriptEnabled);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void Settings::setJavaEnabled(bool isJavaEnabled)
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderLayercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderLayer.cpp (177924 => 177925)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderLayer.cpp        2015-01-05 21:11:44 UTC (rev 177924)
+++ trunk/Source/WebCore/rendering/RenderLayer.cpp        2015-01-05 21:30:33 UTC (rev 177925)
</span><span class="lines">@@ -2255,7 +2255,7 @@
</span><span class="cx">     IntPoint oldPosition = IntPoint(m_scrollOffset);
</span><span class="cx">     m_scrollOffset = newScrollOffset;
</span><span class="cx"> 
</span><del>-    InspectorInstrumentation::willScrollLayer(&amp;renderer().frame());
</del><ins>+    InspectorInstrumentation::willScrollLayer(renderer().frame());
</ins><span class="cx"> 
</span><span class="cx">     RenderView&amp; view = renderer().view();
</span><span class="cx"> 
</span><span class="lines">@@ -2308,7 +2308,7 @@
</span><span class="cx">         element-&gt;document().sendWillRevealEdgeEventsIfNeeded(oldPosition, IntPoint(newScrollOffset), visibleContentRect(), contentsSize(), element);
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    InspectorInstrumentation::didScrollLayer(&amp;frame);
</del><ins>+    InspectorInstrumentation::didScrollLayer(frame);
</ins><span class="cx">     if (scrollsOverflow())
</span><span class="cx">         view.frameView().didChangeScrollOffset();
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderLayerCompositorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp (177924 => 177925)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp        2015-01-05 21:11:44 UTC (rev 177924)
+++ trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp        2015-01-05 21:30:33 UTC (rev 177925)
</span><span class="lines">@@ -804,7 +804,7 @@
</span><span class="cx"> void RenderLayerCompositor::layerBecameNonComposited(const RenderLayer&amp; layer)
</span><span class="cx"> {
</span><span class="cx">     // Inform the inspector that the given RenderLayer was destroyed.
</span><del>-    InspectorInstrumentation::renderLayerDestroyed(page(), &amp;layer);
</del><ins>+    InspectorInstrumentation::renderLayerDestroyed(page(), layer);
</ins><span class="cx"> 
</span><span class="cx">     ASSERT(m_compositedLayerCount &gt; 0);
</span><span class="cx">     --m_compositedLayerCount;
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderNamedFlowThreadcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderNamedFlowThread.cpp (177924 => 177925)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderNamedFlowThread.cpp        2015-01-05 21:11:44 UTC (rev 177924)
+++ trunk/Source/WebCore/rendering/RenderNamedFlowThread.cpp        2015-01-05 21:30:33 UTC (rev 177925)
</span><span class="lines">@@ -506,13 +506,13 @@
</span><span class="cx">         unsigned short position = contentElement.compareDocumentPosition(element);
</span><span class="cx">         if (position &amp; Node::DOCUMENT_POSITION_FOLLOWING) {
</span><span class="cx">             m_contentElements.insertBefore(element, &amp;contentElement);
</span><del>-            InspectorInstrumentation::didRegisterNamedFlowContentElement(&amp;document(), &amp;namedFlow(), &amp;contentElement, element);
</del><ins>+            InspectorInstrumentation::didRegisterNamedFlowContentElement(document(), namedFlow(), contentElement, element);
</ins><span class="cx">             return;
</span><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     m_contentElements.add(&amp;contentElement);
</span><del>-    InspectorInstrumentation::didRegisterNamedFlowContentElement(&amp;document(), &amp;namedFlow(), &amp;contentElement);
</del><ins>+    InspectorInstrumentation::didRegisterNamedFlowContentElement(document(), namedFlow(), contentElement);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void RenderNamedFlowThread::unregisterNamedFlowContentElement(Element&amp; contentElement)
</span><span class="lines">@@ -527,7 +527,7 @@
</span><span class="cx">     if (canBeDestroyed())
</span><span class="cx">         setMarkForDestruction();
</span><span class="cx"> 
</span><del>-    InspectorInstrumentation::didUnregisterNamedFlowContentElement(&amp;document(), &amp;namedFlow(), &amp;contentElement);
</del><ins>+    InspectorInstrumentation::didUnregisterNamedFlowContentElement(document(), namedFlow(), contentElement);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool RenderNamedFlowThread::hasContentElement(Element&amp; contentElement) const
</span><span class="lines">@@ -560,7 +560,7 @@
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     m_dispatchRegionOversetChangeEvent = false;
</span><del>-    InspectorInstrumentation::didChangeRegionOverset(&amp;document(), &amp;namedFlow());
</del><ins>+    InspectorInstrumentation::didChangeRegionOverset(document(), namedFlow());
</ins><span class="cx">     
</span><span class="cx">     if (!m_regionOversetChangeEventTimer.isActive() &amp;&amp; namedFlow().hasEventListeners())
</span><span class="cx">         m_regionOversetChangeEventTimer.startOneShot(0);
</span></span></pre></div>
<a id="trunkSourceWebCorereplayReplayControllercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/replay/ReplayController.cpp (177924 => 177925)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/replay/ReplayController.cpp        2015-01-05 21:11:44 UTC (rev 177924)
+++ trunk/Source/WebCore/replay/ReplayController.cpp        2015-01-05 21:30:33 UTC (rev 177925)
</span><span class="lines">@@ -207,7 +207,7 @@
</span><span class="cx">     m_currentPosition = ReplayPosition(0, 0);
</span><span class="cx"> 
</span><span class="cx">     LOG(WebReplay, &quot;%-20sSwitching sessions from %p to %p.\n&quot;, &quot;ReplayController&quot;, m_loadedSession.get(), session.get());
</span><del>-    InspectorInstrumentation::sessionLoaded(&amp;m_page, m_loadedSession);
</del><ins>+    InspectorInstrumentation::sessionLoaded(m_page, m_loadedSession);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void ReplayController::createSegment()
</span><span class="lines">@@ -223,7 +223,7 @@
</span><span class="cx">     m_loadedSegment = ReplaySessionSegment::create();
</span><span class="cx"> 
</span><span class="cx">     LOG(WebReplay, &quot;%-20s Created segment: %p.\n&quot;, &quot;ReplayController&quot;, m_loadedSegment.get());
</span><del>-    InspectorInstrumentation::segmentCreated(&amp;m_page, m_loadedSegment);
</del><ins>+    InspectorInstrumentation::segmentCreated(m_page, m_loadedSegment);
</ins><span class="cx"> 
</span><span class="cx">     m_activeCursor = CapturingInputCursor::create(m_loadedSegment);
</span><span class="cx">     m_activeCursor-&gt;appendInput&lt;BeginSegmentSentinel&gt;();
</span><span class="lines">@@ -247,10 +247,10 @@
</span><span class="cx">     unloadSegment(shouldSuppressNotifications);
</span><span class="cx"> 
</span><span class="cx">     LOG(WebReplay, &quot;%-20s Completed segment: %p.\n&quot;, &quot;ReplayController&quot;, segment.get());
</span><del>-    InspectorInstrumentation::segmentCompleted(&amp;m_page, segment);
</del><ins>+    InspectorInstrumentation::segmentCompleted(m_page, segment);
</ins><span class="cx"> 
</span><span class="cx">     m_loadedSession-&gt;appendSegment(segment);
</span><del>-    InspectorInstrumentation::sessionModified(&amp;m_page, m_loadedSession);
</del><ins>+    InspectorInstrumentation::sessionModified(m_page, m_loadedSession);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void ReplayController::loadSegmentAtIndex(size_t segmentIndex)
</span><span class="lines">@@ -272,7 +272,7 @@
</span><span class="cx">     m_activeCursor = ReplayingInputCursor::create(m_loadedSegment, m_page, this);
</span><span class="cx"> 
</span><span class="cx">     LOG(WebReplay, &quot;%-20sLoading segment: %p.\n&quot;, &quot;ReplayController&quot;, segment.get());
</span><del>-    InspectorInstrumentation::segmentLoaded(&amp;m_page, segment);
</del><ins>+    InspectorInstrumentation::segmentLoaded(m_page, segment);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void ReplayController::unloadSegment(bool suppressNotifications)
</span><span class="lines">@@ -295,7 +295,7 @@
</span><span class="cx">     // didn't send out the corresponding segmentLoaded event at the start of capture.
</span><span class="cx">     if (!suppressNotifications) {
</span><span class="cx">         LOG(WebReplay, &quot;%-20sUnloading segment: %p.\n&quot;, &quot;ReplayController&quot;, unloadedSegment.get());
</span><del>-        InspectorInstrumentation::segmentUnloaded(&amp;m_page);
</del><ins>+        InspectorInstrumentation::segmentUnloaded(m_page);
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -308,7 +308,7 @@
</span><span class="cx">     setForceDeterministicSettings(true);
</span><span class="cx"> 
</span><span class="cx">     LOG(WebReplay, &quot;%-20s Starting capture.\n&quot;, &quot;ReplayController&quot;);
</span><del>-    InspectorInstrumentation::captureStarted(&amp;m_page);
</del><ins>+    InspectorInstrumentation::captureStarted(m_page);
</ins><span class="cx"> 
</span><span class="cx">     m_currentPosition = ReplayPosition(0, 0);
</span><span class="cx"> 
</span><span class="lines">@@ -326,7 +326,7 @@
</span><span class="cx">     setForceDeterministicSettings(false);
</span><span class="cx"> 
</span><span class="cx">     LOG(WebReplay, &quot;%-20s Stopping capture.\n&quot;, &quot;ReplayController&quot;);
</span><del>-    InspectorInstrumentation::captureStopped(&amp;m_page);
</del><ins>+    InspectorInstrumentation::captureStopped(m_page);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void ReplayController::startPlayback()
</span><span class="lines">@@ -337,7 +337,7 @@
</span><span class="cx">     setSegmentState(SegmentState::Dispatching);
</span><span class="cx"> 
</span><span class="cx">     LOG(WebReplay, &quot;%-20s Starting playback to position (segment: %d, input: %d).\n&quot;, &quot;ReplayController&quot;, m_targetPosition.segmentOffset, m_targetPosition.inputOffset);
</span><del>-    InspectorInstrumentation::playbackStarted(&amp;m_page);
</del><ins>+    InspectorInstrumentation::playbackStarted(m_page);
</ins><span class="cx"> 
</span><span class="cx">     dispatcher().setDispatchSpeed(m_dispatchSpeed);
</span><span class="cx">     dispatcher().run();
</span><span class="lines">@@ -354,7 +354,7 @@
</span><span class="cx">     setSegmentState(SegmentState::Loaded);
</span><span class="cx"> 
</span><span class="cx">     LOG(WebReplay, &quot;%-20s Pausing playback at position (segment: %d, input: %d).\n&quot;, &quot;ReplayController&quot;, m_currentPosition.segmentOffset, m_currentPosition.inputOffset);
</span><del>-    InspectorInstrumentation::playbackPaused(&amp;m_page, m_currentPosition);
</del><ins>+    InspectorInstrumentation::playbackPaused(m_page, m_currentPosition);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void ReplayController::cancelPlayback()
</span><span class="lines">@@ -372,7 +372,7 @@
</span><span class="cx">     unloadSegment();
</span><span class="cx">     m_sessionState = SessionState::Inactive;
</span><span class="cx">     setForceDeterministicSettings(false);
</span><del>-    InspectorInstrumentation::playbackFinished(&amp;m_page);
</del><ins>+    InspectorInstrumentation::playbackFinished(m_page);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void ReplayController::replayToPosition(const ReplayPosition&amp; position, DispatchSpeed speed)
</span><span class="lines">@@ -511,7 +511,7 @@
</span><span class="cx"> 
</span><span class="cx">     m_currentPosition.inputOffset++;
</span><span class="cx"> 
</span><del>-    InspectorInstrumentation::playbackHitPosition(&amp;m_page, m_currentPosition);
</del><ins>+    InspectorInstrumentation::playbackHitPosition(m_page, m_currentPosition);
</ins><span class="cx"> 
</span><span class="cx">     if (m_currentPosition == m_targetPosition)
</span><span class="cx">         pausePlayback();
</span></span></pre></div>
<a id="trunkSourceWebCoretestingInternalscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/testing/Internals.cpp (177924 => 177925)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/testing/Internals.cpp        2015-01-05 21:11:44 UTC (rev 177924)
+++ trunk/Source/WebCore/testing/Internals.cpp        2015-01-05 21:30:33 UTC (rev 177925)
</span><span class="lines">@@ -1480,7 +1480,7 @@
</span><span class="cx">     if (!document || !document-&gt;page())
</span><span class="cx">         return Vector&lt;String&gt;();
</span><span class="cx"> 
</span><del>-    InstrumentingAgents* instrumentingAgents = instrumentationForPage(document-&gt;page());
</del><ins>+    InstrumentingAgents* instrumentingAgents = InspectorInstrumentation::instrumentingAgentsForPage(document-&gt;page());
</ins><span class="cx">     if (!instrumentingAgents)
</span><span class="cx">         return Vector&lt;String&gt;();
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorexmlXMLHttpRequestcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/xml/XMLHttpRequest.cpp (177924 => 177925)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/xml/XMLHttpRequest.cpp        2015-01-05 21:11:44 UTC (rev 177924)
+++ trunk/Source/WebCore/xml/XMLHttpRequest.cpp        2015-01-05 21:30:33 UTC (rev 177925)
</span><span class="lines">@@ -372,14 +372,14 @@
</span><span class="cx">     if (!scriptExecutionContext())
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    InspectorInstrumentationCookie cookie = InspectorInstrumentation::willDispatchXHRReadyStateChangeEvent(scriptExecutionContext(), this);
</del><ins>+    InspectorInstrumentationCookie cookie = InspectorInstrumentation::willDispatchXHRReadyStateChangeEvent(scriptExecutionContext(), *this);
</ins><span class="cx"> 
</span><span class="cx">     if (m_async || (m_state &lt;= OPENED || m_state == DONE))
</span><span class="cx">         m_progressEventThrottle.dispatchReadyStateChangeEvent(Event::create(eventNames().readystatechangeEvent, false, false), m_state == DONE ? FlushProgressEvent : DoNotFlushProgressEvent);
</span><span class="cx"> 
</span><span class="cx">     InspectorInstrumentation::didDispatchXHRReadyStateChangeEvent(cookie);
</span><span class="cx">     if (m_state == DONE &amp;&amp; !m_error) {
</span><del>-        InspectorInstrumentationCookie cookie = InspectorInstrumentation::willDispatchXHRLoadEvent(scriptExecutionContext(), this);
</del><ins>+        InspectorInstrumentationCookie cookie = InspectorInstrumentation::willDispatchXHRLoadEvent(scriptExecutionContext(), *this);
</ins><span class="cx">         m_progressEventThrottle.dispatchProgressEvent(eventNames().loadEvent);
</span><span class="cx">         InspectorInstrumentation::didDispatchXHRLoadEvent(cookie);
</span><span class="cx">         m_progressEventThrottle.dispatchProgressEvent(eventNames().loadendEvent);
</span></span></pre>
</div>
</div>

</body>
</html>