Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
| 5 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. | 5 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. |
| 6 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 6 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
| 7 * (C) 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org> | 7 * (C) 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org> |
| 8 * | 8 * |
| 9 * Redistribution and use in source and binary forms, with or without | 9 * Redistribution and use in source and binary forms, with or without |
| 10 * modification, are permitted provided that the following conditions | 10 * modification, are permitted provided that the following conditions |
| (...skipping 24 matching lines...) Expand all Loading... | |
| 35 #include "bindings/core/v8/ScriptEventListener.h" | 35 #include "bindings/core/v8/ScriptEventListener.h" |
| 36 #include "bindings/core/v8/SourceLocation.h" | 36 #include "bindings/core/v8/SourceLocation.h" |
| 37 #include "bindings/core/v8/V8DOMActivityLogger.h" | 37 #include "bindings/core/v8/V8DOMActivityLogger.h" |
| 38 #include "core/dom/ExceptionCode.h" | 38 #include "core/dom/ExceptionCode.h" |
| 39 #include "core/editing/Editor.h" | 39 #include "core/editing/Editor.h" |
| 40 #include "core/events/Event.h" | 40 #include "core/events/Event.h" |
| 41 #include "core/events/EventUtil.h" | 41 #include "core/events/EventUtil.h" |
| 42 #include "core/events/PointerEvent.h" | 42 #include "core/events/PointerEvent.h" |
| 43 #include "core/frame/FrameHost.h" | 43 #include "core/frame/FrameHost.h" |
| 44 #include "core/frame/LocalDOMWindow.h" | 44 #include "core/frame/LocalDOMWindow.h" |
| 45 #include "core/frame/PerformanceMonitor.h" | |
| 45 #include "core/frame/Settings.h" | 46 #include "core/frame/Settings.h" |
| 46 #include "core/frame/UseCounter.h" | 47 #include "core/frame/UseCounter.h" |
| 47 #include "core/inspector/ConsoleMessage.h" | |
| 48 #include "core/inspector/InspectorInstrumentation.h" | 48 #include "core/inspector/InspectorInstrumentation.h" |
| 49 #include "platform/EventDispatchForbiddenScope.h" | 49 #include "platform/EventDispatchForbiddenScope.h" |
| 50 #include "platform/Histogram.h" | 50 #include "platform/Histogram.h" |
| 51 #include "wtf/PtrUtil.h" | 51 #include "wtf/PtrUtil.h" |
| 52 #include "wtf/StdLibExtras.h" | 52 #include "wtf/StdLibExtras.h" |
| 53 #include "wtf/Threading.h" | 53 #include "wtf/Threading.h" |
| 54 #include "wtf/Vector.h" | 54 #include "wtf/Vector.h" |
| 55 #include <memory> | 55 #include <memory> |
| 56 | 56 |
| 57 using namespace WTF; | 57 using namespace WTF; |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 130 "Handling of '%s' input event was delayed for %ld ms due to main thread " | 130 "Handling of '%s' input event was delayed for %ld ms due to main thread " |
| 131 "being busy. " | 131 "being busy. " |
| 132 "Consider marking event handler as 'passive' to make the page more " | 132 "Consider marking event handler as 'passive' to make the page more " |
| 133 "responsive.", | 133 "responsive.", |
| 134 event->type().getString().utf8().data(), lround(delayedSeconds * 1000)); | 134 event->type().getString().utf8().data(), lround(delayedSeconds * 1000)); |
| 135 | 135 |
| 136 v8::Local<v8::Function> function = | 136 v8::Local<v8::Function> function = |
| 137 eventListenerEffectiveFunction(v8Listener->isolate(), handler); | 137 eventListenerEffectiveFunction(v8Listener->isolate(), handler); |
| 138 std::unique_ptr<SourceLocation> location = | 138 std::unique_ptr<SourceLocation> location = |
| 139 SourceLocation::fromFunction(function); | 139 SourceLocation::fromFunction(function); |
| 140 ConsoleMessage* message = ConsoleMessage::create( | 140 PerformanceMonitor::logViolation(context, messageText, std::move(location)); |
| 141 JSMessageSource, WarningMessageLevel, messageText, std::move(location)); | |
| 142 context->addConsoleMessage(message); | |
| 143 registeredListener->setBlockedEventWarningEmitted(); | |
|
caseq
2016/11/04 20:58:59
Bring this back, we really need it!
pfeldman
2016/11/04 21:26:39
Ouch, thank you.
| |
| 144 } | 141 } |
| 145 | 142 |
| 146 } // namespace | 143 } // namespace |
| 147 | 144 |
| 148 EventTargetData::EventTargetData() {} | 145 EventTargetData::EventTargetData() {} |
| 149 | 146 |
| 150 EventTargetData::~EventTargetData() {} | 147 EventTargetData::~EventTargetData() {} |
| 151 | 148 |
| 152 DEFINE_TRACE(EventTargetData) { | 149 DEFINE_TRACE(EventTargetData) { |
| 153 visitor->trace(eventListenerMap); | 150 visitor->trace(eventListenerMap); |
| (...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 759 // they have one less listener to invoke. | 756 // they have one less listener to invoke. |
| 760 if (d->firingEventIterators) { | 757 if (d->firingEventIterators) { |
| 761 for (size_t i = 0; i < d->firingEventIterators->size(); ++i) { | 758 for (size_t i = 0; i < d->firingEventIterators->size(); ++i) { |
| 762 d->firingEventIterators->at(i).iterator = 0; | 759 d->firingEventIterators->at(i).iterator = 0; |
| 763 d->firingEventIterators->at(i).end = 0; | 760 d->firingEventIterators->at(i).end = 0; |
| 764 } | 761 } |
| 765 } | 762 } |
| 766 } | 763 } |
| 767 | 764 |
| 768 } // namespace blink | 765 } // namespace blink |
| OLD | NEW |