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

Side by Side Diff: Source/core/streams/ExclusiveStreamReaderTest.cpp

Issue 896993002: Add trace method for NoopUnderlyingSource GC mixin. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 10 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 #include "core/streams/ExclusiveStreamReader.h" 6 #include "core/streams/ExclusiveStreamReader.h"
7 7
8 #include "bindings/core/v8/ExceptionState.h" 8 #include "bindings/core/v8/ExceptionState.h"
9 #include "bindings/core/v8/ScriptState.h" 9 #include "bindings/core/v8/ScriptState.h"
10 #include "bindings/core/v8/ToV8.h" 10 #include "bindings/core/v8/ToV8.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 } 47 }
48 48
49 String* m_value; 49 String* m_value;
50 }; 50 };
51 51
52 class NoopUnderlyingSource final : public GarbageCollectedFinalized<NoopUnderlyi ngSource>, public UnderlyingSource { 52 class NoopUnderlyingSource final : public GarbageCollectedFinalized<NoopUnderlyi ngSource>, public UnderlyingSource {
53 USING_GARBAGE_COLLECTED_MIXIN(NoopUnderlyingSource); 53 USING_GARBAGE_COLLECTED_MIXIN(NoopUnderlyingSource);
54 public: 54 public:
55 ~NoopUnderlyingSource() override { } 55 ~NoopUnderlyingSource() override { }
56 56
57 void trace(Visitor* visitor) override { UnderlyingSource::trace(visitor); }
58
57 void pullSource() override { } 59 void pullSource() override { }
58 ScriptPromise cancelSource(ScriptState* scriptState, ScriptValue reason) { r eturn ScriptPromise::cast(scriptState, reason); } 60 ScriptPromise cancelSource(ScriptState* scriptState, ScriptValue reason) { r eturn ScriptPromise::cast(scriptState, reason); }
59 }; 61 };
60 62
61 class PermissiveStrategy final : public StringStream::Strategy { 63 class PermissiveStrategy final : public StringStream::Strategy {
62 public: 64 public:
63 bool shouldApplyBackpressure(size_t, ReadableStream*) override { return fals e; } 65 bool shouldApplyBackpressure(size_t, ReadableStream*) override { return fals e; }
64 }; 66 };
65 67
66 class ExclusiveStreamReaderTest : public ::testing::Test { 68 class ExclusiveStreamReaderTest : public ::testing::Test {
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 reader->releaseLock(); 426 reader->releaseLock();
425 EXPECT_TRUE(onFulfilled.isNull()); 427 EXPECT_TRUE(onFulfilled.isNull());
426 428
427 isolate()->RunMicrotasks(); 429 isolate()->RunMicrotasks();
428 EXPECT_EQ("undefined", onFulfilled); 430 EXPECT_EQ("undefined", onFulfilled);
429 } 431 }
430 432
431 } // namespace 433 } // namespace
432 434
433 } // namespace blink 435 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698