| 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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 V8AbstractEventListener* v8Listener = V8AbstractEventListener::cast(register
edListener->listener()); | 98 V8AbstractEventListener* v8Listener = V8AbstractEventListener::cast(register
edListener->listener()); |
| 99 v8::HandleScope handles(v8Listener->isolate()); | 99 v8::HandleScope handles(v8Listener->isolate()); |
| 100 v8::Local<v8::Context> v8Context = toV8Context(context, v8Listener->world())
; | 100 v8::Local<v8::Context> v8Context = toV8Context(context, v8Listener->world())
; |
| 101 if (v8Context.IsEmpty()) | 101 if (v8Context.IsEmpty()) |
| 102 return; | 102 return; |
| 103 v8::Context::Scope contextScope(v8Context); | 103 v8::Context::Scope contextScope(v8Context); |
| 104 v8::Local<v8::Object> handler = v8Listener->getListenerObject(context); | 104 v8::Local<v8::Object> handler = v8Listener->getListenerObject(context); |
| 105 | 105 |
| 106 String messageText = String::format( | 106 String messageText = String::format( |
| 107 "Handling of '%s' input event was delayed for %ld ms due to main thread
being busy. " | 107 "Handling of '%s' input event was delayed for %ld ms due to main thread
being busy. " |
| 108 "Consider marking event handler as 'passive' to make the page more respo
nive.", | 108 "Consider marking event handler as 'passive' to make the page more respo
nsive.", |
| 109 event->type().getString().utf8().data(), lround(delayedSeconds * 1000)); | 109 event->type().getString().utf8().data(), lround(delayedSeconds * 1000)); |
| 110 | 110 |
| 111 v8::Local<v8::Function> function = eventListenerEffectiveFunction(v8Listener
->isolate(), handler); | 111 v8::Local<v8::Function> function = eventListenerEffectiveFunction(v8Listener
->isolate(), handler); |
| 112 std::unique_ptr<SourceLocation> location = SourceLocation::fromFunction(func
tion); | 112 std::unique_ptr<SourceLocation> location = SourceLocation::fromFunction(func
tion); |
| 113 ConsoleMessage* message = ConsoleMessage::create(JSMessageSource, WarningMes
sageLevel, messageText, std::move(location)); | 113 ConsoleMessage* message = ConsoleMessage::create(JSMessageSource, WarningMes
sageLevel, messageText, std::move(location)); |
| 114 context->addConsoleMessage(message); | 114 context->addConsoleMessage(message); |
| 115 registeredListener->setBlockedEventWarningEmitted(); | 115 registeredListener->setBlockedEventWarningEmitted(); |
| 116 } | 116 } |
| 117 | 117 |
| 118 | 118 |
| (...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 642 // they have one less listener to invoke. | 642 // they have one less listener to invoke. |
| 643 if (d->firingEventIterators) { | 643 if (d->firingEventIterators) { |
| 644 for (size_t i = 0; i < d->firingEventIterators->size(); ++i) { | 644 for (size_t i = 0; i < d->firingEventIterators->size(); ++i) { |
| 645 d->firingEventIterators->at(i).iterator = 0; | 645 d->firingEventIterators->at(i).iterator = 0; |
| 646 d->firingEventIterators->at(i).end = 0; | 646 d->firingEventIterators->at(i).end = 0; |
| 647 } | 647 } |
| 648 } | 648 } |
| 649 } | 649 } |
| 650 | 650 |
| 651 } // namespace blink | 651 } // namespace blink |
| OLD | NEW |