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 1824 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1835 } | 1835 } |
1836 | 1836 |
1837 | 1837 |
1838 v8::Local<Value> v8::TryCatch::StackTrace() const { | 1838 v8::Local<Value> v8::TryCatch::StackTrace() const { |
1839 ASSERT(isolate_ == i::Isolate::Current()); | 1839 ASSERT(isolate_ == i::Isolate::Current()); |
1840 if (HasCaught()) { | 1840 if (HasCaught()) { |
1841 i::Object* raw_obj = reinterpret_cast<i::Object*>(exception_); | 1841 i::Object* raw_obj = reinterpret_cast<i::Object*>(exception_); |
1842 if (!raw_obj->IsJSObject()) return v8::Local<Value>(); | 1842 if (!raw_obj->IsJSObject()) return v8::Local<Value>(); |
1843 i::HandleScope scope(isolate_); | 1843 i::HandleScope scope(isolate_); |
1844 i::Handle<i::JSObject> obj(i::JSObject::cast(raw_obj), isolate_); | 1844 i::Handle<i::JSObject> obj(i::JSObject::cast(raw_obj), isolate_); |
1845 i::Handle<i::String> name = isolate_->factory()->LookupAsciiSymbol("stack"); | 1845 i::Handle<i::String> name = isolate_->factory()->stack_symbol(); |
1846 if (!obj->HasProperty(*name)) return v8::Local<Value>(); | 1846 if (!obj->HasProperty(*name)) return v8::Local<Value>(); |
1847 i::Handle<i::Object> value = i::GetProperty(obj, name); | 1847 i::Handle<i::Object> value = i::GetProperty(obj, name); |
1848 if (value.is_null()) return v8::Local<Value>(); | 1848 if (value.is_null()) return v8::Local<Value>(); |
1849 return v8::Utils::ToLocal(scope.CloseAndEscape(value)); | 1849 return v8::Utils::ToLocal(scope.CloseAndEscape(value)); |
1850 } else { | 1850 } else { |
1851 return v8::Local<Value>(); | 1851 return v8::Local<Value>(); |
1852 } | 1852 } |
1853 } | 1853 } |
1854 | 1854 |
1855 | 1855 |
(...skipping 4848 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6704 | 6704 |
6705 v->VisitPointers(blocks_.first(), first_block_limit_); | 6705 v->VisitPointers(blocks_.first(), first_block_limit_); |
6706 | 6706 |
6707 for (int i = 1; i < blocks_.length(); i++) { | 6707 for (int i = 1; i < blocks_.length(); i++) { |
6708 v->VisitPointers(blocks_[i], &blocks_[i][kHandleBlockSize]); | 6708 v->VisitPointers(blocks_[i], &blocks_[i][kHandleBlockSize]); |
6709 } | 6709 } |
6710 } | 6710 } |
6711 | 6711 |
6712 | 6712 |
6713 } } // namespace v8::internal | 6713 } } // namespace v8::internal |
OLD | NEW |