| 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 3795 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3806 return Utils::OpenHandle(this)->IsDirty(); | 3806 return Utils::OpenHandle(this)->IsDirty(); |
| 3807 } | 3807 } |
| 3808 | 3808 |
| 3809 | 3809 |
| 3810 Local<v8::Object> v8::Object::Clone() { | 3810 Local<v8::Object> v8::Object::Clone() { |
| 3811 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); | 3811 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); |
| 3812 ON_BAILOUT(isolate, "v8::Object::Clone()", return Local<Object>()); | 3812 ON_BAILOUT(isolate, "v8::Object::Clone()", return Local<Object>()); |
| 3813 ENTER_V8(isolate); | 3813 ENTER_V8(isolate); |
| 3814 i::Handle<i::JSObject> self = Utils::OpenHandle(this); | 3814 i::Handle<i::JSObject> self = Utils::OpenHandle(this); |
| 3815 EXCEPTION_PREAMBLE(isolate); | 3815 EXCEPTION_PREAMBLE(isolate); |
| 3816 i::Handle<i::JSObject> result = i::JSObject::Copy(self); | 3816 i::Handle<i::JSObject> result = i::Copy(self); |
| 3817 has_pending_exception = result.is_null(); | 3817 has_pending_exception = result.is_null(); |
| 3818 EXCEPTION_BAILOUT_CHECK(isolate, Local<Object>()); | 3818 EXCEPTION_BAILOUT_CHECK(isolate, Local<Object>()); |
| 3819 return Utils::ToLocal(result); | 3819 return Utils::ToLocal(result); |
| 3820 } | 3820 } |
| 3821 | 3821 |
| 3822 | 3822 |
| 3823 static i::Context* GetCreationContext(i::JSObject* object) { | 3823 static i::Context* GetCreationContext(i::JSObject* object) { |
| 3824 i::Object* constructor = object->map()->constructor(); | 3824 i::Object* constructor = object->map()->constructor(); |
| 3825 i::JSFunction* function; | 3825 i::JSFunction* function; |
| 3826 if (!constructor->IsJSFunction()) { | 3826 if (!constructor->IsJSFunction()) { |
| (...skipping 2378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6205 return Local<Object>(); | 6205 return Local<Object>(); |
| 6206 } | 6206 } |
| 6207 i::FixedArray* elms = i::FixedArray::cast(self->elements()); | 6207 i::FixedArray* elms = i::FixedArray::cast(self->elements()); |
| 6208 i::Object* paragon = elms->get(index); | 6208 i::Object* paragon = elms->get(index); |
| 6209 if (!paragon->IsJSObject()) { | 6209 if (!paragon->IsJSObject()) { |
| 6210 return Local<Object>(); | 6210 return Local<Object>(); |
| 6211 } | 6211 } |
| 6212 i::Handle<i::JSObject> paragon_handle(i::JSObject::cast(paragon)); | 6212 i::Handle<i::JSObject> paragon_handle(i::JSObject::cast(paragon)); |
| 6213 EXCEPTION_PREAMBLE(isolate); | 6213 EXCEPTION_PREAMBLE(isolate); |
| 6214 ENTER_V8(isolate); | 6214 ENTER_V8(isolate); |
| 6215 i::Handle<i::JSObject> result = i::JSObject::Copy(paragon_handle); | 6215 i::Handle<i::JSObject> result = i::Copy(paragon_handle); |
| 6216 has_pending_exception = result.is_null(); | 6216 has_pending_exception = result.is_null(); |
| 6217 EXCEPTION_BAILOUT_CHECK(isolate, Local<Object>()); | 6217 EXCEPTION_BAILOUT_CHECK(isolate, Local<Object>()); |
| 6218 return Utils::ToLocal(result); | 6218 return Utils::ToLocal(result); |
| 6219 } | 6219 } |
| 6220 | 6220 |
| 6221 | 6221 |
| 6222 bool v8::ArrayBuffer::IsExternal() const { | 6222 bool v8::ArrayBuffer::IsExternal() const { |
| 6223 return Utils::OpenHandle(this)->is_external(); | 6223 return Utils::OpenHandle(this)->is_external(); |
| 6224 } | 6224 } |
| 6225 | 6225 |
| (...skipping 1638 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7864 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); | 7864 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); |
| 7865 Address callback_address = | 7865 Address callback_address = |
| 7866 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 7866 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
| 7867 VMState<EXTERNAL> state(isolate); | 7867 VMState<EXTERNAL> state(isolate); |
| 7868 ExternalCallbackScope call_scope(isolate, callback_address); | 7868 ExternalCallbackScope call_scope(isolate, callback_address); |
| 7869 callback(info); | 7869 callback(info); |
| 7870 } | 7870 } |
| 7871 | 7871 |
| 7872 | 7872 |
| 7873 } } // namespace v8::internal | 7873 } } // namespace v8::internal |
| OLD | NEW |