| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 1664 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1675 | 1675 |
| 1676 v8::Local<Value> v8::TryCatch::StackTrace() const { | 1676 v8::Local<Value> v8::TryCatch::StackTrace() const { |
| 1677 ASSERT(isolate_ == i::Isolate::Current()); | 1677 ASSERT(isolate_ == i::Isolate::Current()); |
| 1678 if (HasCaught()) { | 1678 if (HasCaught()) { |
| 1679 i::Object* raw_obj = reinterpret_cast<i::Object*>(exception_); | 1679 i::Object* raw_obj = reinterpret_cast<i::Object*>(exception_); |
| 1680 if (!raw_obj->IsJSObject()) return v8::Local<Value>(); | 1680 if (!raw_obj->IsJSObject()) return v8::Local<Value>(); |
| 1681 i::HandleScope scope(isolate_); | 1681 i::HandleScope scope(isolate_); |
| 1682 i::Handle<i::JSObject> obj(i::JSObject::cast(raw_obj), isolate_); | 1682 i::Handle<i::JSObject> obj(i::JSObject::cast(raw_obj), isolate_); |
| 1683 i::Handle<i::String> name = isolate_->factory()->LookupAsciiSymbol("stack"); | 1683 i::Handle<i::String> name = isolate_->factory()->LookupAsciiSymbol("stack"); |
| 1684 if (!obj->HasProperty(*name)) return v8::Local<Value>(); | 1684 if (!obj->HasProperty(*name)) return v8::Local<Value>(); |
| 1685 return v8::Utils::ToLocal(scope.CloseAndEscape(i::GetProperty(obj, name))); | 1685 i::Handle<i::Object> value = i::GetProperty(obj, name); |
| 1686 if (value.is_null()) return v8::Local<Value>(); |
| 1687 return v8::Utils::ToLocal(scope.CloseAndEscape(value)); |
| 1686 } else { | 1688 } else { |
| 1687 return v8::Local<Value>(); | 1689 return v8::Local<Value>(); |
| 1688 } | 1690 } |
| 1689 } | 1691 } |
| 1690 | 1692 |
| 1691 | 1693 |
| 1692 v8::Local<v8::Message> v8::TryCatch::Message() const { | 1694 v8::Local<v8::Message> v8::TryCatch::Message() const { |
| 1693 ASSERT(isolate_ == i::Isolate::Current()); | 1695 ASSERT(isolate_ == i::Isolate::Current()); |
| 1694 if (HasCaught() && message_ != i::Smi::FromInt(0)) { | 1696 if (HasCaught() && message_ != i::Smi::FromInt(0)) { |
| 1695 i::Object* message = reinterpret_cast<i::Object*>(message_); | 1697 i::Object* message = reinterpret_cast<i::Object*>(message_); |
| (...skipping 4400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6096 | 6098 |
| 6097 | 6099 |
| 6098 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { | 6100 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { |
| 6099 HandleScopeImplementer* scope_implementer = | 6101 HandleScopeImplementer* scope_implementer = |
| 6100 reinterpret_cast<HandleScopeImplementer*>(storage); | 6102 reinterpret_cast<HandleScopeImplementer*>(storage); |
| 6101 scope_implementer->IterateThis(v); | 6103 scope_implementer->IterateThis(v); |
| 6102 return storage + ArchiveSpacePerThread(); | 6104 return storage + ArchiveSpacePerThread(); |
| 6103 } | 6105 } |
| 6104 | 6106 |
| 6105 } } // namespace v8::internal | 6107 } } // namespace v8::internal |
| OLD | NEW |