Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(272)

Unified Diff: third_party/WebKit/Source/core/events/EventTarget.cpp

Issue 2080623002: Revert "Remove OwnPtr from Blink." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/events/EventTarget.cpp
diff --git a/third_party/WebKit/Source/core/events/EventTarget.cpp b/third_party/WebKit/Source/core/events/EventTarget.cpp
index a71150749ef89ec1b135ece4bada79f7624da6c8..21ee9c24b355530483f32b3a0e7c5fa8b4407f75 100644
--- a/third_party/WebKit/Source/core/events/EventTarget.cpp
+++ b/third_party/WebKit/Source/core/events/EventTarget.cpp
@@ -46,11 +46,9 @@
#include "core/inspector/ConsoleMessage.h"
#include "core/inspector/InspectorInstrumentation.h"
#include "platform/EventDispatchForbiddenScope.h"
-#include "wtf/PtrUtil.h"
#include "wtf/StdLibExtras.h"
#include "wtf/Threading.h"
#include "wtf/Vector.h"
-#include <memory>
using namespace WTF;
@@ -109,7 +107,7 @@ void reportBlockedEvent(ExecutionContext* context, const Event* event, Registere
event->type().getString().utf8().data(), lround(delayedSeconds * 1000));
v8::Local<v8::Function> function = eventListenerEffectiveFunction(v8Listener->isolate(), handler);
- std::unique_ptr<SourceLocation> location = SourceLocation::fromFunction(function);
+ OwnPtr<SourceLocation> location = SourceLocation::fromFunction(function);
ConsoleMessage* message = ConsoleMessage::create(JSMessageSource, WarningMessageLevel, messageText, std::move(location));
context->addConsoleMessage(message);
registeredListener->setBlockedEventWarningEmitted();
@@ -554,7 +552,7 @@ bool EventTarget::fireEventListeners(Event* event, EventTargetData* d, EventList
size_t i = 0;
size_t size = entry.size();
if (!d->firingEventIterators)
- d->firingEventIterators = wrapUnique(new FiringEventIteratorVector);
+ d->firingEventIterators = adoptPtr(new FiringEventIteratorVector);
d->firingEventIterators->append(FiringEventIterator(event->type(), i, size));
double blockedEventThreshold = blockedEventsWarningThreshold(context, event);
« no previous file with comments | « third_party/WebKit/Source/core/events/EventTarget.h ('k') | third_party/WebKit/Source/core/events/GenericEventQueue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698