Bug 1243555: Remove unnecessary nsDocShell static_cast in EventListenerManager::HandleEventInternal(). r=smaug

This commit is contained in:
Daniel Holbert 2016-02-09 15:21:36 -08:00
parent 190d4c5549
commit 7756d3fa45

View File

@ -32,7 +32,6 @@
#include "nsCOMArray.h"
#include "nsCOMPtr.h"
#include "nsContentUtils.h"
#include "nsDocShell.h"
#include "nsDOMCID.h"
#include "nsError.h"
#include "nsGkAtoms.h"
@ -1199,15 +1198,14 @@ EventListenerManager::HandleEventInternal(nsPresContext* aPresContext,
// Maybe add a marker to the docshell's timeline, but only
// bother with all the logic if some docshell is recording.
nsDocShell* docShell;
nsCOMPtr<nsIDocShell> docShell;
RefPtr<TimelineConsumers> timelines = TimelineConsumers::Get();
bool needsEndEventMarker = false;
if (mIsMainThreadELM &&
listener->mListenerType != Listener::eNativeListener) {
nsCOMPtr<nsIDocShell> docShellComPtr = GetDocShellForTarget();
if (docShellComPtr) {
docShell = static_cast<nsDocShell*>(docShellComPtr.get());
docShell = GetDocShellForTarget();
if (docShell) {
if (timelines && timelines->HasConsumer(docShell)) {
needsEndEventMarker = true;
nsAutoString typeStr;