Chromium Code Reviews| 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 2694 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2705 ENTER_V8(isolate); | 2705 ENTER_V8(isolate); |
| 2706 i::Handle<i::JSObject> self = Utils::OpenHandle(this); | 2706 i::Handle<i::JSObject> self = Utils::OpenHandle(this); |
| 2707 EXCEPTION_PREAMBLE(isolate); | 2707 EXCEPTION_PREAMBLE(isolate); |
| 2708 i::Handle<i::Object> result = i::GetElement(self, index); | 2708 i::Handle<i::Object> result = i::GetElement(self, index); |
| 2709 has_pending_exception = result.is_null(); | 2709 has_pending_exception = result.is_null(); |
| 2710 EXCEPTION_BAILOUT_CHECK(isolate, Local<Value>()); | 2710 EXCEPTION_BAILOUT_CHECK(isolate, Local<Value>()); |
| 2711 return Utils::ToLocal(result); | 2711 return Utils::ToLocal(result); |
| 2712 } | 2712 } |
| 2713 | 2713 |
| 2714 | 2714 |
| 2715 PropertyAttribute v8::Object::GetPropertyAttribute(v8::Handle<Value> key) { | |
| 2716 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); | |
| 2717 ON_BAILOUT(isolate, "v8::Object::GetPropertyAttribute()", | |
| 2718 return static_cast<PropertyAttribute>(NONE)); | |
| 2719 ENTER_V8(isolate); | |
| 2720 i::Handle<i::JSObject> self = Utils::OpenHandle(this); | |
| 2721 i::Handle<i::Object> key_obj = Utils::OpenHandle(*key); | |
| 2722 EXCEPTION_PREAMBLE(isolate); | |
| 2723 i::Handle<i::String> name = i::Handle<i::String>::cast(key_obj); | |
|
Mads Ager (chromium)
2011/07/12 07:51:30
This will not work if you pass in some other objec
| |
| 2724 PropertyAttributes result = self->GetPropertyAttribute(*name); | |
| 2725 has_pending_exception = (result == ABSENT); | |
|
Mads Ager (chromium)
2011/07/12 07:51:30
Let's not misuse has_pending_exception for this. J
| |
| 2726 EXCEPTION_BAILOUT_CHECK(isolate, static_cast<PropertyAttribute>(NONE)); | |
| 2727 return static_cast<PropertyAttribute>(result); | |
| 2728 } | |
| 2729 | |
| 2730 | |
| 2715 Local<Value> v8::Object::GetPrototype() { | 2731 Local<Value> v8::Object::GetPrototype() { |
| 2716 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); | 2732 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); |
| 2717 ON_BAILOUT(isolate, "v8::Object::GetPrototype()", | 2733 ON_BAILOUT(isolate, "v8::Object::GetPrototype()", |
| 2718 return Local<v8::Value>()); | 2734 return Local<v8::Value>()); |
| 2719 ENTER_V8(isolate); | 2735 ENTER_V8(isolate); |
| 2720 i::Handle<i::Object> self = Utils::OpenHandle(this); | 2736 i::Handle<i::Object> self = Utils::OpenHandle(this); |
| 2721 i::Handle<i::Object> result = i::GetPrototype(self); | 2737 i::Handle<i::Object> result = i::GetPrototype(self); |
| 2722 return Utils::ToLocal(result); | 2738 return Utils::ToLocal(result); |
| 2723 } | 2739 } |
| 2724 | 2740 |
| (...skipping 3373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 6098 | 6114 |
| 6099 | 6115 |
| 6100 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { | 6116 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { |
| 6101 HandleScopeImplementer* scope_implementer = | 6117 HandleScopeImplementer* scope_implementer = |
| 6102 reinterpret_cast<HandleScopeImplementer*>(storage); | 6118 reinterpret_cast<HandleScopeImplementer*>(storage); |
| 6103 scope_implementer->IterateThis(v); | 6119 scope_implementer->IterateThis(v); |
| 6104 return storage + ArchiveSpacePerThread(); | 6120 return storage + ArchiveSpacePerThread(); |
| 6105 } | 6121 } |
| 6106 | 6122 |
| 6107 } } // namespace v8::internal | 6123 } } // namespace v8::internal |
| OLD | NEW |