OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 1320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1331 } | 1331 } |
1332 Vector<const char> source = CStrVector(extension->source()); | 1332 Vector<const char> source = CStrVector(extension->source()); |
1333 Handle<String> source_code = Factory::NewStringFromAscii(source); | 1333 Handle<String> source_code = Factory::NewStringFromAscii(source); |
1334 bool result = CompileScriptCached(CStrVector(extension->name()), | 1334 bool result = CompileScriptCached(CStrVector(extension->name()), |
1335 source_code, | 1335 source_code, |
1336 &extensions_cache, extension, | 1336 &extensions_cache, extension, |
1337 false); | 1337 false); |
1338 ASSERT(Top::has_pending_exception() != result); | 1338 ASSERT(Top::has_pending_exception() != result); |
1339 if (!result) { | 1339 if (!result) { |
1340 Top::clear_pending_exception(); | 1340 Top::clear_pending_exception(); |
1341 v8::Utils::ReportApiFailure( | |
1342 "v8::Context::New()", "Error installing extension"); | |
1343 } | 1341 } |
1344 current->set_state(v8::INSTALLED); | 1342 current->set_state(v8::INSTALLED); |
1345 return result; | 1343 return result; |
1346 } | 1344 } |
1347 | 1345 |
1348 | 1346 |
1349 bool Genesis::ConfigureGlobalObjects( | 1347 bool Genesis::ConfigureGlobalObjects( |
1350 v8::Handle<v8::ObjectTemplate> global_proxy_template) { | 1348 v8::Handle<v8::ObjectTemplate> global_proxy_template) { |
1351 Handle<JSObject> global_proxy( | 1349 Handle<JSObject> global_proxy( |
1352 JSObject::cast(global_context()->global_proxy())); | 1350 JSObject::cast(global_context()->global_proxy())); |
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1638 } | 1636 } |
1639 | 1637 |
1640 | 1638 |
1641 // Restore statics that are thread local. | 1639 // Restore statics that are thread local. |
1642 char* Genesis::RestoreState(char* from) { | 1640 char* Genesis::RestoreState(char* from) { |
1643 current_ = *reinterpret_cast<Genesis**>(from); | 1641 current_ = *reinterpret_cast<Genesis**>(from); |
1644 return from + sizeof(current_); | 1642 return from + sizeof(current_); |
1645 } | 1643 } |
1646 | 1644 |
1647 } } // namespace v8::internal | 1645 } } // namespace v8::internal |
OLD | NEW |