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

Side by Side Diff: gin/object_template_builder.cc

Issue 1727063002: gin: Add out-of-line copy ctors for complex classes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 unified diff | Download patch
« no previous file with comments | « gin/object_template_builder.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "gin/object_template_builder.h" 5 #include "gin/object_template_builder.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include "gin/interceptor.h" 9 #include "gin/interceptor.h"
10 #include "gin/per_isolate_data.h" 10 #include "gin/per_isolate_data.h"
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 info.GetReturnValue().Set(v8::Local<v8::Array>::Cast(properties)); 138 info.GetReturnValue().Set(v8::Local<v8::Array>::Cast(properties));
139 } 139 }
140 140
141 } // namespace 141 } // namespace
142 142
143 ObjectTemplateBuilder::ObjectTemplateBuilder(v8::Isolate* isolate) 143 ObjectTemplateBuilder::ObjectTemplateBuilder(v8::Isolate* isolate)
144 : isolate_(isolate), template_(v8::ObjectTemplate::New(isolate)) { 144 : isolate_(isolate), template_(v8::ObjectTemplate::New(isolate)) {
145 template_->SetInternalFieldCount(kNumberOfInternalFields); 145 template_->SetInternalFieldCount(kNumberOfInternalFields);
146 } 146 }
147 147
148 ObjectTemplateBuilder::ObjectTemplateBuilder(
149 const ObjectTemplateBuilder& other) = default;
150
148 ObjectTemplateBuilder::~ObjectTemplateBuilder() { 151 ObjectTemplateBuilder::~ObjectTemplateBuilder() {
149 } 152 }
150 153
151 ObjectTemplateBuilder& ObjectTemplateBuilder::AddNamedPropertyInterceptor() { 154 ObjectTemplateBuilder& ObjectTemplateBuilder::AddNamedPropertyInterceptor() {
152 template_->SetNamedPropertyHandler(&NamedPropertyGetter, 155 template_->SetNamedPropertyHandler(&NamedPropertyGetter,
153 &NamedPropertySetter, 156 &NamedPropertySetter,
154 &NamedPropertyQuery, 157 &NamedPropertyQuery,
155 NULL, 158 NULL,
156 &NamedPropertyEnumerator); 159 &NamedPropertyEnumerator);
157 return *this; 160 return *this;
(...skipping 22 matching lines...) Expand all
180 return *this; 183 return *this;
181 } 184 }
182 185
183 v8::Local<v8::ObjectTemplate> ObjectTemplateBuilder::Build() { 186 v8::Local<v8::ObjectTemplate> ObjectTemplateBuilder::Build() {
184 v8::Local<v8::ObjectTemplate> result = template_; 187 v8::Local<v8::ObjectTemplate> result = template_;
185 template_.Clear(); 188 template_.Clear();
186 return result; 189 return result;
187 } 190 }
188 191
189 } // namespace gin 192 } // namespace gin
OLDNEW
« no previous file with comments | « gin/object_template_builder.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698