| Index: Source/core/testing/Internals.cpp
|
| diff --git a/Source/core/testing/Internals.cpp b/Source/core/testing/Internals.cpp
|
| index 9e78bd2aded76c8441266fb9a931a191f4f86ed0..71d265326f2de86afd4052c3478f81beb7827111 100644
|
| --- a/Source/core/testing/Internals.cpp
|
| +++ b/Source/core/testing/Internals.cpp
|
| @@ -156,27 +156,15 @@ namespace blink {
|
|
|
| namespace {
|
|
|
| -class InternalsIterator final : public Iterator {
|
| +class InternalsIterationSource final : public ValueIterable<int>::IterationSource {
|
| public:
|
| - InternalsIterator() : m_current(0) { }
|
| -
|
| - virtual ScriptValue next(ScriptState* scriptState, ExceptionState& exceptionState) override
|
| + virtual bool next(ScriptState* scriptState, int& value, ExceptionState& exceptionState) override
|
| {
|
| - int value = m_current * m_current;
|
| - if (m_current >= 5)
|
| - return v8IteratorResultDone(scriptState);
|
| - ++m_current;
|
| - return v8IteratorResult(scriptState, value);
|
| + if (m_index >= 5)
|
| + return false;
|
| + value = m_index * m_index;
|
| + return true;
|
| }
|
| -
|
| - virtual ScriptValue next(ScriptState* scriptState, ScriptValue value, ExceptionState& exceptionState) override
|
| - {
|
| - exceptionState.throwTypeError("Not implemented");
|
| - return ScriptValue();
|
| - }
|
| -
|
| -private:
|
| - int m_current;
|
| };
|
|
|
| } // namespace
|
| @@ -2364,14 +2352,14 @@ void Internals::forcePluginPlaceholder(HTMLElement* element, const PluginPlaceho
|
| toHTMLPlugInElement(element)->setPlaceholder(DictionaryPluginPlaceholder::create(element->document(), options));
|
| }
|
|
|
| -Iterator* Internals::iterator(ScriptState* scriptState, ExceptionState& exceptionState)
|
| +void Internals::forceBlinkGCWithoutV8GC()
|
| {
|
| - return new InternalsIterator;
|
| + ThreadState::current()->scheduleGC();
|
| }
|
|
|
| -void Internals::forceBlinkGCWithoutV8GC()
|
| +ValueIterable<int>::IterationSource* Internals::startIteration(ScriptState*, ExceptionState&)
|
| {
|
| - ThreadState::current()->scheduleGC();
|
| + return new InternalsIterationSource();
|
| }
|
|
|
| } // namespace blink
|
|
|