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

Unified Diff: Source/modules/geofencing/Geofencing.cpp

Issue 1240763002: CallbackPromiseAdapter types should be more compatible with WebCallbacks (3/3). (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
Index: Source/modules/geofencing/Geofencing.cpp
diff --git a/Source/modules/geofencing/Geofencing.cpp b/Source/modules/geofencing/Geofencing.cpp
index c7bee130e3f1ee64f3d12c02f79da2208ccf82ce..2b143a2e72d5f3802798cc33553a2bea75a7a8d7 100644
--- a/Source/modules/geofencing/Geofencing.cpp
+++ b/Source/modules/geofencing/Geofencing.cpp
@@ -28,12 +28,12 @@ namespace {
// For CallbackPromiseAdapter to convert a WebVector of regions to a HeapVector.
class RegionArray {
public:
- using WebType = OwnPtr<WebVector<WebGeofencingRegistration>>;
- static HeapVector<Member<GeofencingRegion>> take(ScriptPromiseResolver* resolver, PassOwnPtr<WebVector<WebGeofencingRegistration>> webRegions)
+ using WebType = const WebVector<WebGeofencingRegistration>&;
+ static HeapVector<Member<GeofencingRegion>> take(ScriptPromiseResolver* resolver, const WebVector<WebGeofencingRegistration>& webRegions)
{
HeapVector<Member<GeofencingRegion>> regions;
- for (size_t i = 0; i < webRegions->size(); ++i)
- regions.append(CircularGeofencingRegion::create((*webRegions)[i].id, (*webRegions)[i].region));
+ for (size_t i = 0; i < webRegions.size(); ++i)
+ regions.append(CircularGeofencingRegion::create(webRegions[i].id, webRegions[i].region));
return regions;
}

Powered by Google App Engine
This is Rietveld 408576698