diff options
author | vmpstr <vmpstr@chromium.org> | 2016-02-25 12:25:14 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-02-25 20:26:24 +0000 |
commit | 8ed6f86e3e08945205747a74de58972d57851968 (patch) | |
tree | ae999691f41e39e0d5961a44ef9d1a15bf8a905d /gin | |
parent | a30521d96591dfd0cc8cb9f0c5bce3558674d4e5 (diff) | |
download | chromium_src-8ed6f86e3e08945205747a74de58972d57851968.zip chromium_src-8ed6f86e3e08945205747a74de58972d57851968.tar.gz chromium_src-8ed6f86e3e08945205747a74de58972d57851968.tar.bz2 |
gin: Add out-of-line copy ctors for complex classes.
This patch adds out of line copy constructors for classes that our
clang-plugin considers heavy. This is an effort to enable copy
constructor checks by default.
BUG=436357
R=aa@chromium.org, dcheng@chromium.org, thakis@chromium.org
Review URL: https://codereview.chromium.org/1727063002
Cr-Commit-Position: refs/heads/master@{#377655}
Diffstat (limited to 'gin')
-rw-r--r-- | gin/dictionary.cc | 2 | ||||
-rw-r--r-- | gin/dictionary.h | 1 | ||||
-rw-r--r-- | gin/object_template_builder.cc | 3 | ||||
-rw-r--r-- | gin/object_template_builder.h | 1 |
4 files changed, 7 insertions, 0 deletions
diff --git a/gin/dictionary.cc b/gin/dictionary.cc index 018a82c..54f1a4a 100644 --- a/gin/dictionary.cc +++ b/gin/dictionary.cc @@ -16,6 +16,8 @@ Dictionary::Dictionary(v8::Isolate* isolate, object_(object) { } +Dictionary::Dictionary(const Dictionary& other) = default; + Dictionary::~Dictionary() { } diff --git a/gin/dictionary.h b/gin/dictionary.h index 64736b1d..5a61cc7 100644 --- a/gin/dictionary.h +++ b/gin/dictionary.h @@ -26,6 +26,7 @@ class GIN_EXPORT Dictionary { public: explicit Dictionary(v8::Isolate* isolate); Dictionary(v8::Isolate* isolate, v8::Local<v8::Object> object); + Dictionary(const Dictionary& other); ~Dictionary(); static Dictionary CreateEmpty(v8::Isolate* isolate); diff --git a/gin/object_template_builder.cc b/gin/object_template_builder.cc index 158131f..a40df60 100644 --- a/gin/object_template_builder.cc +++ b/gin/object_template_builder.cc @@ -145,6 +145,9 @@ ObjectTemplateBuilder::ObjectTemplateBuilder(v8::Isolate* isolate) template_->SetInternalFieldCount(kNumberOfInternalFields); } +ObjectTemplateBuilder::ObjectTemplateBuilder( + const ObjectTemplateBuilder& other) = default; + ObjectTemplateBuilder::~ObjectTemplateBuilder() { } diff --git a/gin/object_template_builder.h b/gin/object_template_builder.h index 3cfd4a3..72369ee 100644 --- a/gin/object_template_builder.h +++ b/gin/object_template_builder.h @@ -89,6 +89,7 @@ struct CallbackTraits<v8::Local<v8::FunctionTemplate> > { class GIN_EXPORT ObjectTemplateBuilder { public: explicit ObjectTemplateBuilder(v8::Isolate* isolate); + ObjectTemplateBuilder(const ObjectTemplateBuilder& other); ~ObjectTemplateBuilder(); // It's against Google C++ style to return a non-const ref, but we take some |