Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(19)

Side by Side Diff: src/objects.cc

Issue 4888002: [Isolates] Pass isolate to VMState constructor. (Closed)
Patch Set: Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/log.h ('k') | src/stub-cache.cc » ('j') | src/top.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 HandleScope scope; 181 HandleScope scope;
182 JSObject* self = JSObject::cast(receiver); 182 JSObject* self = JSObject::cast(receiver);
183 JSObject* holder_handle = JSObject::cast(holder); 183 JSObject* holder_handle = JSObject::cast(holder);
184 Handle<String> key(name); 184 Handle<String> key(name);
185 LOG(ApiNamedPropertyAccess("load", self, name)); 185 LOG(ApiNamedPropertyAccess("load", self, name));
186 CustomArguments args(isolate, data->data(), self, holder_handle); 186 CustomArguments args(isolate, data->data(), self, holder_handle);
187 v8::AccessorInfo info(args.end()); 187 v8::AccessorInfo info(args.end());
188 v8::Handle<v8::Value> result; 188 v8::Handle<v8::Value> result;
189 { 189 {
190 // Leaving JavaScript. 190 // Leaving JavaScript.
191 VMState state(EXTERNAL); 191 VMState state(isolate, EXTERNAL);
192 result = call_fun(v8::Utils::ToLocal(key), info); 192 result = call_fun(v8::Utils::ToLocal(key), info);
193 } 193 }
194 RETURN_IF_SCHEDULED_EXCEPTION(); 194 RETURN_IF_SCHEDULED_EXCEPTION();
195 if (result.IsEmpty()) { 195 if (result.IsEmpty()) {
196 return isolate->heap()->undefined_value(); 196 return isolate->heap()->undefined_value();
197 } 197 }
198 return *v8::Utils::OpenHandle(*result); 198 return *v8::Utils::OpenHandle(*result);
199 } 199 }
200 200
201 // __defineGetter__ callback 201 // __defineGetter__ callback
(...skipping 1389 matching lines...) Expand 10 before | Expand all | Expand 10 after
1591 Handle<InterceptorInfo> interceptor(GetNamedInterceptor()); 1591 Handle<InterceptorInfo> interceptor(GetNamedInterceptor());
1592 if (!interceptor->setter()->IsUndefined()) { 1592 if (!interceptor->setter()->IsUndefined()) {
1593 LOG(ApiNamedPropertyAccess("interceptor-named-set", this, name)); 1593 LOG(ApiNamedPropertyAccess("interceptor-named-set", this, name));
1594 CustomArguments args(isolate, interceptor->data(), this, this); 1594 CustomArguments args(isolate, interceptor->data(), this, this);
1595 v8::AccessorInfo info(args.end()); 1595 v8::AccessorInfo info(args.end());
1596 v8::NamedPropertySetter setter = 1596 v8::NamedPropertySetter setter =
1597 v8::ToCData<v8::NamedPropertySetter>(interceptor->setter()); 1597 v8::ToCData<v8::NamedPropertySetter>(interceptor->setter());
1598 v8::Handle<v8::Value> result; 1598 v8::Handle<v8::Value> result;
1599 { 1599 {
1600 // Leaving JavaScript. 1600 // Leaving JavaScript.
1601 VMState state(EXTERNAL); 1601 VMState state(isolate, EXTERNAL);
1602 Handle<Object> value_unhole(value->IsTheHole() ? 1602 Handle<Object> value_unhole(value->IsTheHole() ?
1603 isolate->heap()->undefined_value() : 1603 isolate->heap()->undefined_value() :
1604 value, 1604 value,
1605 isolate); 1605 isolate);
1606 result = setter(v8::Utils::ToLocal(name_handle), 1606 result = setter(v8::Utils::ToLocal(name_handle),
1607 v8::Utils::ToLocal(value_unhole), 1607 v8::Utils::ToLocal(value_unhole),
1608 info); 1608 info);
1609 } 1609 }
1610 RETURN_IF_SCHEDULED_EXCEPTION(); 1610 RETURN_IF_SCHEDULED_EXCEPTION();
1611 if (!result.IsEmpty()) return *value_handle; 1611 if (!result.IsEmpty()) return *value_handle;
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
1657 AccessorInfo* data = AccessorInfo::cast(structure); 1657 AccessorInfo* data = AccessorInfo::cast(structure);
1658 Object* call_obj = data->setter(); 1658 Object* call_obj = data->setter();
1659 v8::AccessorSetter call_fun = v8::ToCData<v8::AccessorSetter>(call_obj); 1659 v8::AccessorSetter call_fun = v8::ToCData<v8::AccessorSetter>(call_obj);
1660 if (call_fun == NULL) return value; 1660 if (call_fun == NULL) return value;
1661 Handle<String> key(name); 1661 Handle<String> key(name);
1662 LOG(ApiNamedPropertyAccess("store", this, name)); 1662 LOG(ApiNamedPropertyAccess("store", this, name));
1663 CustomArguments args(isolate, data->data(), this, JSObject::cast(holder)); 1663 CustomArguments args(isolate, data->data(), this, JSObject::cast(holder));
1664 v8::AccessorInfo info(args.end()); 1664 v8::AccessorInfo info(args.end());
1665 { 1665 {
1666 // Leaving JavaScript. 1666 // Leaving JavaScript.
1667 VMState state(EXTERNAL); 1667 VMState state(isolate, EXTERNAL);
1668 call_fun(v8::Utils::ToLocal(key), 1668 call_fun(v8::Utils::ToLocal(key),
1669 v8::Utils::ToLocal(value_handle), 1669 v8::Utils::ToLocal(value_handle),
1670 info); 1670 info);
1671 } 1671 }
1672 RETURN_IF_SCHEDULED_EXCEPTION(); 1672 RETURN_IF_SCHEDULED_EXCEPTION();
1673 return *value_handle; 1673 return *value_handle;
1674 } 1674 }
1675 1675
1676 if (structure->IsFixedArray()) { 1676 if (structure->IsFixedArray()) {
1677 Object* setter = FixedArray::cast(structure)->get(kSetterIndex); 1677 Object* setter = FixedArray::cast(structure)->get(kSetterIndex);
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after
2113 Handle<String> name_handle(name); 2113 Handle<String> name_handle(name);
2114 CustomArguments args(isolate, interceptor->data(), receiver, this); 2114 CustomArguments args(isolate, interceptor->data(), receiver, this);
2115 v8::AccessorInfo info(args.end()); 2115 v8::AccessorInfo info(args.end());
2116 if (!interceptor->query()->IsUndefined()) { 2116 if (!interceptor->query()->IsUndefined()) {
2117 v8::NamedPropertyQuery query = 2117 v8::NamedPropertyQuery query =
2118 v8::ToCData<v8::NamedPropertyQuery>(interceptor->query()); 2118 v8::ToCData<v8::NamedPropertyQuery>(interceptor->query());
2119 LOG(ApiNamedPropertyAccess("interceptor-named-has", *holder_handle, name)); 2119 LOG(ApiNamedPropertyAccess("interceptor-named-has", *holder_handle, name));
2120 v8::Handle<v8::Integer> result; 2120 v8::Handle<v8::Integer> result;
2121 { 2121 {
2122 // Leaving JavaScript. 2122 // Leaving JavaScript.
2123 VMState state(EXTERNAL); 2123 VMState state(isolate, EXTERNAL);
2124 result = query(v8::Utils::ToLocal(name_handle), info); 2124 result = query(v8::Utils::ToLocal(name_handle), info);
2125 } 2125 }
2126 if (!result.IsEmpty()) { 2126 if (!result.IsEmpty()) {
2127 ASSERT(result->IsInt32()); 2127 ASSERT(result->IsInt32());
2128 return static_cast<PropertyAttributes>(result->Int32Value()); 2128 return static_cast<PropertyAttributes>(result->Int32Value());
2129 } 2129 }
2130 } else if (!interceptor->getter()->IsUndefined()) { 2130 } else if (!interceptor->getter()->IsUndefined()) {
2131 v8::NamedPropertyGetter getter = 2131 v8::NamedPropertyGetter getter =
2132 v8::ToCData<v8::NamedPropertyGetter>(interceptor->getter()); 2132 v8::ToCData<v8::NamedPropertyGetter>(interceptor->getter());
2133 LOG(ApiNamedPropertyAccess("interceptor-named-get-has", this, name)); 2133 LOG(ApiNamedPropertyAccess("interceptor-named-get-has", this, name));
2134 v8::Handle<v8::Value> result; 2134 v8::Handle<v8::Value> result;
2135 { 2135 {
2136 // Leaving JavaScript. 2136 // Leaving JavaScript.
2137 VMState state(EXTERNAL); 2137 VMState state(isolate, EXTERNAL);
2138 result = getter(v8::Utils::ToLocal(name_handle), info); 2138 result = getter(v8::Utils::ToLocal(name_handle), info);
2139 } 2139 }
2140 if (!result.IsEmpty()) return DONT_ENUM; 2140 if (!result.IsEmpty()) return DONT_ENUM;
2141 } 2141 }
2142 return holder_handle->GetPropertyAttributePostInterceptor(*receiver_handle, 2142 return holder_handle->GetPropertyAttributePostInterceptor(*receiver_handle,
2143 *name_handle, 2143 *name_handle,
2144 continue_search); 2144 continue_search);
2145 } 2145 }
2146 2146
2147 2147
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after
2500 Handle<JSObject> this_handle(this); 2500 Handle<JSObject> this_handle(this);
2501 if (!interceptor->deleter()->IsUndefined()) { 2501 if (!interceptor->deleter()->IsUndefined()) {
2502 v8::NamedPropertyDeleter deleter = 2502 v8::NamedPropertyDeleter deleter =
2503 v8::ToCData<v8::NamedPropertyDeleter>(interceptor->deleter()); 2503 v8::ToCData<v8::NamedPropertyDeleter>(interceptor->deleter());
2504 LOG(ApiNamedPropertyAccess("interceptor-named-delete", *this_handle, name)); 2504 LOG(ApiNamedPropertyAccess("interceptor-named-delete", *this_handle, name));
2505 CustomArguments args(isolate, interceptor->data(), this, this); 2505 CustomArguments args(isolate, interceptor->data(), this, this);
2506 v8::AccessorInfo info(args.end()); 2506 v8::AccessorInfo info(args.end());
2507 v8::Handle<v8::Boolean> result; 2507 v8::Handle<v8::Boolean> result;
2508 { 2508 {
2509 // Leaving JavaScript. 2509 // Leaving JavaScript.
2510 VMState state(EXTERNAL); 2510 VMState state(isolate, EXTERNAL);
2511 result = deleter(v8::Utils::ToLocal(name_handle), info); 2511 result = deleter(v8::Utils::ToLocal(name_handle), info);
2512 } 2512 }
2513 RETURN_IF_SCHEDULED_EXCEPTION(); 2513 RETURN_IF_SCHEDULED_EXCEPTION();
2514 if (!result.IsEmpty()) { 2514 if (!result.IsEmpty()) {
2515 ASSERT(result->IsBoolean()); 2515 ASSERT(result->IsBoolean());
2516 return *v8::Utils::OpenHandle(*result); 2516 return *v8::Utils::OpenHandle(*result);
2517 } 2517 }
2518 } 2518 }
2519 MaybeObject* raw_result = 2519 MaybeObject* raw_result =
2520 this_handle->DeletePropertyPostInterceptor(*name_handle, NORMAL_DELETION); 2520 this_handle->DeletePropertyPostInterceptor(*name_handle, NORMAL_DELETION);
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
2568 if (interceptor->deleter()->IsUndefined()) return heap->false_value(); 2568 if (interceptor->deleter()->IsUndefined()) return heap->false_value();
2569 v8::IndexedPropertyDeleter deleter = 2569 v8::IndexedPropertyDeleter deleter =
2570 v8::ToCData<v8::IndexedPropertyDeleter>(interceptor->deleter()); 2570 v8::ToCData<v8::IndexedPropertyDeleter>(interceptor->deleter());
2571 Handle<JSObject> this_handle(this); 2571 Handle<JSObject> this_handle(this);
2572 LOG(ApiIndexedPropertyAccess("interceptor-indexed-delete", this, index)); 2572 LOG(ApiIndexedPropertyAccess("interceptor-indexed-delete", this, index));
2573 CustomArguments args(isolate, interceptor->data(), this, this); 2573 CustomArguments args(isolate, interceptor->data(), this, this);
2574 v8::AccessorInfo info(args.end()); 2574 v8::AccessorInfo info(args.end());
2575 v8::Handle<v8::Boolean> result; 2575 v8::Handle<v8::Boolean> result;
2576 { 2576 {
2577 // Leaving JavaScript. 2577 // Leaving JavaScript.
2578 VMState state(EXTERNAL); 2578 VMState state(isolate, EXTERNAL);
2579 result = deleter(index, info); 2579 result = deleter(index, info);
2580 } 2580 }
2581 RETURN_IF_SCHEDULED_EXCEPTION(); 2581 RETURN_IF_SCHEDULED_EXCEPTION();
2582 if (!result.IsEmpty()) { 2582 if (!result.IsEmpty()) {
2583 ASSERT(result->IsBoolean()); 2583 ASSERT(result->IsBoolean());
2584 return *v8::Utils::OpenHandle(*result); 2584 return *v8::Utils::OpenHandle(*result);
2585 } 2585 }
2586 MaybeObject* raw_result = 2586 MaybeObject* raw_result =
2587 this_handle->DeleteElementPostInterceptor(index, NORMAL_DELETION); 2587 this_handle->DeleteElementPostInterceptor(index, NORMAL_DELETION);
2588 RETURN_IF_SCHEDULED_EXCEPTION(); 2588 RETURN_IF_SCHEDULED_EXCEPTION();
(...skipping 3756 matching lines...) Expand 10 before | Expand all | Expand 10 after
6345 Handle<JSObject> holder_handle(this); 6345 Handle<JSObject> holder_handle(this);
6346 CustomArguments args(isolate, interceptor->data(), receiver, this); 6346 CustomArguments args(isolate, interceptor->data(), receiver, this);
6347 v8::AccessorInfo info(args.end()); 6347 v8::AccessorInfo info(args.end());
6348 if (!interceptor->query()->IsUndefined()) { 6348 if (!interceptor->query()->IsUndefined()) {
6349 v8::IndexedPropertyQuery query = 6349 v8::IndexedPropertyQuery query =
6350 v8::ToCData<v8::IndexedPropertyQuery>(interceptor->query()); 6350 v8::ToCData<v8::IndexedPropertyQuery>(interceptor->query());
6351 LOG(ApiIndexedPropertyAccess("interceptor-indexed-has", this, index)); 6351 LOG(ApiIndexedPropertyAccess("interceptor-indexed-has", this, index));
6352 v8::Handle<v8::Integer> result; 6352 v8::Handle<v8::Integer> result;
6353 { 6353 {
6354 // Leaving JavaScript. 6354 // Leaving JavaScript.
6355 VMState state(EXTERNAL); 6355 VMState state(isolate, EXTERNAL);
6356 result = query(index, info); 6356 result = query(index, info);
6357 } 6357 }
6358 if (!result.IsEmpty()) { 6358 if (!result.IsEmpty()) {
6359 ASSERT(result->IsInt32()); 6359 ASSERT(result->IsInt32());
6360 return true; // absence of property is signaled by empty handle. 6360 return true; // absence of property is signaled by empty handle.
6361 } 6361 }
6362 } else if (!interceptor->getter()->IsUndefined()) { 6362 } else if (!interceptor->getter()->IsUndefined()) {
6363 v8::IndexedPropertyGetter getter = 6363 v8::IndexedPropertyGetter getter =
6364 v8::ToCData<v8::IndexedPropertyGetter>(interceptor->getter()); 6364 v8::ToCData<v8::IndexedPropertyGetter>(interceptor->getter());
6365 LOG(ApiIndexedPropertyAccess("interceptor-indexed-has-get", this, index)); 6365 LOG(ApiIndexedPropertyAccess("interceptor-indexed-has-get", this, index));
6366 v8::Handle<v8::Value> result; 6366 v8::Handle<v8::Value> result;
6367 { 6367 {
6368 // Leaving JavaScript. 6368 // Leaving JavaScript.
6369 VMState state(EXTERNAL); 6369 VMState state(isolate, EXTERNAL);
6370 result = getter(index, info); 6370 result = getter(index, info);
6371 } 6371 }
6372 if (!result.IsEmpty()) return true; 6372 if (!result.IsEmpty()) return true;
6373 } 6373 }
6374 return holder_handle->HasElementPostInterceptor(*receiver_handle, index); 6374 return holder_handle->HasElementPostInterceptor(*receiver_handle, index);
6375 } 6375 }
6376 6376
6377 6377
6378 JSObject::LocalElementType JSObject::HasLocalElement(uint32_t index) { 6378 JSObject::LocalElementType JSObject::HasLocalElement(uint32_t index) {
6379 Heap* heap = GetHeap(); 6379 Heap* heap = GetHeap();
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
6518 Handle<Object> value_handle(value, isolate); 6518 Handle<Object> value_handle(value, isolate);
6519 if (!interceptor->setter()->IsUndefined()) { 6519 if (!interceptor->setter()->IsUndefined()) {
6520 v8::IndexedPropertySetter setter = 6520 v8::IndexedPropertySetter setter =
6521 v8::ToCData<v8::IndexedPropertySetter>(interceptor->setter()); 6521 v8::ToCData<v8::IndexedPropertySetter>(interceptor->setter());
6522 LOG(ApiIndexedPropertyAccess("interceptor-indexed-set", this, index)); 6522 LOG(ApiIndexedPropertyAccess("interceptor-indexed-set", this, index));
6523 CustomArguments args(isolate, interceptor->data(), this, this); 6523 CustomArguments args(isolate, interceptor->data(), this, this);
6524 v8::AccessorInfo info(args.end()); 6524 v8::AccessorInfo info(args.end());
6525 v8::Handle<v8::Value> result; 6525 v8::Handle<v8::Value> result;
6526 { 6526 {
6527 // Leaving JavaScript. 6527 // Leaving JavaScript.
6528 VMState state(EXTERNAL); 6528 VMState state(isolate, EXTERNAL);
6529 result = setter(index, v8::Utils::ToLocal(value_handle), info); 6529 result = setter(index, v8::Utils::ToLocal(value_handle), info);
6530 } 6530 }
6531 RETURN_IF_SCHEDULED_EXCEPTION(); 6531 RETURN_IF_SCHEDULED_EXCEPTION();
6532 if (!result.IsEmpty()) return *value_handle; 6532 if (!result.IsEmpty()) return *value_handle;
6533 } 6533 }
6534 MaybeObject* raw_result = 6534 MaybeObject* raw_result =
6535 this_handle->SetElementWithoutInterceptor(index, *value_handle); 6535 this_handle->SetElementWithoutInterceptor(index, *value_handle);
6536 RETURN_IF_SCHEDULED_EXCEPTION(); 6536 RETURN_IF_SCHEDULED_EXCEPTION();
6537 return raw_result; 6537 return raw_result;
6538 } 6538 }
(...skipping 15 matching lines...) Expand all
6554 Handle<JSObject> self(JSObject::cast(receiver)); 6554 Handle<JSObject> self(JSObject::cast(receiver));
6555 Handle<JSObject> holder_handle(JSObject::cast(holder)); 6555 Handle<JSObject> holder_handle(JSObject::cast(holder));
6556 Handle<Object> number = isolate->factory()->NewNumberFromUint(index); 6556 Handle<Object> number = isolate->factory()->NewNumberFromUint(index);
6557 Handle<String> key(isolate->factory()->NumberToString(number)); 6557 Handle<String> key(isolate->factory()->NumberToString(number));
6558 LOG(ApiNamedPropertyAccess("load", *self, *key)); 6558 LOG(ApiNamedPropertyAccess("load", *self, *key));
6559 CustomArguments args(isolate, data->data(), *self, *holder_handle); 6559 CustomArguments args(isolate, data->data(), *self, *holder_handle);
6560 v8::AccessorInfo info(args.end()); 6560 v8::AccessorInfo info(args.end());
6561 v8::Handle<v8::Value> result; 6561 v8::Handle<v8::Value> result;
6562 { 6562 {
6563 // Leaving JavaScript. 6563 // Leaving JavaScript.
6564 VMState state(EXTERNAL); 6564 VMState state(isolate, EXTERNAL);
6565 result = call_fun(v8::Utils::ToLocal(key), info); 6565 result = call_fun(v8::Utils::ToLocal(key), info);
6566 } 6566 }
6567 RETURN_IF_SCHEDULED_EXCEPTION(); 6567 RETURN_IF_SCHEDULED_EXCEPTION();
6568 if (result.IsEmpty()) return isolate->heap()->undefined_value(); 6568 if (result.IsEmpty()) return isolate->heap()->undefined_value();
6569 return *v8::Utils::OpenHandle(*result); 6569 return *v8::Utils::OpenHandle(*result);
6570 } 6570 }
6571 6571
6572 // __defineGetter__ callback 6572 // __defineGetter__ callback
6573 if (structure->IsFixedArray()) { 6573 if (structure->IsFixedArray()) {
6574 Object* getter = FixedArray::cast(structure)->get(kGetterIndex); 6574 Object* getter = FixedArray::cast(structure)->get(kGetterIndex);
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
6608 Object* call_obj = data->setter(); 6608 Object* call_obj = data->setter();
6609 v8::AccessorSetter call_fun = v8::ToCData<v8::AccessorSetter>(call_obj); 6609 v8::AccessorSetter call_fun = v8::ToCData<v8::AccessorSetter>(call_obj);
6610 if (call_fun == NULL) return value; 6610 if (call_fun == NULL) return value;
6611 Handle<Object> number = isolate->factory()->NewNumberFromUint(index); 6611 Handle<Object> number = isolate->factory()->NewNumberFromUint(index);
6612 Handle<String> key(isolate->factory()->NumberToString(number)); 6612 Handle<String> key(isolate->factory()->NumberToString(number));
6613 LOG(ApiNamedPropertyAccess("store", this, *key)); 6613 LOG(ApiNamedPropertyAccess("store", this, *key));
6614 CustomArguments args(isolate, data->data(), this, JSObject::cast(holder)); 6614 CustomArguments args(isolate, data->data(), this, JSObject::cast(holder));
6615 v8::AccessorInfo info(args.end()); 6615 v8::AccessorInfo info(args.end());
6616 { 6616 {
6617 // Leaving JavaScript. 6617 // Leaving JavaScript.
6618 VMState state(EXTERNAL); 6618 VMState state(isolate, EXTERNAL);
6619 call_fun(v8::Utils::ToLocal(key), 6619 call_fun(v8::Utils::ToLocal(key),
6620 v8::Utils::ToLocal(value_handle), 6620 v8::Utils::ToLocal(value_handle),
6621 info); 6621 info);
6622 } 6622 }
6623 RETURN_IF_SCHEDULED_EXCEPTION(); 6623 RETURN_IF_SCHEDULED_EXCEPTION();
6624 return *value_handle; 6624 return *value_handle;
6625 } 6625 }
6626 6626
6627 if (structure->IsFixedArray()) { 6627 if (structure->IsFixedArray()) {
6628 Object* setter = FixedArray::cast(structure)->get(kSetterIndex); 6628 Object* setter = FixedArray::cast(structure)->get(kSetterIndex);
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
6948 6948
6949 if (!interceptor->getter()->IsUndefined()) { 6949 if (!interceptor->getter()->IsUndefined()) {
6950 v8::IndexedPropertyGetter getter = 6950 v8::IndexedPropertyGetter getter =
6951 v8::ToCData<v8::IndexedPropertyGetter>(interceptor->getter()); 6951 v8::ToCData<v8::IndexedPropertyGetter>(interceptor->getter());
6952 LOG(ApiIndexedPropertyAccess("interceptor-indexed-get", this, index)); 6952 LOG(ApiIndexedPropertyAccess("interceptor-indexed-get", this, index));
6953 CustomArguments args(isolate, interceptor->data(), receiver, this); 6953 CustomArguments args(isolate, interceptor->data(), receiver, this);
6954 v8::AccessorInfo info(args.end()); 6954 v8::AccessorInfo info(args.end());
6955 v8::Handle<v8::Value> result; 6955 v8::Handle<v8::Value> result;
6956 { 6956 {
6957 // Leaving JavaScript. 6957 // Leaving JavaScript.
6958 VMState state(EXTERNAL); 6958 VMState state(isolate, EXTERNAL);
6959 result = getter(index, info); 6959 result = getter(index, info);
6960 } 6960 }
6961 RETURN_IF_SCHEDULED_EXCEPTION(); 6961 RETURN_IF_SCHEDULED_EXCEPTION();
6962 if (!result.IsEmpty()) return *v8::Utils::OpenHandle(*result); 6962 if (!result.IsEmpty()) return *v8::Utils::OpenHandle(*result);
6963 } 6963 }
6964 6964
6965 MaybeObject* raw_result = 6965 MaybeObject* raw_result =
6966 holder_handle->GetElementPostInterceptor(*this_handle, index); 6966 holder_handle->GetElementPostInterceptor(*this_handle, index);
6967 RETURN_IF_SCHEDULED_EXCEPTION(); 6967 RETURN_IF_SCHEDULED_EXCEPTION();
6968 return raw_result; 6968 return raw_result;
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
7269 7269
7270 if (!interceptor->getter()->IsUndefined()) { 7270 if (!interceptor->getter()->IsUndefined()) {
7271 v8::NamedPropertyGetter getter = 7271 v8::NamedPropertyGetter getter =
7272 v8::ToCData<v8::NamedPropertyGetter>(interceptor->getter()); 7272 v8::ToCData<v8::NamedPropertyGetter>(interceptor->getter());
7273 LOG(ApiNamedPropertyAccess("interceptor-named-get", *holder_handle, name)); 7273 LOG(ApiNamedPropertyAccess("interceptor-named-get", *holder_handle, name));
7274 CustomArguments args(isolate, interceptor->data(), receiver, this); 7274 CustomArguments args(isolate, interceptor->data(), receiver, this);
7275 v8::AccessorInfo info(args.end()); 7275 v8::AccessorInfo info(args.end());
7276 v8::Handle<v8::Value> result; 7276 v8::Handle<v8::Value> result;
7277 { 7277 {
7278 // Leaving JavaScript. 7278 // Leaving JavaScript.
7279 VMState state(EXTERNAL); 7279 VMState state(isolate, EXTERNAL);
7280 result = getter(v8::Utils::ToLocal(name_handle), info); 7280 result = getter(v8::Utils::ToLocal(name_handle), info);
7281 } 7281 }
7282 RETURN_IF_SCHEDULED_EXCEPTION(); 7282 RETURN_IF_SCHEDULED_EXCEPTION();
7283 if (!result.IsEmpty()) { 7283 if (!result.IsEmpty()) {
7284 *attributes = NONE; 7284 *attributes = NONE;
7285 return *v8::Utils::OpenHandle(*result); 7285 return *v8::Utils::OpenHandle(*result);
7286 } 7286 }
7287 } 7287 }
7288 7288
7289 MaybeObject* result = holder_handle->GetPropertyPostInterceptor( 7289 MaybeObject* result = holder_handle->GetPropertyPostInterceptor(
(...skipping 2156 matching lines...) Expand 10 before | Expand all | Expand 10 after
9446 if (break_point_objects()->IsUndefined()) return 0; 9446 if (break_point_objects()->IsUndefined()) return 0;
9447 // Single beak point. 9447 // Single beak point.
9448 if (!break_point_objects()->IsFixedArray()) return 1; 9448 if (!break_point_objects()->IsFixedArray()) return 1;
9449 // Multiple break points. 9449 // Multiple break points.
9450 return FixedArray::cast(break_point_objects())->length(); 9450 return FixedArray::cast(break_point_objects())->length();
9451 } 9451 }
9452 #endif 9452 #endif
9453 9453
9454 9454
9455 } } // namespace v8::internal 9455 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/log.h ('k') | src/stub-cache.cc » ('j') | src/top.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698