| 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 1833 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1844 } | 1844 } |
| 1845 | 1845 |
| 1846 | 1846 |
| 1847 v8::Local<Value> v8::TryCatch::StackTrace() const { | 1847 v8::Local<Value> v8::TryCatch::StackTrace() const { |
| 1848 ASSERT(isolate_ == i::Isolate::Current()); | 1848 ASSERT(isolate_ == i::Isolate::Current()); |
| 1849 if (HasCaught()) { | 1849 if (HasCaught()) { |
| 1850 i::Object* raw_obj = reinterpret_cast<i::Object*>(exception_); | 1850 i::Object* raw_obj = reinterpret_cast<i::Object*>(exception_); |
| 1851 if (!raw_obj->IsJSObject()) return v8::Local<Value>(); | 1851 if (!raw_obj->IsJSObject()) return v8::Local<Value>(); |
| 1852 i::HandleScope scope(isolate_); | 1852 i::HandleScope scope(isolate_); |
| 1853 i::Handle<i::JSObject> obj(i::JSObject::cast(raw_obj), isolate_); | 1853 i::Handle<i::JSObject> obj(i::JSObject::cast(raw_obj), isolate_); |
| 1854 i::Handle<i::String> name = isolate_->factory()->stack_symbol(); | 1854 i::Handle<i::String> name = |
| 1855 isolate_->factory()->LookupOneByteSymbol(STATIC_ASCII_VECTOR("stack")); |
| 1855 if (!obj->HasProperty(*name)) return v8::Local<Value>(); | 1856 if (!obj->HasProperty(*name)) return v8::Local<Value>(); |
| 1856 i::Handle<i::Object> value = i::GetProperty(obj, name); | 1857 i::Handle<i::Object> value = i::GetProperty(obj, name); |
| 1857 if (value.is_null()) return v8::Local<Value>(); | 1858 if (value.is_null()) return v8::Local<Value>(); |
| 1858 return v8::Utils::ToLocal(scope.CloseAndEscape(value)); | 1859 return v8::Utils::ToLocal(scope.CloseAndEscape(value)); |
| 1859 } else { | 1860 } else { |
| 1860 return v8::Local<Value>(); | 1861 return v8::Local<Value>(); |
| 1861 } | 1862 } |
| 1862 } | 1863 } |
| 1863 | 1864 |
| 1864 | 1865 |
| (...skipping 4848 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6713 | 6714 |
| 6714 v->VisitPointers(blocks_.first(), first_block_limit_); | 6715 v->VisitPointers(blocks_.first(), first_block_limit_); |
| 6715 | 6716 |
| 6716 for (int i = 1; i < blocks_.length(); i++) { | 6717 for (int i = 1; i < blocks_.length(); i++) { |
| 6717 v->VisitPointers(blocks_[i], &blocks_[i][kHandleBlockSize]); | 6718 v->VisitPointers(blocks_[i], &blocks_[i][kHandleBlockSize]); |
| 6718 } | 6719 } |
| 6719 } | 6720 } |
| 6720 | 6721 |
| 6721 | 6722 |
| 6722 } } // namespace v8::internal | 6723 } } // namespace v8::internal |
| OLD | NEW |