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 2268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2279 ENTER_V8; | 2279 ENTER_V8; |
2280 HandleScope scope; | 2280 HandleScope scope; |
2281 i::Handle<i::Object> self = Utils::OpenHandle(this); | 2281 i::Handle<i::Object> self = Utils::OpenHandle(this); |
2282 i::Handle<i::Object> key_obj = Utils::OpenHandle(*key); | 2282 i::Handle<i::Object> key_obj = Utils::OpenHandle(*key); |
2283 i::Handle<i::Object> value_obj = Utils::OpenHandle(*value); | 2283 i::Handle<i::Object> value_obj = Utils::OpenHandle(*value); |
2284 EXCEPTION_PREAMBLE(); | 2284 EXCEPTION_PREAMBLE(); |
2285 i::Handle<i::Object> obj = i::SetProperty( | 2285 i::Handle<i::Object> obj = i::SetProperty( |
2286 self, | 2286 self, |
2287 key_obj, | 2287 key_obj, |
2288 value_obj, | 2288 value_obj, |
2289 static_cast<PropertyAttributes>(attribs)); | 2289 static_cast<PropertyAttributes>(attribs), |
2290 i::kNonStrictMode); // TODO(mmaly): v8::Object::Set API. Needs strict? | |
Martin Maly
2011/02/27 23:04:04
Do we need to expand the V8 API to allow for stric
Lasse Reichstein
2011/02/28 11:18:30
I'd say to keep it non-strict. The C++-API isn't p
Martin Maly
2011/03/01 01:40:29
Done.
| |
2290 has_pending_exception = obj.is_null(); | 2291 has_pending_exception = obj.is_null(); |
2291 EXCEPTION_BAILOUT_CHECK(false); | 2292 EXCEPTION_BAILOUT_CHECK(false); |
2292 return true; | 2293 return true; |
2293 } | 2294 } |
2294 | 2295 |
2295 | 2296 |
2296 bool v8::Object::Set(uint32_t index, v8::Handle<Value> value) { | 2297 bool v8::Object::Set(uint32_t index, v8::Handle<Value> value) { |
2297 ON_BAILOUT("v8::Object::Set()", return false); | 2298 ON_BAILOUT("v8::Object::Set()", return false); |
2298 ENTER_V8; | 2299 ENTER_V8; |
2299 HandleScope scope; | 2300 HandleScope scope; |
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2704 HandleScope scope; | 2705 HandleScope scope; |
2705 i::Handle<i::JSObject> self = Utils::OpenHandle(this); | 2706 i::Handle<i::JSObject> self = Utils::OpenHandle(this); |
2706 i::Handle<i::Object> hidden_props(i::GetHiddenProperties(self, true)); | 2707 i::Handle<i::Object> hidden_props(i::GetHiddenProperties(self, true)); |
2707 i::Handle<i::Object> key_obj = Utils::OpenHandle(*key); | 2708 i::Handle<i::Object> key_obj = Utils::OpenHandle(*key); |
2708 i::Handle<i::Object> value_obj = Utils::OpenHandle(*value); | 2709 i::Handle<i::Object> value_obj = Utils::OpenHandle(*value); |
2709 EXCEPTION_PREAMBLE(); | 2710 EXCEPTION_PREAMBLE(); |
2710 i::Handle<i::Object> obj = i::SetProperty( | 2711 i::Handle<i::Object> obj = i::SetProperty( |
2711 hidden_props, | 2712 hidden_props, |
2712 key_obj, | 2713 key_obj, |
2713 value_obj, | 2714 value_obj, |
2714 static_cast<PropertyAttributes>(None)); | 2715 static_cast<PropertyAttributes>(None), |
2716 i::kNonStrictMode); // v8::Object::SetHiddenValue doesn't need strict. | |
2715 has_pending_exception = obj.is_null(); | 2717 has_pending_exception = obj.is_null(); |
2716 EXCEPTION_BAILOUT_CHECK(false); | 2718 EXCEPTION_BAILOUT_CHECK(false); |
2717 return true; | 2719 return true; |
2718 } | 2720 } |
2719 | 2721 |
2720 | 2722 |
2721 v8::Local<v8::Value> v8::Object::GetHiddenValue(v8::Handle<v8::String> key) { | 2723 v8::Local<v8::Value> v8::Object::GetHiddenValue(v8::Handle<v8::String> key) { |
2722 ON_BAILOUT("v8::Object::GetHiddenValue()", return Local<v8::Value>()); | 2724 ON_BAILOUT("v8::Object::GetHiddenValue()", return Local<v8::Value>()); |
2723 ENTER_V8; | 2725 ENTER_V8; |
2724 i::Handle<i::JSObject> self = Utils::OpenHandle(this); | 2726 i::Handle<i::JSObject> self = Utils::OpenHandle(this); |
(...skipping 2455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
5180 | 5182 |
5181 | 5183 |
5182 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { | 5184 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { |
5183 HandleScopeImplementer* thread_local = | 5185 HandleScopeImplementer* thread_local = |
5184 reinterpret_cast<HandleScopeImplementer*>(storage); | 5186 reinterpret_cast<HandleScopeImplementer*>(storage); |
5185 thread_local->IterateThis(v); | 5187 thread_local->IterateThis(v); |
5186 return storage + ArchiveSpacePerThread(); | 5188 return storage + ArchiveSpacePerThread(); |
5187 } | 5189 } |
5188 | 5190 |
5189 } } // namespace v8::internal | 5191 } } // namespace v8::internal |
OLD | NEW |