OLD | NEW |
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/bootstrapper.h" | 5 #include "src/bootstrapper.h" |
6 | 6 |
7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
9 #include "src/extensions/externalize-string-extension.h" | 9 #include "src/extensions/externalize-string-extension.h" |
10 #include "src/extensions/free-buffer-extension.h" | 10 #include "src/extensions/free-buffer-extension.h" |
(...skipping 751 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
762 if (!proto_template->IsUndefined()) { | 762 if (!proto_template->IsUndefined()) { |
763 js_global_object_template = | 763 js_global_object_template = |
764 Handle<ObjectTemplateInfo>::cast(proto_template); | 764 Handle<ObjectTemplateInfo>::cast(proto_template); |
765 } | 765 } |
766 } | 766 } |
767 | 767 |
768 if (js_global_object_template.is_null()) { | 768 if (js_global_object_template.is_null()) { |
769 Handle<String> name = Handle<String>(heap()->empty_string()); | 769 Handle<String> name = Handle<String>(heap()->empty_string()); |
770 Handle<Code> code = Handle<Code>(isolate()->builtins()->builtin( | 770 Handle<Code> code = Handle<Code>(isolate()->builtins()->builtin( |
771 Builtins::kIllegal)); | 771 Builtins::kIllegal)); |
| 772 Handle<JSObject> prototype = |
| 773 factory()->NewFunctionPrototype(isolate()->object_function()); |
772 js_global_object_function = factory()->NewFunction( | 774 js_global_object_function = factory()->NewFunction( |
773 name, code, JS_GLOBAL_OBJECT_TYPE, JSGlobalObject::kSize); | 775 name, code, prototype, JS_GLOBAL_OBJECT_TYPE, JSGlobalObject::kSize); |
774 // Change the constructor property of the prototype of the | 776 #ifdef DEBUG |
775 // hidden global function to refer to the Object function. | 777 LookupIterator it(prototype, factory()->constructor_string(), |
776 Handle<JSObject> prototype = | 778 LookupIterator::CHECK_OWN_REAL); |
777 Handle<JSObject>( | 779 Handle<Object> value = JSReceiver::GetProperty(&it).ToHandleChecked(); |
778 JSObject::cast(js_global_object_function->instance_prototype())); | 780 ASSERT(it.IsFound()); |
779 JSObject::SetOwnPropertyIgnoreAttributes( | 781 ASSERT_EQ(*isolate()->object_function(), *value); |
780 prototype, factory()->constructor_string(), | 782 #endif |
781 isolate()->object_function(), NONE).Check(); | |
782 } else { | 783 } else { |
783 Handle<FunctionTemplateInfo> js_global_object_constructor( | 784 Handle<FunctionTemplateInfo> js_global_object_constructor( |
784 FunctionTemplateInfo::cast(js_global_object_template->constructor())); | 785 FunctionTemplateInfo::cast(js_global_object_template->constructor())); |
785 js_global_object_function = | 786 js_global_object_function = |
786 factory()->CreateApiFunction(js_global_object_constructor, | 787 factory()->CreateApiFunction(js_global_object_constructor, |
787 factory()->the_hole_value(), | 788 factory()->the_hole_value(), |
788 factory()->GlobalObjectType); | 789 factory()->GlobalObjectType); |
789 } | 790 } |
790 | 791 |
791 js_global_object_function->initial_map()->set_is_hidden_prototype(); | 792 js_global_object_function->initial_map()->set_is_hidden_prototype(); |
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1126 native_context()->set_data_view_fun(*data_view_fun); | 1127 native_context()->set_data_view_fun(*data_view_fun); |
1127 } | 1128 } |
1128 | 1129 |
1129 // -- W e a k M a p | 1130 // -- W e a k M a p |
1130 InstallFunction(global, "WeakMap", JS_WEAK_MAP_TYPE, JSWeakMap::kSize, | 1131 InstallFunction(global, "WeakMap", JS_WEAK_MAP_TYPE, JSWeakMap::kSize, |
1131 isolate->initial_object_prototype(), Builtins::kIllegal); | 1132 isolate->initial_object_prototype(), Builtins::kIllegal); |
1132 // -- W e a k S e t | 1133 // -- W e a k S e t |
1133 InstallFunction(global, "WeakSet", JS_WEAK_SET_TYPE, JSWeakSet::kSize, | 1134 InstallFunction(global, "WeakSet", JS_WEAK_SET_TYPE, JSWeakSet::kSize, |
1134 isolate->initial_object_prototype(), Builtins::kIllegal); | 1135 isolate->initial_object_prototype(), Builtins::kIllegal); |
1135 | 1136 |
1136 { // --- arguments_boilerplate_ | 1137 { // --- sloppy arguments map |
1137 // Make sure we can recognize argument objects at runtime. | 1138 // Make sure we can recognize argument objects at runtime. |
1138 // This is done by introducing an anonymous function with | 1139 // This is done by introducing an anonymous function with |
1139 // class_name equals 'Arguments'. | 1140 // class_name equals 'Arguments'. |
1140 Handle<String> arguments_string = factory->InternalizeOneByteString( | 1141 Handle<String> arguments_string = factory->InternalizeOneByteString( |
1141 STATIC_ASCII_VECTOR("Arguments")); | 1142 STATIC_ASCII_VECTOR("Arguments")); |
1142 Handle<Code> code(isolate->builtins()->builtin(Builtins::kIllegal)); | 1143 Handle<Code> code(isolate->builtins()->builtin(Builtins::kIllegal)); |
1143 | |
1144 Handle<JSFunction> function = factory->NewFunctionWithoutPrototype( | 1144 Handle<JSFunction> function = factory->NewFunctionWithoutPrototype( |
1145 arguments_string, code); | 1145 arguments_string, code); |
| 1146 function->shared()->set_instance_class_name(*arguments_string); |
| 1147 |
| 1148 Handle<Map> map = |
| 1149 factory->NewMap(JS_OBJECT_TYPE, Heap::kSloppyArgumentsObjectSize); |
| 1150 // Create the descriptor array for the arguments object. |
| 1151 Map::EnsureDescriptorSlack(map, 2); |
| 1152 |
| 1153 { // length |
| 1154 FieldDescriptor d(factory->length_string(), Heap::kArgumentsLengthIndex, |
| 1155 DONT_ENUM, Representation::Tagged()); |
| 1156 map->AppendDescriptor(&d); |
| 1157 } |
| 1158 { // callee |
| 1159 FieldDescriptor d(factory->callee_string(), Heap::kArgumentsCalleeIndex, |
| 1160 DONT_ENUM, Representation::Tagged()); |
| 1161 map->AppendDescriptor(&d); |
| 1162 } |
| 1163 |
| 1164 map->set_function_with_prototype(true); |
| 1165 map->set_prototype(native_context()->object_function()->prototype()); |
| 1166 map->set_pre_allocated_property_fields(2); |
| 1167 map->set_inobject_properties(2); |
| 1168 native_context()->set_sloppy_arguments_map(*map); |
| 1169 |
1146 ASSERT(!function->has_initial_map()); | 1170 ASSERT(!function->has_initial_map()); |
1147 function->shared()->set_instance_class_name(*arguments_string); | 1171 function->set_initial_map(*map); |
1148 function->shared()->set_expected_nof_properties(2); | 1172 map->set_constructor(*function); |
1149 function->set_prototype_or_initial_map( | |
1150 native_context()->object_function()->prototype()); | |
1151 Handle<JSObject> result = factory->NewJSObject(function); | |
1152 | 1173 |
1153 native_context()->set_sloppy_arguments_boilerplate(*result); | 1174 ASSERT(map->inobject_properties() > Heap::kArgumentsCalleeIndex); |
1154 // Note: length must be added as the first property and | 1175 ASSERT(map->inobject_properties() > Heap::kArgumentsLengthIndex); |
1155 // callee must be added as the second property. | 1176 ASSERT(!map->is_dictionary_map()); |
1156 JSObject::AddProperty( | 1177 ASSERT(IsFastObjectElementsKind(map->elements_kind())); |
1157 result, factory->length_string(), | |
1158 factory->undefined_value(), DONT_ENUM, | |
1159 Object::FORCE_TAGGED, FORCE_FIELD); | |
1160 JSObject::AddProperty( | |
1161 result, factory->callee_string(), | |
1162 factory->undefined_value(), DONT_ENUM, | |
1163 Object::FORCE_TAGGED, FORCE_FIELD); | |
1164 | |
1165 #ifdef DEBUG | |
1166 LookupResult lookup(isolate); | |
1167 result->LookupOwn(factory->callee_string(), &lookup); | |
1168 ASSERT(lookup.IsField()); | |
1169 ASSERT(lookup.GetFieldIndex().property_index() == | |
1170 Heap::kArgumentsCalleeIndex); | |
1171 | |
1172 result->LookupOwn(factory->length_string(), &lookup); | |
1173 ASSERT(lookup.IsField()); | |
1174 ASSERT(lookup.GetFieldIndex().property_index() == | |
1175 Heap::kArgumentsLengthIndex); | |
1176 | |
1177 ASSERT(result->map()->inobject_properties() > Heap::kArgumentsCalleeIndex); | |
1178 ASSERT(result->map()->inobject_properties() > Heap::kArgumentsLengthIndex); | |
1179 | |
1180 // Check the state of the object. | |
1181 ASSERT(result->HasFastProperties()); | |
1182 ASSERT(result->HasFastObjectElements()); | |
1183 #endif | |
1184 } | 1178 } |
1185 | 1179 |
1186 { // --- aliased_arguments_boilerplate_ | 1180 { // --- aliased arguments map |
1187 // Set up a well-formed parameter map to make assertions happy. | 1181 Handle<Map> map = Map::Copy(isolate->sloppy_arguments_map()); |
1188 Handle<FixedArray> elements = factory->NewFixedArray(2); | 1182 map->set_elements_kind(SLOPPY_ARGUMENTS_ELEMENTS); |
1189 elements->set_map(heap->sloppy_arguments_elements_map()); | 1183 ASSERT_EQ(2, map->pre_allocated_property_fields()); |
1190 Handle<FixedArray> array; | 1184 native_context()->set_aliased_arguments_map(*map); |
1191 array = factory->NewFixedArray(0); | |
1192 elements->set(0, *array); | |
1193 array = factory->NewFixedArray(0); | |
1194 elements->set(1, *array); | |
1195 | |
1196 Handle<Map> old_map( | |
1197 native_context()->sloppy_arguments_boilerplate()->map()); | |
1198 Handle<Map> new_map = Map::Copy(old_map); | |
1199 new_map->set_pre_allocated_property_fields(2); | |
1200 Handle<JSObject> result = factory->NewJSObjectFromMap(new_map); | |
1201 // Set elements kind after allocating the object because | |
1202 // NewJSObjectFromMap assumes a fast elements map. | |
1203 new_map->set_elements_kind(SLOPPY_ARGUMENTS_ELEMENTS); | |
1204 result->set_elements(*elements); | |
1205 ASSERT(result->HasSloppyArgumentsElements()); | |
1206 native_context()->set_aliased_arguments_boilerplate(*result); | |
1207 } | 1185 } |
1208 | 1186 |
1209 { // --- strict mode arguments boilerplate | 1187 { // --- strict mode arguments map |
1210 const PropertyAttributes attributes = | 1188 const PropertyAttributes attributes = |
1211 static_cast<PropertyAttributes>(DONT_ENUM | DONT_DELETE | READ_ONLY); | 1189 static_cast<PropertyAttributes>(DONT_ENUM | DONT_DELETE | READ_ONLY); |
1212 | 1190 |
1213 // Create the ThrowTypeError functions. | 1191 // Create the ThrowTypeError functions. |
1214 Handle<AccessorPair> callee = factory->NewAccessorPair(); | 1192 Handle<AccessorPair> callee = factory->NewAccessorPair(); |
1215 Handle<AccessorPair> caller = factory->NewAccessorPair(); | 1193 Handle<AccessorPair> caller = factory->NewAccessorPair(); |
1216 | 1194 |
1217 Handle<JSFunction> poison = GetStrictPoisonFunction(); | 1195 Handle<JSFunction> poison = GetStrictPoisonFunction(); |
1218 | 1196 |
1219 // Install the ThrowTypeError functions. | 1197 // Install the ThrowTypeError functions. |
1220 callee->set_getter(*poison); | 1198 callee->set_getter(*poison); |
1221 callee->set_setter(*poison); | 1199 callee->set_setter(*poison); |
1222 caller->set_getter(*poison); | 1200 caller->set_getter(*poison); |
1223 caller->set_setter(*poison); | 1201 caller->set_setter(*poison); |
1224 | 1202 |
1225 // Create the map. Allocate one in-object field for length. | 1203 // Create the map. Allocate one in-object field for length. |
1226 Handle<Map> map = factory->NewMap(JS_OBJECT_TYPE, | 1204 Handle<Map> map = factory->NewMap(JS_OBJECT_TYPE, |
1227 Heap::kStrictArgumentsObjectSize); | 1205 Heap::kStrictArgumentsObjectSize); |
1228 // Create the descriptor array for the arguments object. | 1206 // Create the descriptor array for the arguments object. |
1229 Map::EnsureDescriptorSlack(map, 3); | 1207 Map::EnsureDescriptorSlack(map, 3); |
1230 | 1208 |
1231 { // length | 1209 { // length |
1232 FieldDescriptor d( | 1210 FieldDescriptor d(factory->length_string(), Heap::kArgumentsLengthIndex, |
1233 factory->length_string(), 0, DONT_ENUM, Representation::Tagged()); | 1211 DONT_ENUM, Representation::Tagged()); |
1234 map->AppendDescriptor(&d); | 1212 map->AppendDescriptor(&d); |
1235 } | 1213 } |
1236 { // callee | 1214 { // callee |
1237 CallbacksDescriptor d(factory->callee_string(), | 1215 CallbacksDescriptor d(factory->callee_string(), callee, attributes); |
1238 callee, | |
1239 attributes); | |
1240 map->AppendDescriptor(&d); | 1216 map->AppendDescriptor(&d); |
1241 } | 1217 } |
1242 { // caller | 1218 { // caller |
1243 CallbacksDescriptor d(factory->caller_string(), | 1219 CallbacksDescriptor d(factory->caller_string(), caller, attributes); |
1244 caller, | |
1245 attributes); | |
1246 map->AppendDescriptor(&d); | 1220 map->AppendDescriptor(&d); |
1247 } | 1221 } |
1248 | 1222 |
1249 map->set_function_with_prototype(true); | 1223 map->set_function_with_prototype(true); |
1250 map->set_prototype(native_context()->object_function()->prototype()); | 1224 map->set_prototype(native_context()->object_function()->prototype()); |
1251 map->set_pre_allocated_property_fields(1); | 1225 map->set_pre_allocated_property_fields(1); |
1252 map->set_inobject_properties(1); | 1226 map->set_inobject_properties(1); |
1253 | 1227 |
1254 // Copy constructor from the sloppy arguments boilerplate. | 1228 // Copy constructor from the sloppy arguments boilerplate. |
1255 map->set_constructor( | 1229 map->set_constructor( |
1256 native_context()->sloppy_arguments_boilerplate()->map()->constructor()); | 1230 native_context()->sloppy_arguments_map()->constructor()); |
1257 | 1231 |
1258 // Allocate the arguments boilerplate object. | 1232 native_context()->set_strict_arguments_map(*map); |
1259 Handle<JSObject> result = factory->NewJSObjectFromMap(map); | |
1260 native_context()->set_strict_arguments_boilerplate(*result); | |
1261 | 1233 |
1262 #ifdef DEBUG | 1234 ASSERT(map->inobject_properties() > Heap::kArgumentsLengthIndex); |
1263 LookupResult lookup(isolate); | 1235 ASSERT(!map->is_dictionary_map()); |
1264 result->LookupOwn(factory->length_string(), &lookup); | 1236 ASSERT(IsFastObjectElementsKind(map->elements_kind())); |
1265 ASSERT(lookup.IsField()); | |
1266 ASSERT(lookup.GetFieldIndex().property_index() == | |
1267 Heap::kArgumentsLengthIndex); | |
1268 | |
1269 Handle<Object> length_value = Object::GetProperty( | |
1270 result, factory->length_string()).ToHandleChecked(); | |
1271 ASSERT_EQ(heap->undefined_value(), *length_value); | |
1272 | |
1273 ASSERT(result->map()->inobject_properties() > Heap::kArgumentsLengthIndex); | |
1274 | |
1275 // Check the state of the object. | |
1276 ASSERT(result->HasFastProperties()); | |
1277 ASSERT(result->HasFastObjectElements()); | |
1278 #endif | |
1279 } | 1237 } |
1280 | 1238 |
1281 { // --- context extension | 1239 { // --- context extension |
1282 // Create a function for the context extension objects. | 1240 // Create a function for the context extension objects. |
1283 Handle<Code> code = Handle<Code>( | 1241 Handle<Code> code = Handle<Code>( |
1284 isolate->builtins()->builtin(Builtins::kIllegal)); | 1242 isolate->builtins()->builtin(Builtins::kIllegal)); |
1285 Handle<JSFunction> context_extension_fun = factory->NewFunction( | 1243 Handle<JSFunction> context_extension_fun = factory->NewFunction( |
1286 factory->empty_string(), code, JS_CONTEXT_EXTENSION_OBJECT_TYPE, | 1244 factory->empty_string(), code, JS_CONTEXT_EXTENSION_OBJECT_TYPE, |
1287 JSObject::kHeaderSize); | 1245 JSObject::kHeaderSize); |
1288 | 1246 |
(...skipping 896 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2185 BootstrapperActive active(this); | 2143 BootstrapperActive active(this); |
2186 SaveContext saved_context(isolate_); | 2144 SaveContext saved_context(isolate_); |
2187 isolate_->set_context(*native_context); | 2145 isolate_->set_context(*native_context); |
2188 return Genesis::InstallExtensions(native_context, extensions) && | 2146 return Genesis::InstallExtensions(native_context, extensions) && |
2189 Genesis::InstallSpecialObjects(native_context); | 2147 Genesis::InstallSpecialObjects(native_context); |
2190 } | 2148 } |
2191 | 2149 |
2192 | 2150 |
2193 bool Genesis::InstallSpecialObjects(Handle<Context> native_context) { | 2151 bool Genesis::InstallSpecialObjects(Handle<Context> native_context) { |
2194 Isolate* isolate = native_context->GetIsolate(); | 2152 Isolate* isolate = native_context->GetIsolate(); |
| 2153 // Don't install extensions into the snapshot. |
| 2154 if (isolate->serializer_enabled()) return true; |
| 2155 |
2195 Factory* factory = isolate->factory(); | 2156 Factory* factory = isolate->factory(); |
2196 HandleScope scope(isolate); | 2157 HandleScope scope(isolate); |
2197 Handle<JSGlobalObject> global(JSGlobalObject::cast( | 2158 Handle<JSGlobalObject> global(JSGlobalObject::cast( |
2198 native_context->global_object())); | 2159 native_context->global_object())); |
| 2160 |
| 2161 Handle<JSObject> Error = Handle<JSObject>::cast( |
| 2162 Object::GetProperty(isolate, global, "Error").ToHandleChecked()); |
| 2163 Handle<String> name = |
| 2164 factory->InternalizeOneByteString(STATIC_ASCII_VECTOR("stackTraceLimit")); |
| 2165 Handle<Smi> stack_trace_limit(Smi::FromInt(FLAG_stack_trace_limit), isolate); |
| 2166 JSObject::AddProperty(Error, name, stack_trace_limit, NONE); |
| 2167 |
2199 // Expose the natives in global if a name for it is specified. | 2168 // Expose the natives in global if a name for it is specified. |
2200 if (FLAG_expose_natives_as != NULL && strlen(FLAG_expose_natives_as) != 0) { | 2169 if (FLAG_expose_natives_as != NULL && strlen(FLAG_expose_natives_as) != 0) { |
2201 Handle<String> natives = | 2170 Handle<String> natives = |
2202 factory->InternalizeUtf8String(FLAG_expose_natives_as); | 2171 factory->InternalizeUtf8String(FLAG_expose_natives_as); |
2203 RETURN_ON_EXCEPTION_VALUE( | 2172 JSObject::AddProperty(global, natives, handle(global->builtins()), |
2204 isolate, | 2173 DONT_ENUM); |
2205 JSObject::SetOwnPropertyIgnoreAttributes( | |
2206 global, natives, Handle<JSObject>(global->builtins()), DONT_ENUM), | |
2207 false); | |
2208 } | |
2209 | |
2210 Handle<Object> Error = Object::GetProperty( | |
2211 isolate, global, "Error").ToHandleChecked(); | |
2212 if (Error->IsJSObject()) { | |
2213 Handle<String> name = factory->InternalizeOneByteString( | |
2214 STATIC_ASCII_VECTOR("stackTraceLimit")); | |
2215 Handle<Smi> stack_trace_limit( | |
2216 Smi::FromInt(FLAG_stack_trace_limit), isolate); | |
2217 RETURN_ON_EXCEPTION_VALUE( | |
2218 isolate, | |
2219 JSObject::SetOwnPropertyIgnoreAttributes( | |
2220 Handle<JSObject>::cast(Error), name, stack_trace_limit, NONE), | |
2221 false); | |
2222 } | 2174 } |
2223 | 2175 |
2224 // Expose the stack trace symbol to native JS. | 2176 // Expose the stack trace symbol to native JS. |
2225 RETURN_ON_EXCEPTION_VALUE( | 2177 RETURN_ON_EXCEPTION_VALUE( |
2226 isolate, | 2178 isolate, |
2227 JSObject::SetOwnPropertyIgnoreAttributes( | 2179 JSObject::SetOwnPropertyIgnoreAttributes( |
2228 handle(native_context->builtins(), isolate), | 2180 handle(native_context->builtins(), isolate), |
2229 factory->InternalizeOneByteString( | 2181 factory->InternalizeOneByteString( |
2230 STATIC_ASCII_VECTOR("stack_trace_symbol")), | 2182 STATIC_ASCII_VECTOR("stack_trace_symbol")), |
2231 factory->stack_trace_symbol(), | 2183 factory->stack_trace_symbol(), |
2232 NONE), | 2184 NONE), |
2233 false); | 2185 false); |
2234 | 2186 |
2235 // Expose the debug global object in global if a name for it is specified. | 2187 // Expose the debug global object in global if a name for it is specified. |
2236 if (FLAG_expose_debug_as != NULL && strlen(FLAG_expose_debug_as) != 0) { | 2188 if (FLAG_expose_debug_as != NULL && strlen(FLAG_expose_debug_as) != 0) { |
2237 // If loading fails we just bail out without installing the | 2189 // If loading fails we just bail out without installing the |
2238 // debugger but without tanking the whole context. | 2190 // debugger but without tanking the whole context. |
2239 Debug* debug = isolate->debug(); | 2191 Debug* debug = isolate->debug(); |
2240 if (!debug->Load()) return true; | 2192 if (!debug->Load()) return true; |
2241 Handle<Context> debug_context = debug->debug_context(); | 2193 Handle<Context> debug_context = debug->debug_context(); |
2242 // Set the security token for the debugger context to the same as | 2194 // Set the security token for the debugger context to the same as |
2243 // the shell native context to allow calling between these (otherwise | 2195 // the shell native context to allow calling between these (otherwise |
2244 // exposing debug global object doesn't make much sense). | 2196 // exposing debug global object doesn't make much sense). |
2245 debug_context->set_security_token(native_context->security_token()); | 2197 debug_context->set_security_token(native_context->security_token()); |
2246 Handle<String> debug_string = | 2198 Handle<String> debug_string = |
2247 factory->InternalizeUtf8String(FLAG_expose_debug_as); | 2199 factory->InternalizeUtf8String(FLAG_expose_debug_as); |
2248 Handle<Object> global_proxy(debug_context->global_proxy(), isolate); | 2200 Handle<Object> global_proxy(debug_context->global_proxy(), isolate); |
2249 RETURN_ON_EXCEPTION_VALUE( | 2201 JSObject::AddProperty(global, debug_string, global_proxy, DONT_ENUM); |
2250 isolate, | |
2251 JSObject::SetOwnPropertyIgnoreAttributes( | |
2252 global, debug_string, global_proxy, DONT_ENUM), | |
2253 false); | |
2254 } | 2202 } |
2255 return true; | 2203 return true; |
2256 } | 2204 } |
2257 | 2205 |
2258 | 2206 |
2259 static uint32_t Hash(RegisteredExtension* extension) { | 2207 static uint32_t Hash(RegisteredExtension* extension) { |
2260 return v8::internal::ComputePointerHash(extension); | 2208 return v8::internal::ComputePointerHash(extension); |
2261 } | 2209 } |
2262 | 2210 |
2263 | 2211 |
(...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2757 return from + sizeof(NestingCounterType); | 2705 return from + sizeof(NestingCounterType); |
2758 } | 2706 } |
2759 | 2707 |
2760 | 2708 |
2761 // Called when the top-level V8 mutex is destroyed. | 2709 // Called when the top-level V8 mutex is destroyed. |
2762 void Bootstrapper::FreeThreadResources() { | 2710 void Bootstrapper::FreeThreadResources() { |
2763 ASSERT(!IsActive()); | 2711 ASSERT(!IsActive()); |
2764 } | 2712 } |
2765 | 2713 |
2766 } } // namespace v8::internal | 2714 } } // namespace v8::internal |
OLD | NEW |