| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 Handle<JSObject> holder_handle(JSObject::cast(holder)); | 194 Handle<JSObject> holder_handle(JSObject::cast(holder)); |
| 195 Handle<String> key(name); | 195 Handle<String> key(name); |
| 196 Handle<Object> fun_data(data->data()); | 196 Handle<Object> fun_data(data->data()); |
| 197 LOG(ApiNamedPropertyAccess("load", *self, name)); | 197 LOG(ApiNamedPropertyAccess("load", *self, name)); |
| 198 v8::AccessorInfo info(v8::Utils::ToLocal(self), | 198 v8::AccessorInfo info(v8::Utils::ToLocal(self), |
| 199 v8::Utils::ToLocal(fun_data), | 199 v8::Utils::ToLocal(fun_data), |
| 200 v8::Utils::ToLocal(holder_handle)); | 200 v8::Utils::ToLocal(holder_handle)); |
| 201 v8::Handle<v8::Value> result; | 201 v8::Handle<v8::Value> result; |
| 202 { | 202 { |
| 203 // Leaving JavaScript. | 203 // Leaving JavaScript. |
| 204 VMState state(OTHER); | 204 VMState state(EXTERNAL); |
| 205 result = call_fun(v8::Utils::ToLocal(key), info); | 205 result = call_fun(v8::Utils::ToLocal(key), info); |
| 206 } | 206 } |
| 207 RETURN_IF_SCHEDULED_EXCEPTION(); | 207 RETURN_IF_SCHEDULED_EXCEPTION(); |
| 208 if (result.IsEmpty()) return Heap::undefined_value(); | 208 if (result.IsEmpty()) return Heap::undefined_value(); |
| 209 return *v8::Utils::OpenHandle(*result); | 209 return *v8::Utils::OpenHandle(*result); |
| 210 } | 210 } |
| 211 | 211 |
| 212 // __defineGetter__ callback | 212 // __defineGetter__ callback |
| 213 if (structure->IsFixedArray()) { | 213 if (structure->IsFixedArray()) { |
| 214 Object* getter = FixedArray::cast(structure)->get(kGetterIndex); | 214 Object* getter = FixedArray::cast(structure)->get(kGetterIndex); |
| (...skipping 1201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1416 Handle<Object> data_handle(interceptor->data()); | 1416 Handle<Object> data_handle(interceptor->data()); |
| 1417 LOG(ApiNamedPropertyAccess("interceptor-named-set", this, name)); | 1417 LOG(ApiNamedPropertyAccess("interceptor-named-set", this, name)); |
| 1418 v8::AccessorInfo info(v8::Utils::ToLocal(this_handle), | 1418 v8::AccessorInfo info(v8::Utils::ToLocal(this_handle), |
| 1419 v8::Utils::ToLocal(data_handle), | 1419 v8::Utils::ToLocal(data_handle), |
| 1420 v8::Utils::ToLocal(this_handle)); | 1420 v8::Utils::ToLocal(this_handle)); |
| 1421 v8::NamedPropertySetter setter = | 1421 v8::NamedPropertySetter setter = |
| 1422 v8::ToCData<v8::NamedPropertySetter>(interceptor->setter()); | 1422 v8::ToCData<v8::NamedPropertySetter>(interceptor->setter()); |
| 1423 v8::Handle<v8::Value> result; | 1423 v8::Handle<v8::Value> result; |
| 1424 { | 1424 { |
| 1425 // Leaving JavaScript. | 1425 // Leaving JavaScript. |
| 1426 VMState state(OTHER); | 1426 VMState state(EXTERNAL); |
| 1427 Handle<Object> value_unhole(value->IsTheHole() ? | 1427 Handle<Object> value_unhole(value->IsTheHole() ? |
| 1428 Heap::undefined_value() : | 1428 Heap::undefined_value() : |
| 1429 value); | 1429 value); |
| 1430 result = setter(v8::Utils::ToLocal(name_handle), | 1430 result = setter(v8::Utils::ToLocal(name_handle), |
| 1431 v8::Utils::ToLocal(value_unhole), | 1431 v8::Utils::ToLocal(value_unhole), |
| 1432 info); | 1432 info); |
| 1433 } | 1433 } |
| 1434 RETURN_IF_SCHEDULED_EXCEPTION(); | 1434 RETURN_IF_SCHEDULED_EXCEPTION(); |
| 1435 if (!result.IsEmpty()) return *value_handle; | 1435 if (!result.IsEmpty()) return *value_handle; |
| 1436 } | 1436 } |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1483 Handle<JSObject> self(this); | 1483 Handle<JSObject> self(this); |
| 1484 Handle<JSObject> holder_handle(JSObject::cast(holder)); | 1484 Handle<JSObject> holder_handle(JSObject::cast(holder)); |
| 1485 Handle<String> key(name); | 1485 Handle<String> key(name); |
| 1486 Handle<Object> fun_data(data->data()); | 1486 Handle<Object> fun_data(data->data()); |
| 1487 LOG(ApiNamedPropertyAccess("store", this, name)); | 1487 LOG(ApiNamedPropertyAccess("store", this, name)); |
| 1488 v8::AccessorInfo info(v8::Utils::ToLocal(self), | 1488 v8::AccessorInfo info(v8::Utils::ToLocal(self), |
| 1489 v8::Utils::ToLocal(fun_data), | 1489 v8::Utils::ToLocal(fun_data), |
| 1490 v8::Utils::ToLocal(holder_handle)); | 1490 v8::Utils::ToLocal(holder_handle)); |
| 1491 { | 1491 { |
| 1492 // Leaving JavaScript. | 1492 // Leaving JavaScript. |
| 1493 VMState state(OTHER); | 1493 VMState state(EXTERNAL); |
| 1494 call_fun(v8::Utils::ToLocal(key), | 1494 call_fun(v8::Utils::ToLocal(key), |
| 1495 v8::Utils::ToLocal(value_handle), | 1495 v8::Utils::ToLocal(value_handle), |
| 1496 info); | 1496 info); |
| 1497 } | 1497 } |
| 1498 RETURN_IF_SCHEDULED_EXCEPTION(); | 1498 RETURN_IF_SCHEDULED_EXCEPTION(); |
| 1499 return *value_handle; | 1499 return *value_handle; |
| 1500 } | 1500 } |
| 1501 | 1501 |
| 1502 if (structure->IsFixedArray()) { | 1502 if (structure->IsFixedArray()) { |
| 1503 Object* setter = FixedArray::cast(structure)->get(kSetterIndex); | 1503 Object* setter = FixedArray::cast(structure)->get(kSetterIndex); |
| (...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1885 v8::AccessorInfo info(v8::Utils::ToLocal(receiver_handle), | 1885 v8::AccessorInfo info(v8::Utils::ToLocal(receiver_handle), |
| 1886 v8::Utils::ToLocal(data_handle), | 1886 v8::Utils::ToLocal(data_handle), |
| 1887 v8::Utils::ToLocal(holder_handle)); | 1887 v8::Utils::ToLocal(holder_handle)); |
| 1888 if (!interceptor->query()->IsUndefined()) { | 1888 if (!interceptor->query()->IsUndefined()) { |
| 1889 v8::NamedPropertyQuery query = | 1889 v8::NamedPropertyQuery query = |
| 1890 v8::ToCData<v8::NamedPropertyQuery>(interceptor->query()); | 1890 v8::ToCData<v8::NamedPropertyQuery>(interceptor->query()); |
| 1891 LOG(ApiNamedPropertyAccess("interceptor-named-has", *holder_handle, name)); | 1891 LOG(ApiNamedPropertyAccess("interceptor-named-has", *holder_handle, name)); |
| 1892 v8::Handle<v8::Boolean> result; | 1892 v8::Handle<v8::Boolean> result; |
| 1893 { | 1893 { |
| 1894 // Leaving JavaScript. | 1894 // Leaving JavaScript. |
| 1895 VMState state(OTHER); | 1895 VMState state(EXTERNAL); |
| 1896 result = query(v8::Utils::ToLocal(name_handle), info); | 1896 result = query(v8::Utils::ToLocal(name_handle), info); |
| 1897 } | 1897 } |
| 1898 if (!result.IsEmpty()) { | 1898 if (!result.IsEmpty()) { |
| 1899 // Convert the boolean result to a property attribute | 1899 // Convert the boolean result to a property attribute |
| 1900 // specification. | 1900 // specification. |
| 1901 return result->IsTrue() ? NONE : ABSENT; | 1901 return result->IsTrue() ? NONE : ABSENT; |
| 1902 } | 1902 } |
| 1903 } else if (!interceptor->getter()->IsUndefined()) { | 1903 } else if (!interceptor->getter()->IsUndefined()) { |
| 1904 v8::NamedPropertyGetter getter = | 1904 v8::NamedPropertyGetter getter = |
| 1905 v8::ToCData<v8::NamedPropertyGetter>(interceptor->getter()); | 1905 v8::ToCData<v8::NamedPropertyGetter>(interceptor->getter()); |
| 1906 LOG(ApiNamedPropertyAccess("interceptor-named-get-has", this, name)); | 1906 LOG(ApiNamedPropertyAccess("interceptor-named-get-has", this, name)); |
| 1907 v8::Handle<v8::Value> result; | 1907 v8::Handle<v8::Value> result; |
| 1908 { | 1908 { |
| 1909 // Leaving JavaScript. | 1909 // Leaving JavaScript. |
| 1910 VMState state(OTHER); | 1910 VMState state(EXTERNAL); |
| 1911 result = getter(v8::Utils::ToLocal(name_handle), info); | 1911 result = getter(v8::Utils::ToLocal(name_handle), info); |
| 1912 } | 1912 } |
| 1913 if (!result.IsEmpty()) return NONE; | 1913 if (!result.IsEmpty()) return NONE; |
| 1914 } | 1914 } |
| 1915 return holder_handle->GetPropertyAttributePostInterceptor(*receiver_handle, | 1915 return holder_handle->GetPropertyAttributePostInterceptor(*receiver_handle, |
| 1916 *name_handle, | 1916 *name_handle, |
| 1917 continue_search); | 1917 continue_search); |
| 1918 } | 1918 } |
| 1919 | 1919 |
| 1920 | 1920 |
| (...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2149 v8::NamedPropertyDeleter deleter = | 2149 v8::NamedPropertyDeleter deleter = |
| 2150 v8::ToCData<v8::NamedPropertyDeleter>(interceptor->deleter()); | 2150 v8::ToCData<v8::NamedPropertyDeleter>(interceptor->deleter()); |
| 2151 Handle<Object> data_handle(interceptor->data()); | 2151 Handle<Object> data_handle(interceptor->data()); |
| 2152 LOG(ApiNamedPropertyAccess("interceptor-named-delete", *this_handle, name)); | 2152 LOG(ApiNamedPropertyAccess("interceptor-named-delete", *this_handle, name)); |
| 2153 v8::AccessorInfo info(v8::Utils::ToLocal(this_handle), | 2153 v8::AccessorInfo info(v8::Utils::ToLocal(this_handle), |
| 2154 v8::Utils::ToLocal(data_handle), | 2154 v8::Utils::ToLocal(data_handle), |
| 2155 v8::Utils::ToLocal(this_handle)); | 2155 v8::Utils::ToLocal(this_handle)); |
| 2156 v8::Handle<v8::Boolean> result; | 2156 v8::Handle<v8::Boolean> result; |
| 2157 { | 2157 { |
| 2158 // Leaving JavaScript. | 2158 // Leaving JavaScript. |
| 2159 VMState state(OTHER); | 2159 VMState state(EXTERNAL); |
| 2160 result = deleter(v8::Utils::ToLocal(name_handle), info); | 2160 result = deleter(v8::Utils::ToLocal(name_handle), info); |
| 2161 } | 2161 } |
| 2162 RETURN_IF_SCHEDULED_EXCEPTION(); | 2162 RETURN_IF_SCHEDULED_EXCEPTION(); |
| 2163 if (!result.IsEmpty()) { | 2163 if (!result.IsEmpty()) { |
| 2164 ASSERT(result->IsBoolean()); | 2164 ASSERT(result->IsBoolean()); |
| 2165 return *v8::Utils::OpenHandle(*result); | 2165 return *v8::Utils::OpenHandle(*result); |
| 2166 } | 2166 } |
| 2167 } | 2167 } |
| 2168 Object* raw_result = this_handle->DeletePropertyPostInterceptor(*name_handle); | 2168 Object* raw_result = this_handle->DeletePropertyPostInterceptor(*name_handle); |
| 2169 RETURN_IF_SCHEDULED_EXCEPTION(); | 2169 RETURN_IF_SCHEDULED_EXCEPTION(); |
| (...skipping 30 matching lines...) Expand all Loading... |
| 2200 v8::ToCData<v8::IndexedPropertyDeleter>(interceptor->deleter()); | 2200 v8::ToCData<v8::IndexedPropertyDeleter>(interceptor->deleter()); |
| 2201 Handle<JSObject> this_handle(this); | 2201 Handle<JSObject> this_handle(this); |
| 2202 Handle<Object> data_handle(interceptor->data()); | 2202 Handle<Object> data_handle(interceptor->data()); |
| 2203 LOG(ApiIndexedPropertyAccess("interceptor-indexed-delete", this, index)); | 2203 LOG(ApiIndexedPropertyAccess("interceptor-indexed-delete", this, index)); |
| 2204 v8::AccessorInfo info(v8::Utils::ToLocal(this_handle), | 2204 v8::AccessorInfo info(v8::Utils::ToLocal(this_handle), |
| 2205 v8::Utils::ToLocal(data_handle), | 2205 v8::Utils::ToLocal(data_handle), |
| 2206 v8::Utils::ToLocal(this_handle)); | 2206 v8::Utils::ToLocal(this_handle)); |
| 2207 v8::Handle<v8::Boolean> result; | 2207 v8::Handle<v8::Boolean> result; |
| 2208 { | 2208 { |
| 2209 // Leaving JavaScript. | 2209 // Leaving JavaScript. |
| 2210 VMState state(OTHER); | 2210 VMState state(EXTERNAL); |
| 2211 result = deleter(index, info); | 2211 result = deleter(index, info); |
| 2212 } | 2212 } |
| 2213 RETURN_IF_SCHEDULED_EXCEPTION(); | 2213 RETURN_IF_SCHEDULED_EXCEPTION(); |
| 2214 if (!result.IsEmpty()) { | 2214 if (!result.IsEmpty()) { |
| 2215 ASSERT(result->IsBoolean()); | 2215 ASSERT(result->IsBoolean()); |
| 2216 return *v8::Utils::OpenHandle(*result); | 2216 return *v8::Utils::OpenHandle(*result); |
| 2217 } | 2217 } |
| 2218 Object* raw_result = this_handle->DeleteElementPostInterceptor(index); | 2218 Object* raw_result = this_handle->DeleteElementPostInterceptor(index); |
| 2219 RETURN_IF_SCHEDULED_EXCEPTION(); | 2219 RETURN_IF_SCHEDULED_EXCEPTION(); |
| 2220 return raw_result; | 2220 return raw_result; |
| (...skipping 2858 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5079 v8::AccessorInfo info(v8::Utils::ToLocal(receiver_handle), | 5079 v8::AccessorInfo info(v8::Utils::ToLocal(receiver_handle), |
| 5080 v8::Utils::ToLocal(data_handle), | 5080 v8::Utils::ToLocal(data_handle), |
| 5081 v8::Utils::ToLocal(holder_handle)); | 5081 v8::Utils::ToLocal(holder_handle)); |
| 5082 if (!interceptor->query()->IsUndefined()) { | 5082 if (!interceptor->query()->IsUndefined()) { |
| 5083 v8::IndexedPropertyQuery query = | 5083 v8::IndexedPropertyQuery query = |
| 5084 v8::ToCData<v8::IndexedPropertyQuery>(interceptor->query()); | 5084 v8::ToCData<v8::IndexedPropertyQuery>(interceptor->query()); |
| 5085 LOG(ApiIndexedPropertyAccess("interceptor-indexed-has", this, index)); | 5085 LOG(ApiIndexedPropertyAccess("interceptor-indexed-has", this, index)); |
| 5086 v8::Handle<v8::Boolean> result; | 5086 v8::Handle<v8::Boolean> result; |
| 5087 { | 5087 { |
| 5088 // Leaving JavaScript. | 5088 // Leaving JavaScript. |
| 5089 VMState state(OTHER); | 5089 VMState state(EXTERNAL); |
| 5090 result = query(index, info); | 5090 result = query(index, info); |
| 5091 } | 5091 } |
| 5092 if (!result.IsEmpty()) return result->IsTrue(); | 5092 if (!result.IsEmpty()) return result->IsTrue(); |
| 5093 } else if (!interceptor->getter()->IsUndefined()) { | 5093 } else if (!interceptor->getter()->IsUndefined()) { |
| 5094 v8::IndexedPropertyGetter getter = | 5094 v8::IndexedPropertyGetter getter = |
| 5095 v8::ToCData<v8::IndexedPropertyGetter>(interceptor->getter()); | 5095 v8::ToCData<v8::IndexedPropertyGetter>(interceptor->getter()); |
| 5096 LOG(ApiIndexedPropertyAccess("interceptor-indexed-has-get", this, index)); | 5096 LOG(ApiIndexedPropertyAccess("interceptor-indexed-has-get", this, index)); |
| 5097 v8::Handle<v8::Value> result; | 5097 v8::Handle<v8::Value> result; |
| 5098 { | 5098 { |
| 5099 // Leaving JavaScript. | 5099 // Leaving JavaScript. |
| 5100 VMState state(OTHER); | 5100 VMState state(EXTERNAL); |
| 5101 result = getter(index, info); | 5101 result = getter(index, info); |
| 5102 } | 5102 } |
| 5103 if (!result.IsEmpty()) return !result->IsUndefined(); | 5103 if (!result.IsEmpty()) return !result->IsUndefined(); |
| 5104 } | 5104 } |
| 5105 return holder_handle->HasElementPostInterceptor(*receiver_handle, index); | 5105 return holder_handle->HasElementPostInterceptor(*receiver_handle, index); |
| 5106 } | 5106 } |
| 5107 | 5107 |
| 5108 | 5108 |
| 5109 bool JSObject::HasLocalElement(uint32_t index) { | 5109 bool JSObject::HasLocalElement(uint32_t index) { |
| 5110 // Check access rights if needed. | 5110 // Check access rights if needed. |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5240 v8::IndexedPropertySetter setter = | 5240 v8::IndexedPropertySetter setter = |
| 5241 v8::ToCData<v8::IndexedPropertySetter>(interceptor->setter()); | 5241 v8::ToCData<v8::IndexedPropertySetter>(interceptor->setter()); |
| 5242 Handle<Object> data_handle(interceptor->data()); | 5242 Handle<Object> data_handle(interceptor->data()); |
| 5243 LOG(ApiIndexedPropertyAccess("interceptor-indexed-set", this, index)); | 5243 LOG(ApiIndexedPropertyAccess("interceptor-indexed-set", this, index)); |
| 5244 v8::AccessorInfo info(v8::Utils::ToLocal(this_handle), | 5244 v8::AccessorInfo info(v8::Utils::ToLocal(this_handle), |
| 5245 v8::Utils::ToLocal(data_handle), | 5245 v8::Utils::ToLocal(data_handle), |
| 5246 v8::Utils::ToLocal(this_handle)); | 5246 v8::Utils::ToLocal(this_handle)); |
| 5247 v8::Handle<v8::Value> result; | 5247 v8::Handle<v8::Value> result; |
| 5248 { | 5248 { |
| 5249 // Leaving JavaScript. | 5249 // Leaving JavaScript. |
| 5250 VMState state(OTHER); | 5250 VMState state(EXTERNAL); |
| 5251 result = setter(index, v8::Utils::ToLocal(value_handle), info); | 5251 result = setter(index, v8::Utils::ToLocal(value_handle), info); |
| 5252 } | 5252 } |
| 5253 RETURN_IF_SCHEDULED_EXCEPTION(); | 5253 RETURN_IF_SCHEDULED_EXCEPTION(); |
| 5254 if (!result.IsEmpty()) return *value_handle; | 5254 if (!result.IsEmpty()) return *value_handle; |
| 5255 } | 5255 } |
| 5256 Object* raw_result = | 5256 Object* raw_result = |
| 5257 this_handle->SetElementPostInterceptor(index, *value_handle); | 5257 this_handle->SetElementPostInterceptor(index, *value_handle); |
| 5258 RETURN_IF_SCHEDULED_EXCEPTION(); | 5258 RETURN_IF_SCHEDULED_EXCEPTION(); |
| 5259 return raw_result; | 5259 return raw_result; |
| 5260 } | 5260 } |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5467 Handle<Object> data_handle(interceptor->data()); | 5467 Handle<Object> data_handle(interceptor->data()); |
| 5468 v8::IndexedPropertyGetter getter = | 5468 v8::IndexedPropertyGetter getter = |
| 5469 v8::ToCData<v8::IndexedPropertyGetter>(interceptor->getter()); | 5469 v8::ToCData<v8::IndexedPropertyGetter>(interceptor->getter()); |
| 5470 LOG(ApiIndexedPropertyAccess("interceptor-indexed-get", this, index)); | 5470 LOG(ApiIndexedPropertyAccess("interceptor-indexed-get", this, index)); |
| 5471 v8::AccessorInfo info(v8::Utils::ToLocal(this_handle), | 5471 v8::AccessorInfo info(v8::Utils::ToLocal(this_handle), |
| 5472 v8::Utils::ToLocal(data_handle), | 5472 v8::Utils::ToLocal(data_handle), |
| 5473 v8::Utils::ToLocal(holder_handle)); | 5473 v8::Utils::ToLocal(holder_handle)); |
| 5474 v8::Handle<v8::Value> result; | 5474 v8::Handle<v8::Value> result; |
| 5475 { | 5475 { |
| 5476 // Leaving JavaScript. | 5476 // Leaving JavaScript. |
| 5477 VMState state(OTHER); | 5477 VMState state(EXTERNAL); |
| 5478 result = getter(index, info); | 5478 result = getter(index, info); |
| 5479 } | 5479 } |
| 5480 RETURN_IF_SCHEDULED_EXCEPTION(); | 5480 RETURN_IF_SCHEDULED_EXCEPTION(); |
| 5481 if (!result.IsEmpty()) return *v8::Utils::OpenHandle(*result); | 5481 if (!result.IsEmpty()) return *v8::Utils::OpenHandle(*result); |
| 5482 } | 5482 } |
| 5483 | 5483 |
| 5484 Object* raw_result = | 5484 Object* raw_result = |
| 5485 holder_handle->GetElementPostInterceptor(*this_handle, index); | 5485 holder_handle->GetElementPostInterceptor(*this_handle, index); |
| 5486 RETURN_IF_SCHEDULED_EXCEPTION(); | 5486 RETURN_IF_SCHEDULED_EXCEPTION(); |
| 5487 return raw_result; | 5487 return raw_result; |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5706 if (!interceptor->getter()->IsUndefined()) { | 5706 if (!interceptor->getter()->IsUndefined()) { |
| 5707 v8::NamedPropertyGetter getter = | 5707 v8::NamedPropertyGetter getter = |
| 5708 v8::ToCData<v8::NamedPropertyGetter>(interceptor->getter()); | 5708 v8::ToCData<v8::NamedPropertyGetter>(interceptor->getter()); |
| 5709 LOG(ApiNamedPropertyAccess("interceptor-named-get", *holder_handle, name)); | 5709 LOG(ApiNamedPropertyAccess("interceptor-named-get", *holder_handle, name)); |
| 5710 v8::AccessorInfo info(v8::Utils::ToLocal(receiver_handle), | 5710 v8::AccessorInfo info(v8::Utils::ToLocal(receiver_handle), |
| 5711 v8::Utils::ToLocal(data_handle), | 5711 v8::Utils::ToLocal(data_handle), |
| 5712 v8::Utils::ToLocal(holder_handle)); | 5712 v8::Utils::ToLocal(holder_handle)); |
| 5713 v8::Handle<v8::Value> result; | 5713 v8::Handle<v8::Value> result; |
| 5714 { | 5714 { |
| 5715 // Leaving JavaScript. | 5715 // Leaving JavaScript. |
| 5716 VMState state(OTHER); | 5716 VMState state(EXTERNAL); |
| 5717 result = getter(v8::Utils::ToLocal(name_handle), info); | 5717 result = getter(v8::Utils::ToLocal(name_handle), info); |
| 5718 } | 5718 } |
| 5719 RETURN_IF_SCHEDULED_EXCEPTION(); | 5719 RETURN_IF_SCHEDULED_EXCEPTION(); |
| 5720 if (!result.IsEmpty()) { | 5720 if (!result.IsEmpty()) { |
| 5721 *attributes = NONE; | 5721 *attributes = NONE; |
| 5722 return *v8::Utils::OpenHandle(*result); | 5722 return *v8::Utils::OpenHandle(*result); |
| 5723 } | 5723 } |
| 5724 } | 5724 } |
| 5725 | 5725 |
| 5726 Object* raw_result = holder_handle->GetPropertyPostInterceptor( | 5726 Object* raw_result = holder_handle->GetPropertyPostInterceptor( |
| (...skipping 1650 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7377 // No break point. | 7377 // No break point. |
| 7378 if (break_point_objects()->IsUndefined()) return 0; | 7378 if (break_point_objects()->IsUndefined()) return 0; |
| 7379 // Single beak point. | 7379 // Single beak point. |
| 7380 if (!break_point_objects()->IsFixedArray()) return 1; | 7380 if (!break_point_objects()->IsFixedArray()) return 1; |
| 7381 // Multiple break points. | 7381 // Multiple break points. |
| 7382 return FixedArray::cast(break_point_objects())->length(); | 7382 return FixedArray::cast(break_point_objects())->length(); |
| 7383 } | 7383 } |
| 7384 | 7384 |
| 7385 | 7385 |
| 7386 } } // namespace v8::internal | 7386 } } // namespace v8::internal |
| OLD | NEW |