OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
337 if (call_fun == NULL) return isolate->heap()->undefined_value(); | 337 if (call_fun == NULL) return isolate->heap()->undefined_value(); |
338 HandleScope scope(isolate); | 338 HandleScope scope(isolate); |
339 JSObject* self = JSObject::cast(receiver); | 339 JSObject* self = JSObject::cast(receiver); |
340 Handle<String> key(String::cast(name)); | 340 Handle<String> key(String::cast(name)); |
341 LOG(isolate, ApiNamedPropertyAccess("load", self, name)); | 341 LOG(isolate, ApiNamedPropertyAccess("load", self, name)); |
342 CustomArguments args(isolate, data->data(), self, this); | 342 CustomArguments args(isolate, data->data(), self, this); |
343 v8::AccessorInfo info(args.end()); | 343 v8::AccessorInfo info(args.end()); |
344 v8::Handle<v8::Value> result; | 344 v8::Handle<v8::Value> result; |
345 { | 345 { |
346 // Leaving JavaScript. | 346 // Leaving JavaScript. |
347 VMState state(isolate, EXTERNAL); | 347 VMState<EXTERNAL> state(isolate); |
348 result = call_fun(v8::Utils::ToLocal(key), info); | 348 result = call_fun(v8::Utils::ToLocal(key), info); |
349 } | 349 } |
350 RETURN_IF_SCHEDULED_EXCEPTION(isolate); | 350 RETURN_IF_SCHEDULED_EXCEPTION(isolate); |
351 if (result.IsEmpty()) { | 351 if (result.IsEmpty()) { |
352 return isolate->heap()->undefined_value(); | 352 return isolate->heap()->undefined_value(); |
353 } | 353 } |
354 Object* return_value = *v8::Utils::OpenHandle(*result); | 354 Object* return_value = *v8::Utils::OpenHandle(*result); |
355 return_value->VerifyApiCallResultType(); | 355 return_value->VerifyApiCallResultType(); |
356 return return_value; | 356 return return_value; |
357 } | 357 } |
(...skipping 1754 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2112 Handle<InterceptorInfo> interceptor(GetNamedInterceptor()); | 2112 Handle<InterceptorInfo> interceptor(GetNamedInterceptor()); |
2113 if (!interceptor->setter()->IsUndefined()) { | 2113 if (!interceptor->setter()->IsUndefined()) { |
2114 LOG(isolate, ApiNamedPropertyAccess("interceptor-named-set", this, name)); | 2114 LOG(isolate, ApiNamedPropertyAccess("interceptor-named-set", this, name)); |
2115 CustomArguments args(isolate, interceptor->data(), this, this); | 2115 CustomArguments args(isolate, interceptor->data(), this, this); |
2116 v8::AccessorInfo info(args.end()); | 2116 v8::AccessorInfo info(args.end()); |
2117 v8::NamedPropertySetter setter = | 2117 v8::NamedPropertySetter setter = |
2118 v8::ToCData<v8::NamedPropertySetter>(interceptor->setter()); | 2118 v8::ToCData<v8::NamedPropertySetter>(interceptor->setter()); |
2119 v8::Handle<v8::Value> result; | 2119 v8::Handle<v8::Value> result; |
2120 { | 2120 { |
2121 // Leaving JavaScript. | 2121 // Leaving JavaScript. |
2122 VMState state(isolate, EXTERNAL); | 2122 VMState<EXTERNAL> state(isolate); |
2123 Handle<Object> value_unhole(value->IsTheHole() ? | 2123 Handle<Object> value_unhole(value->IsTheHole() ? |
2124 isolate->heap()->undefined_value() : | 2124 isolate->heap()->undefined_value() : |
2125 value, | 2125 value, |
2126 isolate); | 2126 isolate); |
2127 result = setter(v8::Utils::ToLocal(name_handle), | 2127 result = setter(v8::Utils::ToLocal(name_handle), |
2128 v8::Utils::ToLocal(value_unhole), | 2128 v8::Utils::ToLocal(value_unhole), |
2129 info); | 2129 info); |
2130 } | 2130 } |
2131 RETURN_IF_SCHEDULED_EXCEPTION(isolate); | 2131 RETURN_IF_SCHEDULED_EXCEPTION(isolate); |
2132 if (!result.IsEmpty()) return *value_handle; | 2132 if (!result.IsEmpty()) return *value_handle; |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2223 if (name->IsSymbol()) return value; | 2223 if (name->IsSymbol()) return value; |
2224 Object* call_obj = data->setter(); | 2224 Object* call_obj = data->setter(); |
2225 v8::AccessorSetter call_fun = v8::ToCData<v8::AccessorSetter>(call_obj); | 2225 v8::AccessorSetter call_fun = v8::ToCData<v8::AccessorSetter>(call_obj); |
2226 if (call_fun == NULL) return value; | 2226 if (call_fun == NULL) return value; |
2227 Handle<String> key(String::cast(name)); | 2227 Handle<String> key(String::cast(name)); |
2228 LOG(isolate, ApiNamedPropertyAccess("store", this, name)); | 2228 LOG(isolate, ApiNamedPropertyAccess("store", this, name)); |
2229 CustomArguments args(isolate, data->data(), this, JSObject::cast(holder)); | 2229 CustomArguments args(isolate, data->data(), this, JSObject::cast(holder)); |
2230 v8::AccessorInfo info(args.end()); | 2230 v8::AccessorInfo info(args.end()); |
2231 { | 2231 { |
2232 // Leaving JavaScript. | 2232 // Leaving JavaScript. |
2233 VMState state(isolate, EXTERNAL); | 2233 VMState<EXTERNAL> state(isolate); |
2234 call_fun(v8::Utils::ToLocal(key), | 2234 call_fun(v8::Utils::ToLocal(key), |
2235 v8::Utils::ToLocal(value_handle), | 2235 v8::Utils::ToLocal(value_handle), |
2236 info); | 2236 info); |
2237 } | 2237 } |
2238 RETURN_IF_SCHEDULED_EXCEPTION(isolate); | 2238 RETURN_IF_SCHEDULED_EXCEPTION(isolate); |
2239 return *value_handle; | 2239 return *value_handle; |
2240 } | 2240 } |
2241 | 2241 |
2242 if (structure->IsAccessorPair()) { | 2242 if (structure->IsAccessorPair()) { |
2243 Object* setter = AccessorPair::cast(structure)->setter(); | 2243 Object* setter = AccessorPair::cast(structure)->setter(); |
(...skipping 1243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3487 CustomArguments args(isolate, interceptor->data(), receiver, this); | 3487 CustomArguments args(isolate, interceptor->data(), receiver, this); |
3488 v8::AccessorInfo info(args.end()); | 3488 v8::AccessorInfo info(args.end()); |
3489 if (!interceptor->query()->IsUndefined()) { | 3489 if (!interceptor->query()->IsUndefined()) { |
3490 v8::NamedPropertyQuery query = | 3490 v8::NamedPropertyQuery query = |
3491 v8::ToCData<v8::NamedPropertyQuery>(interceptor->query()); | 3491 v8::ToCData<v8::NamedPropertyQuery>(interceptor->query()); |
3492 LOG(isolate, | 3492 LOG(isolate, |
3493 ApiNamedPropertyAccess("interceptor-named-has", *holder_handle, name)); | 3493 ApiNamedPropertyAccess("interceptor-named-has", *holder_handle, name)); |
3494 v8::Handle<v8::Integer> result; | 3494 v8::Handle<v8::Integer> result; |
3495 { | 3495 { |
3496 // Leaving JavaScript. | 3496 // Leaving JavaScript. |
3497 VMState state(isolate, EXTERNAL); | 3497 VMState<EXTERNAL> state(isolate); |
3498 result = query(v8::Utils::ToLocal(name_handle), info); | 3498 result = query(v8::Utils::ToLocal(name_handle), info); |
3499 } | 3499 } |
3500 if (!result.IsEmpty()) { | 3500 if (!result.IsEmpty()) { |
3501 ASSERT(result->IsInt32()); | 3501 ASSERT(result->IsInt32()); |
3502 return static_cast<PropertyAttributes>(result->Int32Value()); | 3502 return static_cast<PropertyAttributes>(result->Int32Value()); |
3503 } | 3503 } |
3504 } else if (!interceptor->getter()->IsUndefined()) { | 3504 } else if (!interceptor->getter()->IsUndefined()) { |
3505 v8::NamedPropertyGetter getter = | 3505 v8::NamedPropertyGetter getter = |
3506 v8::ToCData<v8::NamedPropertyGetter>(interceptor->getter()); | 3506 v8::ToCData<v8::NamedPropertyGetter>(interceptor->getter()); |
3507 LOG(isolate, | 3507 LOG(isolate, |
3508 ApiNamedPropertyAccess("interceptor-named-get-has", this, name)); | 3508 ApiNamedPropertyAccess("interceptor-named-get-has", this, name)); |
3509 v8::Handle<v8::Value> result; | 3509 v8::Handle<v8::Value> result; |
3510 { | 3510 { |
3511 // Leaving JavaScript. | 3511 // Leaving JavaScript. |
3512 VMState state(isolate, EXTERNAL); | 3512 VMState<EXTERNAL> state(isolate); |
3513 result = getter(v8::Utils::ToLocal(name_handle), info); | 3513 result = getter(v8::Utils::ToLocal(name_handle), info); |
3514 } | 3514 } |
3515 if (!result.IsEmpty()) return DONT_ENUM; | 3515 if (!result.IsEmpty()) return DONT_ENUM; |
3516 } | 3516 } |
3517 return holder_handle->GetPropertyAttributePostInterceptor(*receiver_handle, | 3517 return holder_handle->GetPropertyAttributePostInterceptor(*receiver_handle, |
3518 *name_handle, | 3518 *name_handle, |
3519 continue_search); | 3519 continue_search); |
3520 } | 3520 } |
3521 | 3521 |
3522 | 3522 |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3628 CustomArguments args(isolate, interceptor->data(), receiver, this); | 3628 CustomArguments args(isolate, interceptor->data(), receiver, this); |
3629 v8::AccessorInfo info(args.end()); | 3629 v8::AccessorInfo info(args.end()); |
3630 if (!interceptor->query()->IsUndefined()) { | 3630 if (!interceptor->query()->IsUndefined()) { |
3631 v8::IndexedPropertyQuery query = | 3631 v8::IndexedPropertyQuery query = |
3632 v8::ToCData<v8::IndexedPropertyQuery>(interceptor->query()); | 3632 v8::ToCData<v8::IndexedPropertyQuery>(interceptor->query()); |
3633 LOG(isolate, | 3633 LOG(isolate, |
3634 ApiIndexedPropertyAccess("interceptor-indexed-has", this, index)); | 3634 ApiIndexedPropertyAccess("interceptor-indexed-has", this, index)); |
3635 v8::Handle<v8::Integer> result; | 3635 v8::Handle<v8::Integer> result; |
3636 { | 3636 { |
3637 // Leaving JavaScript. | 3637 // Leaving JavaScript. |
3638 VMState state(isolate, EXTERNAL); | 3638 VMState<EXTERNAL> state(isolate); |
3639 result = query(index, info); | 3639 result = query(index, info); |
3640 } | 3640 } |
3641 if (!result.IsEmpty()) | 3641 if (!result.IsEmpty()) |
3642 return static_cast<PropertyAttributes>(result->Int32Value()); | 3642 return static_cast<PropertyAttributes>(result->Int32Value()); |
3643 } else if (!interceptor->getter()->IsUndefined()) { | 3643 } else if (!interceptor->getter()->IsUndefined()) { |
3644 v8::IndexedPropertyGetter getter = | 3644 v8::IndexedPropertyGetter getter = |
3645 v8::ToCData<v8::IndexedPropertyGetter>(interceptor->getter()); | 3645 v8::ToCData<v8::IndexedPropertyGetter>(interceptor->getter()); |
3646 LOG(isolate, | 3646 LOG(isolate, |
3647 ApiIndexedPropertyAccess("interceptor-indexed-get-has", this, index)); | 3647 ApiIndexedPropertyAccess("interceptor-indexed-get-has", this, index)); |
3648 v8::Handle<v8::Value> result; | 3648 v8::Handle<v8::Value> result; |
3649 { | 3649 { |
3650 // Leaving JavaScript. | 3650 // Leaving JavaScript. |
3651 VMState state(isolate, EXTERNAL); | 3651 VMState<EXTERNAL> state(isolate); |
3652 result = getter(index, info); | 3652 result = getter(index, info); |
3653 } | 3653 } |
3654 if (!result.IsEmpty()) return NONE; | 3654 if (!result.IsEmpty()) return NONE; |
3655 } | 3655 } |
3656 | 3656 |
3657 return holder->GetElementAttributeWithoutInterceptor( | 3657 return holder->GetElementAttributeWithoutInterceptor( |
3658 *hreceiver, index, continue_search); | 3658 *hreceiver, index, continue_search); |
3659 } | 3659 } |
3660 | 3660 |
3661 | 3661 |
(...skipping 649 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4311 if (!interceptor->deleter()->IsUndefined()) { | 4311 if (!interceptor->deleter()->IsUndefined()) { |
4312 v8::NamedPropertyDeleter deleter = | 4312 v8::NamedPropertyDeleter deleter = |
4313 v8::ToCData<v8::NamedPropertyDeleter>(interceptor->deleter()); | 4313 v8::ToCData<v8::NamedPropertyDeleter>(interceptor->deleter()); |
4314 LOG(isolate, | 4314 LOG(isolate, |
4315 ApiNamedPropertyAccess("interceptor-named-delete", *this_handle, name)); | 4315 ApiNamedPropertyAccess("interceptor-named-delete", *this_handle, name)); |
4316 CustomArguments args(isolate, interceptor->data(), this, this); | 4316 CustomArguments args(isolate, interceptor->data(), this, this); |
4317 v8::AccessorInfo info(args.end()); | 4317 v8::AccessorInfo info(args.end()); |
4318 v8::Handle<v8::Boolean> result; | 4318 v8::Handle<v8::Boolean> result; |
4319 { | 4319 { |
4320 // Leaving JavaScript. | 4320 // Leaving JavaScript. |
4321 VMState state(isolate, EXTERNAL); | 4321 VMState<EXTERNAL> state(isolate); |
4322 result = deleter(v8::Utils::ToLocal(name_handle), info); | 4322 result = deleter(v8::Utils::ToLocal(name_handle), info); |
4323 } | 4323 } |
4324 RETURN_IF_SCHEDULED_EXCEPTION(isolate); | 4324 RETURN_IF_SCHEDULED_EXCEPTION(isolate); |
4325 if (!result.IsEmpty()) { | 4325 if (!result.IsEmpty()) { |
4326 ASSERT(result->IsBoolean()); | 4326 ASSERT(result->IsBoolean()); |
4327 Handle<Object> result_internal = v8::Utils::OpenHandle(*result); | 4327 Handle<Object> result_internal = v8::Utils::OpenHandle(*result); |
4328 result_internal->VerifyApiCallResultType(); | 4328 result_internal->VerifyApiCallResultType(); |
4329 return *result_internal; | 4329 return *result_internal; |
4330 } | 4330 } |
4331 } | 4331 } |
(...skipping 16 matching lines...) Expand all Loading... |
4348 v8::IndexedPropertyDeleter deleter = | 4348 v8::IndexedPropertyDeleter deleter = |
4349 v8::ToCData<v8::IndexedPropertyDeleter>(interceptor->deleter()); | 4349 v8::ToCData<v8::IndexedPropertyDeleter>(interceptor->deleter()); |
4350 Handle<JSObject> this_handle(this); | 4350 Handle<JSObject> this_handle(this); |
4351 LOG(isolate, | 4351 LOG(isolate, |
4352 ApiIndexedPropertyAccess("interceptor-indexed-delete", this, index)); | 4352 ApiIndexedPropertyAccess("interceptor-indexed-delete", this, index)); |
4353 CustomArguments args(isolate, interceptor->data(), this, this); | 4353 CustomArguments args(isolate, interceptor->data(), this, this); |
4354 v8::AccessorInfo info(args.end()); | 4354 v8::AccessorInfo info(args.end()); |
4355 v8::Handle<v8::Boolean> result; | 4355 v8::Handle<v8::Boolean> result; |
4356 { | 4356 { |
4357 // Leaving JavaScript. | 4357 // Leaving JavaScript. |
4358 VMState state(isolate, EXTERNAL); | 4358 VMState<EXTERNAL> state(isolate); |
4359 result = deleter(index, info); | 4359 result = deleter(index, info); |
4360 } | 4360 } |
4361 RETURN_IF_SCHEDULED_EXCEPTION(isolate); | 4361 RETURN_IF_SCHEDULED_EXCEPTION(isolate); |
4362 if (!result.IsEmpty()) { | 4362 if (!result.IsEmpty()) { |
4363 ASSERT(result->IsBoolean()); | 4363 ASSERT(result->IsBoolean()); |
4364 Handle<Object> result_internal = v8::Utils::OpenHandle(*result); | 4364 Handle<Object> result_internal = v8::Utils::OpenHandle(*result); |
4365 result_internal->VerifyApiCallResultType(); | 4365 result_internal->VerifyApiCallResultType(); |
4366 return *result_internal; | 4366 return *result_internal; |
4367 } | 4367 } |
4368 MaybeObject* raw_result = this_handle->GetElementsAccessor()->Delete( | 4368 MaybeObject* raw_result = this_handle->GetElementsAccessor()->Delete( |
(...skipping 5913 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10282 if (!interceptor->setter()->IsUndefined()) { | 10282 if (!interceptor->setter()->IsUndefined()) { |
10283 v8::IndexedPropertySetter setter = | 10283 v8::IndexedPropertySetter setter = |
10284 v8::ToCData<v8::IndexedPropertySetter>(interceptor->setter()); | 10284 v8::ToCData<v8::IndexedPropertySetter>(interceptor->setter()); |
10285 LOG(isolate, | 10285 LOG(isolate, |
10286 ApiIndexedPropertyAccess("interceptor-indexed-set", this, index)); | 10286 ApiIndexedPropertyAccess("interceptor-indexed-set", this, index)); |
10287 CustomArguments args(isolate, interceptor->data(), this, this); | 10287 CustomArguments args(isolate, interceptor->data(), this, this); |
10288 v8::AccessorInfo info(args.end()); | 10288 v8::AccessorInfo info(args.end()); |
10289 v8::Handle<v8::Value> result; | 10289 v8::Handle<v8::Value> result; |
10290 { | 10290 { |
10291 // Leaving JavaScript. | 10291 // Leaving JavaScript. |
10292 VMState state(isolate, EXTERNAL); | 10292 VMState<EXTERNAL> state(isolate); |
10293 result = setter(index, v8::Utils::ToLocal(value_handle), info); | 10293 result = setter(index, v8::Utils::ToLocal(value_handle), info); |
10294 } | 10294 } |
10295 RETURN_IF_SCHEDULED_EXCEPTION(isolate); | 10295 RETURN_IF_SCHEDULED_EXCEPTION(isolate); |
10296 if (!result.IsEmpty()) return *value_handle; | 10296 if (!result.IsEmpty()) return *value_handle; |
10297 } | 10297 } |
10298 MaybeObject* raw_result = | 10298 MaybeObject* raw_result = |
10299 this_handle->SetElementWithoutInterceptor(index, | 10299 this_handle->SetElementWithoutInterceptor(index, |
10300 *value_handle, | 10300 *value_handle, |
10301 attributes, | 10301 attributes, |
10302 strict_mode, | 10302 strict_mode, |
(...skipping 22 matching lines...) Expand all Loading... |
10325 Handle<JSObject> self(JSObject::cast(receiver)); | 10325 Handle<JSObject> self(JSObject::cast(receiver)); |
10326 Handle<JSObject> holder_handle(JSObject::cast(holder)); | 10326 Handle<JSObject> holder_handle(JSObject::cast(holder)); |
10327 Handle<Object> number = isolate->factory()->NewNumberFromUint(index); | 10327 Handle<Object> number = isolate->factory()->NewNumberFromUint(index); |
10328 Handle<String> key = isolate->factory()->NumberToString(number); | 10328 Handle<String> key = isolate->factory()->NumberToString(number); |
10329 LOG(isolate, ApiNamedPropertyAccess("load", *self, *key)); | 10329 LOG(isolate, ApiNamedPropertyAccess("load", *self, *key)); |
10330 CustomArguments args(isolate, data->data(), *self, *holder_handle); | 10330 CustomArguments args(isolate, data->data(), *self, *holder_handle); |
10331 v8::AccessorInfo info(args.end()); | 10331 v8::AccessorInfo info(args.end()); |
10332 v8::Handle<v8::Value> result; | 10332 v8::Handle<v8::Value> result; |
10333 { | 10333 { |
10334 // Leaving JavaScript. | 10334 // Leaving JavaScript. |
10335 VMState state(isolate, EXTERNAL); | 10335 VMState<EXTERNAL> state(isolate); |
10336 result = call_fun(v8::Utils::ToLocal(key), info); | 10336 result = call_fun(v8::Utils::ToLocal(key), info); |
10337 } | 10337 } |
10338 RETURN_IF_SCHEDULED_EXCEPTION(isolate); | 10338 RETURN_IF_SCHEDULED_EXCEPTION(isolate); |
10339 if (result.IsEmpty()) return isolate->heap()->undefined_value(); | 10339 if (result.IsEmpty()) return isolate->heap()->undefined_value(); |
10340 Handle<Object> result_internal = v8::Utils::OpenHandle(*result); | 10340 Handle<Object> result_internal = v8::Utils::OpenHandle(*result); |
10341 result_internal->VerifyApiCallResultType(); | 10341 result_internal->VerifyApiCallResultType(); |
10342 return *result_internal; | 10342 return *result_internal; |
10343 } | 10343 } |
10344 | 10344 |
10345 // __defineGetter__ callback | 10345 // __defineGetter__ callback |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10391 Object* call_obj = data->setter(); | 10391 Object* call_obj = data->setter(); |
10392 v8::AccessorSetter call_fun = v8::ToCData<v8::AccessorSetter>(call_obj); | 10392 v8::AccessorSetter call_fun = v8::ToCData<v8::AccessorSetter>(call_obj); |
10393 if (call_fun == NULL) return value; | 10393 if (call_fun == NULL) return value; |
10394 Handle<Object> number = isolate->factory()->NewNumberFromUint(index); | 10394 Handle<Object> number = isolate->factory()->NewNumberFromUint(index); |
10395 Handle<String> key(isolate->factory()->NumberToString(number)); | 10395 Handle<String> key(isolate->factory()->NumberToString(number)); |
10396 LOG(isolate, ApiNamedPropertyAccess("store", *self, *key)); | 10396 LOG(isolate, ApiNamedPropertyAccess("store", *self, *key)); |
10397 CustomArguments args(isolate, data->data(), *self, *holder_handle); | 10397 CustomArguments args(isolate, data->data(), *self, *holder_handle); |
10398 v8::AccessorInfo info(args.end()); | 10398 v8::AccessorInfo info(args.end()); |
10399 { | 10399 { |
10400 // Leaving JavaScript. | 10400 // Leaving JavaScript. |
10401 VMState state(isolate, EXTERNAL); | 10401 VMState<EXTERNAL> state(isolate); |
10402 call_fun(v8::Utils::ToLocal(key), | 10402 call_fun(v8::Utils::ToLocal(key), |
10403 v8::Utils::ToLocal(value_handle), | 10403 v8::Utils::ToLocal(value_handle), |
10404 info); | 10404 info); |
10405 } | 10405 } |
10406 RETURN_IF_SCHEDULED_EXCEPTION(isolate); | 10406 RETURN_IF_SCHEDULED_EXCEPTION(isolate); |
10407 return *value_handle; | 10407 return *value_handle; |
10408 } | 10408 } |
10409 | 10409 |
10410 if (structure->IsAccessorPair()) { | 10410 if (structure->IsAccessorPair()) { |
10411 Handle<Object> setter(AccessorPair::cast(structure)->setter(), isolate); | 10411 Handle<Object> setter(AccessorPair::cast(structure)->setter(), isolate); |
(...skipping 859 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11271 if (!interceptor->getter()->IsUndefined()) { | 11271 if (!interceptor->getter()->IsUndefined()) { |
11272 v8::IndexedPropertyGetter getter = | 11272 v8::IndexedPropertyGetter getter = |
11273 v8::ToCData<v8::IndexedPropertyGetter>(interceptor->getter()); | 11273 v8::ToCData<v8::IndexedPropertyGetter>(interceptor->getter()); |
11274 LOG(isolate, | 11274 LOG(isolate, |
11275 ApiIndexedPropertyAccess("interceptor-indexed-get", this, index)); | 11275 ApiIndexedPropertyAccess("interceptor-indexed-get", this, index)); |
11276 CustomArguments args(isolate, interceptor->data(), receiver, this); | 11276 CustomArguments args(isolate, interceptor->data(), receiver, this); |
11277 v8::AccessorInfo info(args.end()); | 11277 v8::AccessorInfo info(args.end()); |
11278 v8::Handle<v8::Value> result; | 11278 v8::Handle<v8::Value> result; |
11279 { | 11279 { |
11280 // Leaving JavaScript. | 11280 // Leaving JavaScript. |
11281 VMState state(isolate, EXTERNAL); | 11281 VMState<EXTERNAL> state(isolate); |
11282 result = getter(index, info); | 11282 result = getter(index, info); |
11283 } | 11283 } |
11284 RETURN_IF_SCHEDULED_EXCEPTION(isolate); | 11284 RETURN_IF_SCHEDULED_EXCEPTION(isolate); |
11285 if (!result.IsEmpty()) { | 11285 if (!result.IsEmpty()) { |
11286 Handle<Object> result_internal = v8::Utils::OpenHandle(*result); | 11286 Handle<Object> result_internal = v8::Utils::OpenHandle(*result); |
11287 result_internal->VerifyApiCallResultType(); | 11287 result_internal->VerifyApiCallResultType(); |
11288 return *result_internal; | 11288 return *result_internal; |
11289 } | 11289 } |
11290 } | 11290 } |
11291 | 11291 |
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11581 if (!interceptor->getter()->IsUndefined()) { | 11581 if (!interceptor->getter()->IsUndefined()) { |
11582 v8::NamedPropertyGetter getter = | 11582 v8::NamedPropertyGetter getter = |
11583 v8::ToCData<v8::NamedPropertyGetter>(interceptor->getter()); | 11583 v8::ToCData<v8::NamedPropertyGetter>(interceptor->getter()); |
11584 LOG(isolate, | 11584 LOG(isolate, |
11585 ApiNamedPropertyAccess("interceptor-named-get", *holder_handle, name)); | 11585 ApiNamedPropertyAccess("interceptor-named-get", *holder_handle, name)); |
11586 CustomArguments args(isolate, interceptor->data(), receiver, this); | 11586 CustomArguments args(isolate, interceptor->data(), receiver, this); |
11587 v8::AccessorInfo info(args.end()); | 11587 v8::AccessorInfo info(args.end()); |
11588 v8::Handle<v8::Value> result; | 11588 v8::Handle<v8::Value> result; |
11589 { | 11589 { |
11590 // Leaving JavaScript. | 11590 // Leaving JavaScript. |
11591 VMState state(isolate, EXTERNAL); | 11591 VMState<EXTERNAL> state(isolate); |
11592 result = getter(v8::Utils::ToLocal(name_handle), info); | 11592 result = getter(v8::Utils::ToLocal(name_handle), info); |
11593 } | 11593 } |
11594 RETURN_IF_SCHEDULED_EXCEPTION(isolate); | 11594 RETURN_IF_SCHEDULED_EXCEPTION(isolate); |
11595 if (!result.IsEmpty()) { | 11595 if (!result.IsEmpty()) { |
11596 *attributes = NONE; | 11596 *attributes = NONE; |
11597 Handle<Object> result_internal = v8::Utils::OpenHandle(*result); | 11597 Handle<Object> result_internal = v8::Utils::OpenHandle(*result); |
11598 result_internal->VerifyApiCallResultType(); | 11598 result_internal->VerifyApiCallResultType(); |
11599 return *result_internal; | 11599 return *result_internal; |
11600 } | 11600 } |
11601 } | 11601 } |
(...skipping 2927 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
14529 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER); | 14529 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER); |
14530 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER); | 14530 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER); |
14531 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER); | 14531 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER); |
14532 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER); | 14532 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER); |
14533 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER); | 14533 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER); |
14534 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER); | 14534 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER); |
14535 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER); | 14535 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER); |
14536 } | 14536 } |
14537 | 14537 |
14538 } } // namespace v8::internal | 14538 } } // namespace v8::internal |
OLD | NEW |