Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/api.h" | 5 #include "src/api.h" |
| 6 | 6 |
| 7 #include <string.h> // For memcpy, strlen. | 7 #include <string.h> // For memcpy, strlen. |
| 8 #ifdef V8_USE_ADDRESS_SANITIZER | 8 #ifdef V8_USE_ADDRESS_SANITIZER |
| 9 #include <sanitizer/asan_interface.h> | 9 #include <sanitizer/asan_interface.h> |
| 10 #endif // V8_USE_ADDRESS_SANITIZER | 10 #endif // V8_USE_ADDRESS_SANITIZER |
| (...skipping 6795 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 6806 } | 6806 } |
| 6807 | 6807 |
| 6808 | 6808 |
| 6809 void v8::Isolate::SetStackLimit(uintptr_t stack_limit) { | 6809 void v8::Isolate::SetStackLimit(uintptr_t stack_limit) { |
| 6810 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); | 6810 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); |
| 6811 CHECK(stack_limit); | 6811 CHECK(stack_limit); |
| 6812 isolate->stack_guard()->SetStackLimit(stack_limit); | 6812 isolate->stack_guard()->SetStackLimit(stack_limit); |
| 6813 } | 6813 } |
| 6814 | 6814 |
| 6815 | 6815 |
| 6816 void v8::Isolate::GetCodeRange(void** start, size_t* length_in_bytes) { | |
| 6817 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); | |
| 6818 if (isolate->code_range() && isolate->code_range()->valid()) { | |
|
Sven Panne
2014/09/29 11:41:51
I think the first part of the conjunction will alw
jochen (gone - plz use gerrit)
2014/09/29 11:43:17
no, we only create a code range on 64bit
Sven Panne
2014/09/29 11:48:25
I think we *always* create a CodeRange, but it's o
| |
| 6819 *start = isolate->code_range()->start(); | |
| 6820 *length_in_bytes = isolate->code_range()->size(); | |
| 6821 } else { | |
| 6822 *start = NULL; | |
| 6823 *length_in_bytes = 0; | |
| 6824 } | |
| 6825 } | |
| 6826 | |
| 6827 | |
| 6816 String::Utf8Value::Utf8Value(v8::Handle<v8::Value> obj) | 6828 String::Utf8Value::Utf8Value(v8::Handle<v8::Value> obj) |
| 6817 : str_(NULL), length_(0) { | 6829 : str_(NULL), length_(0) { |
| 6818 i::Isolate* isolate = i::Isolate::Current(); | 6830 i::Isolate* isolate = i::Isolate::Current(); |
| 6819 if (obj.IsEmpty()) return; | 6831 if (obj.IsEmpty()) return; |
| 6820 ENTER_V8(isolate); | 6832 ENTER_V8(isolate); |
| 6821 i::HandleScope scope(isolate); | 6833 i::HandleScope scope(isolate); |
| 6822 TryCatch try_catch; | 6834 TryCatch try_catch; |
| 6823 Handle<String> str = obj->ToString(); | 6835 Handle<String> str = obj->ToString(); |
| 6824 if (str.IsEmpty()) return; | 6836 if (str.IsEmpty()) return; |
| 6825 i::Handle<i::String> i_str = Utils::OpenHandle(*str); | 6837 i::Handle<i::String> i_str = Utils::OpenHandle(*str); |
| (...skipping 830 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 7656 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); | 7668 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); |
| 7657 Address callback_address = | 7669 Address callback_address = |
| 7658 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 7670 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
| 7659 VMState<EXTERNAL> state(isolate); | 7671 VMState<EXTERNAL> state(isolate); |
| 7660 ExternalCallbackScope call_scope(isolate, callback_address); | 7672 ExternalCallbackScope call_scope(isolate, callback_address); |
| 7661 callback(info); | 7673 callback(info); |
| 7662 } | 7674 } |
| 7663 | 7675 |
| 7664 | 7676 |
| 7665 } } // namespace v8::internal | 7677 } } // namespace v8::internal |
| OLD | NEW |