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

Unified Diff: Source/web/tests/CustomEventTest.cpp

Issue 1238083002: Oilpan: Move the EventListener hierarchy to Oilpan's heap (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 5 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
« Source/core/events/EventTarget.cpp ('K') | « Source/web/WebViewImpl.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/tests/CustomEventTest.cpp
diff --git a/Source/web/tests/CustomEventTest.cpp b/Source/web/tests/CustomEventTest.cpp
index 4e9c3adeb1e7143be29c67b70546a46d6cd654ca..38809ea1c66450baaec92ce6515f6dc93b10437b 100644
--- a/Source/web/tests/CustomEventTest.cpp
+++ b/Source/web/tests/CustomEventTest.cpp
@@ -50,7 +50,7 @@
namespace blink {
-class TestListener : public V8AbstractEventListener {
+class TestListener final : public V8AbstractEventListener {
public:
bool operator==(const EventListener&) override
{
@@ -68,13 +68,13 @@ public:
EXPECT_EQ(jsEvent->ToObject(context).ToLocalChecked()->Get(context, v8AtomicString(isolate(), "detail")).ToLocalChecked(), v8::Boolean::New(isolate(), true));
}
- static PassRefPtr<TestListener> create(ScriptState* scriptState)
+ static PassRefPtrWillBeRawPtr<TestListener> create(ScriptState* scriptState)
{
- return adoptRef(new TestListener(scriptState));
+ return adoptRefWillBeNoop(new TestListener(scriptState));
}
private:
- TestListener(ScriptState* scriptState)
+ explicit TestListener(ScriptState* scriptState)
: V8AbstractEventListener(false, scriptState->world(), scriptState->isolate())
{
}
@@ -106,7 +106,7 @@ TEST(CustomEventTest, InitWithSerializedScriptValue)
v8::Isolate* isolate = toIsolate(frame->frame());
V8TestingScope scope(isolate);
customEvent.initCustomEvent("blah", false, false, WebSerializedScriptValue::serialize(v8::Boolean::New(isolate, true)));
- RefPtr<EventListener> listener = TestListener::create(scope.scriptState());
+ RefPtrWillBeRawPtr<EventListener> listener = TestListener::create(scope.scriptState());
frame->frame()->document()->addEventListener("blah", listener, false);
frame->frame()->document()->dispatchEvent(event);
« Source/core/events/EventTarget.cpp ('K') | « Source/web/WebViewImpl.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698