New issue
Advanced search Search tips

Issue 698978 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Mar 2017
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Feature



Sign in to add a comment

Make GURLs cheap to move.

Project Member Reported by sclit...@chromium.org, Mar 7 2017

Issue description

Currently, moving a GURL (https://cs.chromium.org/chromium/src/url/gurl.h) copies the GURL, since there's no move constructor or assignment operator implemented. This means that code that moves GURLs around a lot (e.g. an std::vector<GURL>) performs lots of string copies.

GURL should implement a cheap move constructor and assignment operator to cut down on all these copies.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Mar 14 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/376085b3685d5cd6195909462036343d11fca018

commit 376085b3685d5cd6195909462036343d11fca018
Author: sclittle <sclittle@chromium.org>
Date: Tue Mar 14 21:08:41 2017

Add move constructors and assignment operators to GURL

This CL implements a cheap move constructor and assignment operator for
GURL, so that code that moves around GURLs a lot (e.g. an
std::vector<GURL>) doesn't need to perform so many copies.

BUG= 698978 

Review-Url: https://codereview.chromium.org/2737693003
Cr-Commit-Position: refs/heads/master@{#456828}

[modify] https://crrev.com/376085b3685d5cd6195909462036343d11fca018/url/gurl.cc
[modify] https://crrev.com/376085b3685d5cd6195909462036343d11fca018/url/gurl.h

Status: Fixed (was: Started)

Sign in to add a comment