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

Side by Side Diff: third_party/WebKit/Source/modules/fetch/ReadableStreamDataConsumerHandle.cpp

Issue 1773813007: blink: Rename modules/ method to prefix with get when they collide. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: clash-modules: rebase-fixes Created 4 years, 9 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
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 "modules/fetch/ReadableStreamDataConsumerHandle.h" 5 #include "modules/fetch/ReadableStreamDataConsumerHandle.h"
6 6
7 #include "bindings/core/v8/ExceptionState.h" 7 #include "bindings/core/v8/ExceptionState.h"
8 #include "bindings/core/v8/ReadableStreamOperations.h" 8 #include "bindings/core/v8/ReadableStreamOperations.h"
9 #include "bindings/core/v8/ScopedPersistent.h" 9 #include "bindings/core/v8/ScopedPersistent.h"
10 #include "bindings/core/v8/ScriptFunction.h" 10 #include "bindings/core/v8/ScriptFunction.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 } 43 }
44 44
45 ScriptValue call(ScriptValue v) override 45 ScriptValue call(ScriptValue v) override
46 { 46 {
47 RefPtr<ReadingContext> readingContext(m_readingContext); 47 RefPtr<ReadingContext> readingContext(m_readingContext);
48 if (!readingContext) 48 if (!readingContext)
49 return v; 49 return v;
50 bool done; 50 bool done;
51 v8::Local<v8::Value> item = v.v8Value(); 51 v8::Local<v8::Value> item = v.v8Value();
52 ASSERT(item->IsObject()); 52 ASSERT(item->IsObject());
53 v8::Local<v8::Value> value = v8CallOrCrash(v8UnpackIteratorResult(v. scriptState(), item.As<v8::Object>(), &done)); 53 v8::Local<v8::Value> value = v8CallOrCrash(v8UnpackIteratorResult(v. getScriptState(), item.As<v8::Object>(), &done));
54 if (done) { 54 if (done) {
55 readingContext->onReadDone(); 55 readingContext->onReadDone();
56 return v; 56 return v;
57 } 57 }
58 if (!V8Uint8Array::hasInstance(value, v.isolate())) { 58 if (!V8Uint8Array::hasInstance(value, v.isolate())) {
59 readingContext->onRejected(); 59 readingContext->onRejected();
60 return ScriptValue(); 60 return ScriptValue();
61 } 61 }
62 readingContext->onRead(V8Uint8Array::toImpl(value.As<v8::Object>())) ; 62 readingContext->onRead(V8Uint8Array::toImpl(value.As<v8::Object>())) ;
63 return v; 63 return v;
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 } 272 }
273 ReadableStreamDataConsumerHandle::~ReadableStreamDataConsumerHandle() = default; 273 ReadableStreamDataConsumerHandle::~ReadableStreamDataConsumerHandle() = default;
274 274
275 FetchDataConsumerHandle::Reader* ReadableStreamDataConsumerHandle::obtainReaderI nternal(Client* client) 275 FetchDataConsumerHandle::Reader* ReadableStreamDataConsumerHandle::obtainReaderI nternal(Client* client)
276 { 276 {
277 return new ReadingContext::ReaderImpl(m_readingContext, client); 277 return new ReadingContext::ReaderImpl(m_readingContext, client);
278 } 278 }
279 279
280 } // namespace blink 280 } // namespace blink
281 281
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698