New issue
Advanced search Search tips

Issue 706715 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Mar 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug



Sign in to add a comment

Fix WTF::makeUnique for arrays

Project Member Reported by cblume@chromium.org, Mar 30 2017

Issue description

base::makeUnique and std::make_unique support allocating arrays with the syntax base::makeUnique<char[]>(20).

WTF::makeUnique calls WTF::IsGarbageCollectedType<T> to make sure it isn't attempting to makeUnique on a GC type. But that requires T be a complete type, and char[] isn't.
 

Comment 1 Deleted

Comment 2 by cblume@chromium.org, Mar 30 2017

Patch is at https://crrev.com/2790463002
Project Member

Comment 3 by bugdroid1@chromium.org, Mar 30 2017

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

commit 54702b16778aa3319f93a32d3ffdc4aef1c9a831
Author: cblume <cblume@chromium.org>
Date: Thu Mar 30 19:33:00 2017

Fix WTF::makeUnique for arrays

base::makeUnique and std::make_unique support allocating arrays with the
syntax base::makeUnique<char[]>(20).

WTF::makeUnique calls WTF::IsGarbageCollectedType<T> to make sure it
isn't attempting to makeUnique on a GC type. But that requires T be a
complete type, and char[] isn't.

R=esprehn@chromium.org
BUG= 706715 

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

[modify] https://crrev.com/54702b16778aa3319f93a32d3ffdc4aef1c9a831/third_party/WebKit/Source/platform/BUILD.gn
[modify] https://crrev.com/54702b16778aa3319f93a32d3ffdc4aef1c9a831/third_party/WebKit/Source/platform/wtf/PtrUtil.h
[add] https://crrev.com/54702b16778aa3319f93a32d3ffdc4aef1c9a831/third_party/WebKit/Source/platform/wtf/PtrUtilTest.cpp

Comment 4 by cblume@chromium.org, Mar 30 2017

Status: Fixed (was: Assigned)

Sign in to add a comment