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 4977 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4988 ArrayBuffer::Allocator* allocator) { | 4988 ArrayBuffer::Allocator* allocator) { |
4989 if (!Utils::ApiCheck(i::V8::ArrayBufferAllocator() == NULL, | 4989 if (!Utils::ApiCheck(i::V8::ArrayBufferAllocator() == NULL, |
4990 "v8::V8::SetArrayBufferAllocator", | 4990 "v8::V8::SetArrayBufferAllocator", |
4991 "ArrayBufferAllocator might only be set once")) | 4991 "ArrayBufferAllocator might only be set once")) |
4992 return; | 4992 return; |
4993 i::V8::SetArrayBufferAllocator(allocator); | 4993 i::V8::SetArrayBufferAllocator(allocator); |
4994 } | 4994 } |
4995 | 4995 |
4996 | 4996 |
4997 bool v8::V8::Dispose() { | 4997 bool v8::V8::Dispose() { |
4998 i::Isolate* isolate = i::Isolate::Current(); | |
4999 if (!Utils::ApiCheck(isolate != NULL && isolate->IsDefaultIsolate(), | |
5000 "v8::V8::Dispose()", | |
5001 "Use v8::Isolate::Dispose() for non-default isolate.")) { | |
5002 return false; | |
5003 } | |
5004 i::V8::TearDown(); | 4998 i::V8::TearDown(); |
5005 return true; | 4999 return true; |
5006 } | 5000 } |
5007 | 5001 |
5008 | 5002 |
5009 HeapStatistics::HeapStatistics(): total_heap_size_(0), | 5003 HeapStatistics::HeapStatistics(): total_heap_size_(0), |
5010 total_heap_size_executable_(0), | 5004 total_heap_size_executable_(0), |
5011 total_physical_size_(0), | 5005 total_physical_size_(0), |
5012 used_heap_size_(0), | 5006 used_heap_size_(0), |
5013 heap_size_limit_(0) { } | 5007 heap_size_limit_(0) { } |
(...skipping 2599 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7613 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); | 7607 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); |
7614 Address callback_address = | 7608 Address callback_address = |
7615 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 7609 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
7616 VMState<EXTERNAL> state(isolate); | 7610 VMState<EXTERNAL> state(isolate); |
7617 ExternalCallbackScope call_scope(isolate, callback_address); | 7611 ExternalCallbackScope call_scope(isolate, callback_address); |
7618 callback(info); | 7612 callback(info); |
7619 } | 7613 } |
7620 | 7614 |
7621 | 7615 |
7622 } } // namespace v8::internal | 7616 } } // namespace v8::internal |
OLD | NEW |