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

Side by Side Diff: src/runtime/runtime-classes.cc

Issue 1417243002: [es6] Partially implement Reflect.setPrototypeOf. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 2 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 | « src/runtime/runtime-array.cc ('k') | src/runtime/runtime-object.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project 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 "src/runtime/runtime-utils.h" 5 #include "src/runtime/runtime-utils.h"
6 6
7 #include <stdlib.h> 7 #include <stdlib.h>
8 #include <limits> 8 #include <limits>
9 9
10 #include "src/arguments.h" 10 #include "src/arguments.h"
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 Object); 155 Object);
156 156
157 // TODO(arv): Only do this conditionally. 157 // TODO(arv): Only do this conditionally.
158 Handle<Symbol> home_object_symbol(isolate->heap()->home_object_symbol()); 158 Handle<Symbol> home_object_symbol(isolate->heap()->home_object_symbol());
159 RETURN_ON_EXCEPTION( 159 RETURN_ON_EXCEPTION(
160 isolate, JSObject::SetOwnPropertyIgnoreAttributes( 160 isolate, JSObject::SetOwnPropertyIgnoreAttributes(
161 constructor, home_object_symbol, prototype, DONT_ENUM), 161 constructor, home_object_symbol, prototype, DONT_ENUM),
162 Object); 162 Object);
163 163
164 if (!constructor_parent.is_null()) { 164 if (!constructor_parent.is_null()) {
165 RETURN_ON_EXCEPTION( 165 MAYBE_RETURN_NULL(JSObject::SetPrototype(constructor, constructor_parent,
166 isolate, JSObject::SetPrototype(constructor, constructor_parent, false), 166 false, THROW_ON_ERROR));
167 Object);
168 } 167 }
169 168
170 JSObject::AddProperty(prototype, isolate->factory()->constructor_string(), 169 JSObject::AddProperty(prototype, isolate->factory()->constructor_string(),
171 constructor, DONT_ENUM); 170 constructor, DONT_ENUM);
172 171
173 // Install private properties that are used to construct the FunctionToString. 172 // Install private properties that are used to construct the FunctionToString.
174 RETURN_ON_EXCEPTION( 173 RETURN_ON_EXCEPTION(
175 isolate, 174 isolate,
176 Object::SetProperty( 175 Object::SetProperty(
177 constructor, isolate->factory()->class_start_position_symbol(), 176 constructor, isolate->factory()->class_start_position_symbol(),
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
514 ASSIGN_RETURN_FAILURE_ON_EXCEPTION( 513 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
515 isolate, result, 514 isolate, result,
516 Execution::New(isolate, super_constructor, original_constructor, 515 Execution::New(isolate, super_constructor, original_constructor,
517 argument_count, arguments.get())); 516 argument_count, arguments.get()));
518 517
519 return *result; 518 return *result;
520 } 519 }
521 520
522 } // namespace internal 521 } // namespace internal
523 } // namespace v8 522 } // namespace v8
OLDNEW
« no previous file with comments | « src/runtime/runtime-array.cc ('k') | src/runtime/runtime-object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698