| OLD | NEW | 
|---|
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. | 
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without | 
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are | 
| 4 // met: | 4 // met: | 
| 5 // | 5 // | 
| 6 //     * Redistributions of source code must retain the above copyright | 6 //     * Redistributions of source code must retain the above copyright | 
| 7 //       notice, this list of conditions and the following disclaimer. | 7 //       notice, this list of conditions and the following disclaimer. | 
| 8 //     * Redistributions in binary form must reproduce the above | 8 //     * Redistributions in binary form must reproduce the above | 
| 9 //       copyright notice, this list of conditions and the following | 9 //       copyright notice, this list of conditions and the following | 
| 10 //       disclaimer in the documentation and/or other materials provided | 10 //       disclaimer in the documentation and/or other materials provided | 
| (...skipping 2250 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 2261   if (FLAG_expose_externalize_string) { | 2261   if (FLAG_expose_externalize_string) { | 
| 2262     InstallExtension(isolate, "v8/externalize", &extension_states); | 2262     InstallExtension(isolate, "v8/externalize", &extension_states); | 
| 2263   } | 2263   } | 
| 2264   if (FLAG_track_gc_object_stats) { | 2264   if (FLAG_track_gc_object_stats) { | 
| 2265     InstallExtension(isolate, "v8/statistics", &extension_states); | 2265     InstallExtension(isolate, "v8/statistics", &extension_states); | 
| 2266   } | 2266   } | 
| 2267   if (FLAG_expose_trigger_failure) { | 2267   if (FLAG_expose_trigger_failure) { | 
| 2268     InstallExtension(isolate, "v8/trigger-failure", &extension_states); | 2268     InstallExtension(isolate, "v8/trigger-failure", &extension_states); | 
| 2269   } | 2269   } | 
| 2270 | 2270 | 
| 2271   if (extensions == NULL) return true; | 2271   for (const char** it = extensions->begin(); it != extensions->end(); ++it) { | 
| 2272   // Install required extensions | 2272     if (!InstallExtension(isolate, *it, &extension_states)) return false; | 
| 2273   int count = v8::ImplementationUtilities::GetNameCount(extensions); |  | 
| 2274   const char** names = v8::ImplementationUtilities::GetNames(extensions); |  | 
| 2275   for (int i = 0; i < count; i++) { |  | 
| 2276     if (!InstallExtension(isolate, names[i], &extension_states)) |  | 
| 2277       return false; |  | 
| 2278   } | 2273   } | 
| 2279 | 2274 | 
| 2280   return true; | 2275   return true; | 
| 2281 } | 2276 } | 
| 2282 | 2277 | 
| 2283 | 2278 | 
| 2284 // Installs a named extension.  This methods is unoptimized and does | 2279 // Installs a named extension.  This methods is unoptimized and does | 
| 2285 // not scale well if we want to support a large number of extensions. | 2280 // not scale well if we want to support a large number of extensions. | 
| 2286 bool Genesis::InstallExtension(Isolate* isolate, | 2281 bool Genesis::InstallExtension(Isolate* isolate, | 
| 2287                                const char* name, | 2282                                const char* name, | 
| (...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 2704   return from + sizeof(NestingCounterType); | 2699   return from + sizeof(NestingCounterType); | 
| 2705 } | 2700 } | 
| 2706 | 2701 | 
| 2707 | 2702 | 
| 2708 // Called when the top-level V8 mutex is destroyed. | 2703 // Called when the top-level V8 mutex is destroyed. | 
| 2709 void Bootstrapper::FreeThreadResources() { | 2704 void Bootstrapper::FreeThreadResources() { | 
| 2710   ASSERT(!IsActive()); | 2705   ASSERT(!IsActive()); | 
| 2711 } | 2706 } | 
| 2712 | 2707 | 
| 2713 } }  // namespace v8::internal | 2708 } }  // namespace v8::internal | 
| OLD | NEW | 
|---|