| 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 4152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4163 Utils::OpenHandle(this)->SetInternalField(index, *foreign); | 4163 Utils::OpenHandle(this)->SetInternalField(index, *foreign); |
| 4164 } | 4164 } |
| 4165 ASSERT_EQ(value, GetPointerFromInternalField(index)); | 4165 ASSERT_EQ(value, GetPointerFromInternalField(index)); |
| 4166 } | 4166 } |
| 4167 | 4167 |
| 4168 | 4168 |
| 4169 // --- E n v i r o n m e n t --- | 4169 // --- E n v i r o n m e n t --- |
| 4170 | 4170 |
| 4171 | 4171 |
| 4172 bool v8::V8::Initialize() { | 4172 bool v8::V8::Initialize() { |
| 4173 i::Isolate::EnsureDefaultIsolate(); |
| 4173 i::Isolate* isolate = i::Isolate::Current(); | 4174 i::Isolate* isolate = i::Isolate::Current(); |
| 4174 if (isolate != NULL && isolate->IsInitialized()) { | 4175 if (isolate != NULL && isolate->IsInitialized()) { |
| 4175 return true; | 4176 return true; |
| 4176 } | 4177 } |
| 4177 return InitializeHelper(); | 4178 return InitializeHelper(); |
| 4178 } | 4179 } |
| 4179 | 4180 |
| 4180 | 4181 |
| 4181 void v8::V8::SetEntropySource(EntropySource source) { | 4182 void v8::V8::SetEntropySource(EntropySource source) { |
| 4182 i::V8::SetEntropySource(source); | 4183 i::V8::SetEntropySource(source); |
| 4183 } | 4184 } |
| 4184 | 4185 |
| 4185 | 4186 |
| 4186 void v8::V8::SetReturnAddressLocationResolver( | 4187 void v8::V8::SetReturnAddressLocationResolver( |
| 4187 ReturnAddressLocationResolver return_address_resolver) { | 4188 ReturnAddressLocationResolver return_address_resolver) { |
| 4188 i::V8::SetReturnAddressLocationResolver(return_address_resolver); | 4189 i::V8::SetReturnAddressLocationResolver(return_address_resolver); |
| 4189 } | 4190 } |
| 4190 | 4191 |
| 4191 | 4192 |
| 4192 bool v8::V8::Dispose() { | 4193 bool v8::V8::Dispose() { |
| 4194 i::Isolate::EnsureDefaultIsolate(); |
| 4193 i::Isolate* isolate = i::Isolate::Current(); | 4195 i::Isolate* isolate = i::Isolate::Current(); |
| 4194 if (!ApiCheck(isolate != NULL && isolate->IsDefaultIsolate(), | 4196 if (!ApiCheck(isolate != NULL && isolate->IsDefaultIsolate(), |
| 4195 "v8::V8::Dispose()", | 4197 "v8::V8::Dispose()", |
| 4196 "Use v8::Isolate::Dispose() for a non-default isolate.")) { | 4198 "Use v8::Isolate::Dispose() for a non-default isolate.")) { |
| 4197 return false; | 4199 return false; |
| 4198 } | 4200 } |
| 4199 i::V8::TearDown(); | 4201 i::V8::TearDown(); |
| 4200 return true; | 4202 return true; |
| 4201 } | 4203 } |
| 4202 | 4204 |
| (...skipping 2163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6366 | 6368 |
| 6367 | 6369 |
| 6368 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { | 6370 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { |
| 6369 HandleScopeImplementer* scope_implementer = | 6371 HandleScopeImplementer* scope_implementer = |
| 6370 reinterpret_cast<HandleScopeImplementer*>(storage); | 6372 reinterpret_cast<HandleScopeImplementer*>(storage); |
| 6371 scope_implementer->IterateThis(v); | 6373 scope_implementer->IterateThis(v); |
| 6372 return storage + ArchiveSpacePerThread(); | 6374 return storage + ArchiveSpacePerThread(); |
| 6373 } | 6375 } |
| 6374 | 6376 |
| 6375 } } // namespace v8::internal | 6377 } } // namespace v8::internal |
| OLD | NEW |