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 3005 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3016 i::Handle<i::Object> self = Utils::OpenHandle(this); | 3016 i::Handle<i::Object> self = Utils::OpenHandle(this); |
3017 i::Handle<i::Object> key_obj = Utils::OpenHandle(*key); | 3017 i::Handle<i::Object> key_obj = Utils::OpenHandle(*key); |
3018 i::Handle<i::Object> value_obj = Utils::OpenHandle(*value); | 3018 i::Handle<i::Object> value_obj = Utils::OpenHandle(*value); |
3019 EXCEPTION_PREAMBLE(isolate); | 3019 EXCEPTION_PREAMBLE(isolate); |
3020 i::Handle<i::Object> obj = i::Runtime::SetObjectProperty( | 3020 i::Handle<i::Object> obj = i::Runtime::SetObjectProperty( |
3021 isolate, | 3021 isolate, |
3022 self, | 3022 self, |
3023 key_obj, | 3023 key_obj, |
3024 value_obj, | 3024 value_obj, |
3025 static_cast<PropertyAttributes>(attribs), | 3025 static_cast<PropertyAttributes>(attribs), |
3026 i::kSloppyMode); | 3026 i::SLOPPY); |
3027 has_pending_exception = obj.is_null(); | 3027 has_pending_exception = obj.is_null(); |
3028 EXCEPTION_BAILOUT_CHECK(isolate, false); | 3028 EXCEPTION_BAILOUT_CHECK(isolate, false); |
3029 return true; | 3029 return true; |
3030 } | 3030 } |
3031 | 3031 |
3032 | 3032 |
3033 bool v8::Object::Set(uint32_t index, v8::Handle<Value> value) { | 3033 bool v8::Object::Set(uint32_t index, v8::Handle<Value> value) { |
3034 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); | 3034 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); |
3035 ON_BAILOUT(isolate, "v8::Object::Set()", return false); | 3035 ON_BAILOUT(isolate, "v8::Object::Set()", return false); |
3036 ENTER_V8(isolate); | 3036 ENTER_V8(isolate); |
3037 i::HandleScope scope(isolate); | 3037 i::HandleScope scope(isolate); |
3038 i::Handle<i::JSObject> self = Utils::OpenHandle(this); | 3038 i::Handle<i::JSObject> self = Utils::OpenHandle(this); |
3039 i::Handle<i::Object> value_obj = Utils::OpenHandle(*value); | 3039 i::Handle<i::Object> value_obj = Utils::OpenHandle(*value); |
3040 EXCEPTION_PREAMBLE(isolate); | 3040 EXCEPTION_PREAMBLE(isolate); |
3041 i::Handle<i::Object> obj = i::JSObject::SetElement( | 3041 i::Handle<i::Object> obj = i::JSObject::SetElement( |
3042 self, | 3042 self, |
3043 index, | 3043 index, |
3044 value_obj, | 3044 value_obj, |
3045 NONE, | 3045 NONE, |
3046 i::kSloppyMode); | 3046 i::SLOPPY); |
3047 has_pending_exception = obj.is_null(); | 3047 has_pending_exception = obj.is_null(); |
3048 EXCEPTION_BAILOUT_CHECK(isolate, false); | 3048 EXCEPTION_BAILOUT_CHECK(isolate, false); |
3049 return true; | 3049 return true; |
3050 } | 3050 } |
3051 | 3051 |
3052 | 3052 |
3053 bool v8::Object::ForceSet(v8::Handle<Value> key, | 3053 bool v8::Object::ForceSet(v8::Handle<Value> key, |
3054 v8::Handle<Value> value, | 3054 v8::Handle<Value> value, |
3055 v8::PropertyAttribute attribs) { | 3055 v8::PropertyAttribute attribs) { |
3056 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); | 3056 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); |
(...skipping 4320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7377 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); | 7377 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); |
7378 Address callback_address = | 7378 Address callback_address = |
7379 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 7379 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
7380 VMState<EXTERNAL> state(isolate); | 7380 VMState<EXTERNAL> state(isolate); |
7381 ExternalCallbackScope call_scope(isolate, callback_address); | 7381 ExternalCallbackScope call_scope(isolate, callback_address); |
7382 callback(info); | 7382 callback(info); |
7383 } | 7383 } |
7384 | 7384 |
7385 | 7385 |
7386 } } // namespace v8::internal | 7386 } } // namespace v8::internal |
OLD | NEW |