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 4269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4280 } | 4280 } |
4281 return i::Handle<i::FunctionTemplateInfo>( | 4281 return i::Handle<i::FunctionTemplateInfo>( |
4282 i::FunctionTemplateInfo::cast(templ->constructor())); | 4282 i::FunctionTemplateInfo::cast(templ->constructor())); |
4283 } | 4283 } |
4284 | 4284 |
4285 | 4285 |
4286 Persistent<Context> v8::Context::New( | 4286 Persistent<Context> v8::Context::New( |
4287 v8::ExtensionConfiguration* extensions, | 4287 v8::ExtensionConfiguration* extensions, |
4288 v8::Handle<ObjectTemplate> global_template, | 4288 v8::Handle<ObjectTemplate> global_template, |
4289 v8::Handle<Value> global_object) { | 4289 v8::Handle<Value> global_object) { |
| 4290 i::Isolate::EnsureDefaultIsolate(); |
4290 i::Isolate* isolate = i::Isolate::Current(); | 4291 i::Isolate* isolate = i::Isolate::Current(); |
4291 EnsureInitializedForIsolate(isolate, "v8::Context::New()"); | 4292 EnsureInitializedForIsolate(isolate, "v8::Context::New()"); |
4292 LOG_API(isolate, "Context::New"); | 4293 LOG_API(isolate, "Context::New"); |
4293 ON_BAILOUT(isolate, "v8::Context::New()", return Persistent<Context>()); | 4294 ON_BAILOUT(isolate, "v8::Context::New()", return Persistent<Context>()); |
4294 | 4295 |
4295 // Enter V8 via an ENTER_V8 scope. | 4296 // Enter V8 via an ENTER_V8 scope. |
4296 i::Handle<i::Context> env; | 4297 i::Handle<i::Context> env; |
4297 { | 4298 { |
4298 ENTER_V8(isolate); | 4299 ENTER_V8(isolate); |
4299 v8::Handle<ObjectTemplate> proxy_template = global_template; | 4300 v8::Handle<ObjectTemplate> proxy_template = global_template; |
(...skipping 2076 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6376 | 6377 |
6377 | 6378 |
6378 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { | 6379 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { |
6379 HandleScopeImplementer* scope_implementer = | 6380 HandleScopeImplementer* scope_implementer = |
6380 reinterpret_cast<HandleScopeImplementer*>(storage); | 6381 reinterpret_cast<HandleScopeImplementer*>(storage); |
6381 scope_implementer->IterateThis(v); | 6382 scope_implementer->IterateThis(v); |
6382 return storage + ArchiveSpacePerThread(); | 6383 return storage + ArchiveSpacePerThread(); |
6383 } | 6384 } |
6384 | 6385 |
6385 } } // namespace v8::internal | 6386 } } // namespace v8::internal |
OLD | NEW |