Since the x64 backend currently doesn't emit ABI compliant code, it is
not possible to unwind the stack. During Win64 SEH this will cause the
exception handling to abort, and not even call the unhandled exception
handler. Embedders are advised to install a custom unwind callback using
RtlInstallFunctionTableCallback for the entire code range to catch
unwind attempts for exception handling.
BUG=v8:3598
R=svenpanne@chromium.org
LOG=y
Review URL: https://codereview.chromium.org/
612043002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24283
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
*/
void SetStackLimit(uintptr_t stack_limit);
+ /**
+ * Returns a memory range that can potentially contain jitted code.
+ *
+ * On Win64, embedders are advised to install function table callbacks for
+ * these ranges, as default SEH won't be able to unwind through jitted code.
+ *
+ * Might be empty on other platforms.
+ *
+ * https://code.google.com/p/v8/issues/detail?id=3598
+ */
+ void GetCodeRange(void** start, size_t* length_in_bytes);
+
private:
template<class K, class V, class Traits> friend class PersistentValueMap;
}
+void v8::Isolate::GetCodeRange(void** start, size_t* length_in_bytes) {
+ i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
+ if (isolate->code_range()->valid()) {
+ *start = isolate->code_range()->start();
+ *length_in_bytes = isolate->code_range()->size();
+ } else {
+ *start = NULL;
+ *length_in_bytes = 0;
+ }
+}
+
+
String::Utf8Value::Utf8Value(v8::Handle<v8::Value> obj)
: str_(NULL), length_(0) {
i::Isolate* isolate = i::Isolate::Current();
DCHECK(valid());
return static_cast<Address>(code_range_->address());
}
+ size_t size() {
+ DCHECK(valid());
+ return code_range_->size();
+ }
bool contains(Address address) {
if (!valid()) return false;
Address start = static_cast<Address>(code_range_->address());