OLD | NEW |
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 1661 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1672 HandleScope scope; | 1672 HandleScope scope; |
1673 i::Handle<i::JSObject> self = Utils::OpenHandle(this); | 1673 i::Handle<i::JSObject> self = Utils::OpenHandle(this); |
1674 i::Handle<i::Object> name = GetProperty(self, "scriptName"); | 1674 i::Handle<i::Object> name = GetProperty(self, "scriptName"); |
1675 if (!name->IsString()) { | 1675 if (!name->IsString()) { |
1676 return Local<String>(); | 1676 return Local<String>(); |
1677 } | 1677 } |
1678 return scope.Close(Local<String>::Cast(Utils::ToLocal(name))); | 1678 return scope.Close(Local<String>::Cast(Utils::ToLocal(name))); |
1679 } | 1679 } |
1680 | 1680 |
1681 | 1681 |
| 1682 Local<String> StackFrame::GetScriptNameOrSourceURL() const { |
| 1683 if (IsDeadCheck("v8::StackFrame::GetScriptNameOrSourceURL()")) { |
| 1684 return Local<String>(); |
| 1685 } |
| 1686 ENTER_V8; |
| 1687 HandleScope scope; |
| 1688 i::Handle<i::JSObject> self = Utils::OpenHandle(this); |
| 1689 i::Handle<i::Object> name = GetProperty(self, "scriptNameOrSourceURL"); |
| 1690 if (!name->IsString()) { |
| 1691 return Local<String>(); |
| 1692 } |
| 1693 return scope.Close(Local<String>::Cast(Utils::ToLocal(name))); |
| 1694 } |
| 1695 |
| 1696 |
1682 Local<String> StackFrame::GetFunctionName() const { | 1697 Local<String> StackFrame::GetFunctionName() const { |
1683 if (IsDeadCheck("v8::StackFrame::GetFunctionName()")) return Local<String>(); | 1698 if (IsDeadCheck("v8::StackFrame::GetFunctionName()")) return Local<String>(); |
1684 ENTER_V8; | 1699 ENTER_V8; |
1685 HandleScope scope; | 1700 HandleScope scope; |
1686 i::Handle<i::JSObject> self = Utils::OpenHandle(this); | 1701 i::Handle<i::JSObject> self = Utils::OpenHandle(this); |
1687 i::Handle<i::Object> name = GetProperty(self, "functionName"); | 1702 i::Handle<i::Object> name = GetProperty(self, "functionName"); |
1688 if (!name->IsString()) { | 1703 if (!name->IsString()) { |
1689 return Local<String>(); | 1704 return Local<String>(); |
1690 } | 1705 } |
1691 return scope.Close(Local<String>::Cast(Utils::ToLocal(name))); | 1706 return scope.Close(Local<String>::Cast(Utils::ToLocal(name))); |
(...skipping 3267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4959 | 4974 |
4960 | 4975 |
4961 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { | 4976 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { |
4962 HandleScopeImplementer* thread_local = | 4977 HandleScopeImplementer* thread_local = |
4963 reinterpret_cast<HandleScopeImplementer*>(storage); | 4978 reinterpret_cast<HandleScopeImplementer*>(storage); |
4964 thread_local->IterateThis(v); | 4979 thread_local->IterateThis(v); |
4965 return storage + ArchiveSpacePerThread(); | 4980 return storage + ArchiveSpacePerThread(); |
4966 } | 4981 } |
4967 | 4982 |
4968 } } // namespace v8::internal | 4983 } } // namespace v8::internal |
OLD | NEW |