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 1802 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1813 } | 1813 } |
1814 | 1814 |
1815 | 1815 |
1816 v8::Local<Value> v8::TryCatch::StackTrace() const { | 1816 v8::Local<Value> v8::TryCatch::StackTrace() const { |
1817 ASSERT(isolate_ == i::Isolate::Current()); | 1817 ASSERT(isolate_ == i::Isolate::Current()); |
1818 if (HasCaught()) { | 1818 if (HasCaught()) { |
1819 i::Object* raw_obj = reinterpret_cast<i::Object*>(exception_); | 1819 i::Object* raw_obj = reinterpret_cast<i::Object*>(exception_); |
1820 if (!raw_obj->IsJSObject()) return v8::Local<Value>(); | 1820 if (!raw_obj->IsJSObject()) return v8::Local<Value>(); |
1821 i::HandleScope scope(isolate_); | 1821 i::HandleScope scope(isolate_); |
1822 i::Handle<i::JSObject> obj(i::JSObject::cast(raw_obj), isolate_); | 1822 i::Handle<i::JSObject> obj(i::JSObject::cast(raw_obj), isolate_); |
1823 i::Handle<i::String> name = isolate_->factory()->LookupAsciiSymbol("stack"); | 1823 i::Handle<i::String> name = isolate_->factory()->stack_symbol(); |
1824 if (!obj->HasProperty(*name)) return v8::Local<Value>(); | 1824 if (!obj->HasProperty(*name)) return v8::Local<Value>(); |
1825 i::Handle<i::Object> value = i::GetProperty(obj, name); | 1825 i::Handle<i::Object> value = i::GetProperty(obj, name); |
1826 if (value.is_null()) return v8::Local<Value>(); | 1826 if (value.is_null()) return v8::Local<Value>(); |
1827 return v8::Utils::ToLocal(scope.CloseAndEscape(value)); | 1827 return v8::Utils::ToLocal(scope.CloseAndEscape(value)); |
1828 } else { | 1828 } else { |
1829 return v8::Local<Value>(); | 1829 return v8::Local<Value>(); |
1830 } | 1830 } |
1831 } | 1831 } |
1832 | 1832 |
1833 | 1833 |
(...skipping 4830 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6664 | 6664 |
6665 v->VisitPointers(blocks_.first(), first_block_limit_); | 6665 v->VisitPointers(blocks_.first(), first_block_limit_); |
6666 | 6666 |
6667 for (int i = 1; i < blocks_.length(); i++) { | 6667 for (int i = 1; i < blocks_.length(); i++) { |
6668 v->VisitPointers(blocks_[i], &blocks_[i][kHandleBlockSize]); | 6668 v->VisitPointers(blocks_[i], &blocks_[i][kHandleBlockSize]); |
6669 } | 6669 } |
6670 } | 6670 } |
6671 | 6671 |
6672 | 6672 |
6673 } } // namespace v8::internal | 6673 } } // namespace v8::internal |
OLD | NEW |