| 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 1284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1295 } | 1295 } |
| 1296 Vector<const char> source = CStrVector(extension->source()); | 1296 Vector<const char> source = CStrVector(extension->source()); |
| 1297 Handle<String> source_code = Factory::NewStringFromAscii(source); | 1297 Handle<String> source_code = Factory::NewStringFromAscii(source); |
| 1298 bool result = CompileScriptCached(CStrVector(extension->name()), | 1298 bool result = CompileScriptCached(CStrVector(extension->name()), |
| 1299 source_code, | 1299 source_code, |
| 1300 &extensions_cache, extension, | 1300 &extensions_cache, extension, |
| 1301 false); | 1301 false); |
| 1302 ASSERT(Top::has_pending_exception() != result); | 1302 ASSERT(Top::has_pending_exception() != result); |
| 1303 if (!result) { | 1303 if (!result) { |
| 1304 Top::clear_pending_exception(); | 1304 Top::clear_pending_exception(); |
| 1305 v8::Utils::ReportApiFailure( | |
| 1306 "v8::Context::New()", "Error installing extension"); | |
| 1307 } | 1305 } |
| 1308 current->set_state(v8::INSTALLED); | 1306 current->set_state(v8::INSTALLED); |
| 1309 return result; | 1307 return result; |
| 1310 } | 1308 } |
| 1311 | 1309 |
| 1312 | 1310 |
| 1313 bool Genesis::ConfigureGlobalObjects( | 1311 bool Genesis::ConfigureGlobalObjects( |
| 1314 v8::Handle<v8::ObjectTemplate> global_proxy_template) { | 1312 v8::Handle<v8::ObjectTemplate> global_proxy_template) { |
| 1315 Handle<JSObject> global_proxy( | 1313 Handle<JSObject> global_proxy( |
| 1316 JSObject::cast(global_context()->global_proxy())); | 1314 JSObject::cast(global_context()->global_proxy())); |
| (...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1602 } | 1600 } |
| 1603 | 1601 |
| 1604 | 1602 |
| 1605 // Restore statics that are thread local. | 1603 // Restore statics that are thread local. |
| 1606 char* Genesis::RestoreState(char* from) { | 1604 char* Genesis::RestoreState(char* from) { |
| 1607 current_ = *reinterpret_cast<Genesis**>(from); | 1605 current_ = *reinterpret_cast<Genesis**>(from); |
| 1608 return from + sizeof(current_); | 1606 return from + sizeof(current_); |
| 1609 } | 1607 } |
| 1610 | 1608 |
| 1611 } } // namespace v8::internal | 1609 } } // namespace v8::internal |
| OLD | NEW |