OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 1922 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1933 return false; | 1933 return false; |
1934 } | 1934 } |
1935 ASSERT(current->state() == v8::UNVISITED); | 1935 ASSERT(current->state() == v8::UNVISITED); |
1936 current->set_state(v8::VISITED); | 1936 current->set_state(v8::VISITED); |
1937 v8::Extension* extension = current->extension(); | 1937 v8::Extension* extension = current->extension(); |
1938 // Install the extension's dependencies | 1938 // Install the extension's dependencies |
1939 for (int i = 0; i < extension->dependency_count(); i++) { | 1939 for (int i = 0; i < extension->dependency_count(); i++) { |
1940 if (!InstallExtension(extension->dependencies()[i])) return false; | 1940 if (!InstallExtension(extension->dependencies()[i])) return false; |
1941 } | 1941 } |
1942 Isolate* isolate = Isolate::Current(); | 1942 Isolate* isolate = Isolate::Current(); |
| 1943 Handle<String> source_code = |
| 1944 isolate->factory()->NewExternalStringFromAscii(extension->source()); |
1943 bool result = CompileScriptCached( | 1945 bool result = CompileScriptCached( |
1944 CStrVector(extension->name()), | 1946 CStrVector(extension->name()), |
1945 isolate->factory()->NewExternalStringFromAscii(extension->source()), | 1947 source_code, |
1946 isolate->bootstrapper()->extensions_cache(), | 1948 isolate->bootstrapper()->extensions_cache(), |
1947 extension, | 1949 extension, |
1948 Handle<Context>(isolate->context()), | 1950 Handle<Context>(isolate->context()), |
1949 false); | 1951 false); |
1950 ASSERT(isolate->has_pending_exception() != result); | 1952 ASSERT(isolate->has_pending_exception() != result); |
1951 if (!result) { | 1953 if (!result) { |
1952 isolate->clear_pending_exception(); | 1954 isolate->clear_pending_exception(); |
1953 } | 1955 } |
1954 current->set_state(v8::INSTALLED); | 1956 current->set_state(v8::INSTALLED); |
1955 return result; | 1957 return result; |
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2226 return from + sizeof(NestingCounterType); | 2228 return from + sizeof(NestingCounterType); |
2227 } | 2229 } |
2228 | 2230 |
2229 | 2231 |
2230 // Called when the top-level V8 mutex is destroyed. | 2232 // Called when the top-level V8 mutex is destroyed. |
2231 void Bootstrapper::FreeThreadResources() { | 2233 void Bootstrapper::FreeThreadResources() { |
2232 ASSERT(!IsActive()); | 2234 ASSERT(!IsActive()); |
2233 } | 2235 } |
2234 | 2236 |
2235 } } // namespace v8::internal | 2237 } } // namespace v8::internal |
OLD | NEW |