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

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

Issue 1270423003: [strong] dot prototypes of strong class literals should be strong objects (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 4 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 | « no previous file | test/mjsunit/strong/literals.js » ('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 <stdlib.h> 5 #include <stdlib.h>
6 #include <limits> 6 #include <limits>
7 7
8 #include "src/v8.h" 8 #include "src/v8.h"
9 9
10 #include "src/arguments.h" 10 #include "src/arguments.h"
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 // TODO(arv): Should be IsConstructor. 130 // TODO(arv): Should be IsConstructor.
131 THROW_NEW_ERROR( 131 THROW_NEW_ERROR(
132 isolate, 132 isolate,
133 NewTypeError(MessageTemplate::kExtendsValueNotFunction, super_class), 133 NewTypeError(MessageTemplate::kExtendsValueNotFunction, super_class),
134 Object); 134 Object);
135 } 135 }
136 } 136 }
137 137
138 Handle<Map> map = 138 Handle<Map> map =
139 isolate->factory()->NewMap(JS_OBJECT_TYPE, JSObject::kHeaderSize); 139 isolate->factory()->NewMap(JS_OBJECT_TYPE, JSObject::kHeaderSize);
140 if (constructor->map()->is_strong()) {
141 map->set_is_strong();
142 }
140 Map::SetPrototype(map, prototype_parent); 143 Map::SetPrototype(map, prototype_parent);
141 map->SetConstructor(*constructor); 144 map->SetConstructor(*constructor);
142 Handle<JSObject> prototype = isolate->factory()->NewJSObjectFromMap(map); 145 Handle<JSObject> prototype = isolate->factory()->NewJSObjectFromMap(map);
143 146
144 Handle<String> name_string = name->IsString() 147 Handle<String> name_string = name->IsString()
145 ? Handle<String>::cast(name) 148 ? Handle<String>::cast(name)
146 : isolate->factory()->empty_string(); 149 : isolate->factory()->empty_string();
147 constructor->shared()->set_name(*name_string); 150 constructor->shared()->set_name(*name_string);
148 151
149 if (!super_class->IsTheHole()) { 152 if (!super_class->IsTheHole()) {
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after
590 Handle<Object> result; 593 Handle<Object> result;
591 ASSIGN_RETURN_FAILURE_ON_EXCEPTION( 594 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
592 isolate, result, 595 isolate, result,
593 Execution::Call(isolate, reflect, isolate->factory()->undefined_value(), 596 Execution::Call(isolate, reflect, isolate->factory()->undefined_value(),
594 arraysize(argv), argv)); 597 arraysize(argv), argv));
595 598
596 return *result; 599 return *result;
597 } 600 }
598 } // namespace internal 601 } // namespace internal
599 } // namespace v8 602 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/strong/literals.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698