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

Unified Diff: third_party/WebKit/Source/modules/cachestorage/Cache.cpp

Issue 2833983004: bindings: Port away from ToImplArray/ToMemberNativeArray. (Closed)
Patch Set: Created 3 years, 8 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/modules/cachestorage/Cache.cpp
diff --git a/third_party/WebKit/Source/modules/cachestorage/Cache.cpp b/third_party/WebKit/Source/modules/cachestorage/Cache.cpp
index bf116ee56a605103d1c0f706b9f2fe1661d84e4e..2bf6e74d9d1bf5bdf9e48870dbbfdb9a6b512afb 100644
--- a/third_party/WebKit/Source/modules/cachestorage/Cache.cpp
+++ b/third_party/WebKit/Source/modules/cachestorage/Cache.cpp
@@ -4,8 +4,12 @@
#include "modules/cachestorage/Cache.h"
+#include <memory>
+#include <utility>
#include "bindings/core/v8/CallbackPromiseAdapter.h"
#include "bindings/core/v8/ExceptionState.h"
+#include "bindings/core/v8/IDLTypes.h"
+#include "bindings/core/v8/NativeValueTraitsImpl.h"
#include "bindings/core/v8/ScriptPromiseResolver.h"
#include "bindings/core/v8/ScriptState.h"
#include "bindings/core/v8/V8Binding.h"
@@ -22,8 +26,6 @@
#include "platform/HTTPNames.h"
#include "platform/Histogram.h"
#include "public/platform/modules/serviceworker/WebServiceWorkerCache.h"
-#include <memory>
-#include <utility>
namespace blink {
@@ -233,9 +235,9 @@ class Cache::FetchResolvedForAdd final : public ScriptFunction {
ScriptValue Call(ScriptValue value) override {
NonThrowableExceptionState exception_state;
- HeapVector<Member<Response>> responses = ToMemberNativeArray<Response>(
- value.V8Value(), requests_.size(), GetScriptState()->GetIsolate(),
- exception_state);
+ HeapVector<Member<Response>> responses =
+ NativeValueTraits<IDLSequence<Response>>::NativeValue(
+ GetScriptState()->GetIsolate(), value.V8Value(), exception_state);
for (const auto& response : responses) {
if (!response->ok()) {
« no previous file with comments | « third_party/WebKit/Source/core/frame/DOMTimerTest.cpp ('k') | third_party/WebKit/Source/modules/cachestorage/CacheTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698