OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <iomanip> | 5 #include <iomanip> |
6 #include <sstream> | 6 #include <sstream> |
7 | 7 |
8 #include "src/v8.h" | 8 #include "src/v8.h" |
9 | 9 |
10 #include "src/accessors.h" | 10 #include "src/accessors.h" |
(...skipping 4272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4283 Handle<Name> name = it->name(); | 4283 Handle<Name> name = it->name(); |
4284 v8::GenericNamedPropertyQueryCallback query = | 4284 v8::GenericNamedPropertyQueryCallback query = |
4285 v8::ToCData<v8::GenericNamedPropertyQueryCallback>( | 4285 v8::ToCData<v8::GenericNamedPropertyQueryCallback>( |
4286 interceptor->query()); | 4286 interceptor->query()); |
4287 LOG(isolate, | 4287 LOG(isolate, |
4288 ApiNamedPropertyAccess("interceptor-named-has", *holder, *name)); | 4288 ApiNamedPropertyAccess("interceptor-named-has", *holder, *name)); |
4289 result = args.Call(query, v8::Utils::ToLocal(name)); | 4289 result = args.Call(query, v8::Utils::ToLocal(name)); |
4290 } | 4290 } |
4291 if (!result.IsEmpty()) { | 4291 if (!result.IsEmpty()) { |
4292 DCHECK(result->IsInt32()); | 4292 DCHECK(result->IsInt32()); |
4293 return Just(static_cast<PropertyAttributes>(result->Int32Value())); | 4293 return Just(static_cast<PropertyAttributes>( |
| 4294 result->Int32Value(reinterpret_cast<v8::Isolate*>(isolate) |
| 4295 ->GetCurrentContext()).FromJust())); |
4294 } | 4296 } |
4295 } else if (!interceptor->getter()->IsUndefined()) { | 4297 } else if (!interceptor->getter()->IsUndefined()) { |
4296 // TODO(verwaest): Use GetPropertyWithInterceptor? | 4298 // TODO(verwaest): Use GetPropertyWithInterceptor? |
4297 v8::Handle<v8::Value> result; | 4299 v8::Handle<v8::Value> result; |
4298 if (it->IsElement()) { | 4300 if (it->IsElement()) { |
4299 uint32_t index = it->index(); | 4301 uint32_t index = it->index(); |
4300 v8::IndexedPropertyGetterCallback getter = | 4302 v8::IndexedPropertyGetterCallback getter = |
4301 v8::ToCData<v8::IndexedPropertyGetterCallback>(interceptor->getter()); | 4303 v8::ToCData<v8::IndexedPropertyGetterCallback>(interceptor->getter()); |
4302 LOG(isolate, ApiIndexedPropertyAccess("interceptor-indexed-get-has", | 4304 LOG(isolate, ApiIndexedPropertyAccess("interceptor-indexed-get-has", |
4303 *holder, index)); | 4305 *holder, index)); |
(...skipping 12688 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
16992 Handle<Object> new_value) { | 16994 Handle<Object> new_value) { |
16993 if (cell->value() != *new_value) { | 16995 if (cell->value() != *new_value) { |
16994 cell->set_value(*new_value); | 16996 cell->set_value(*new_value); |
16995 Isolate* isolate = cell->GetIsolate(); | 16997 Isolate* isolate = cell->GetIsolate(); |
16996 cell->dependent_code()->DeoptimizeDependentCodeGroup( | 16998 cell->dependent_code()->DeoptimizeDependentCodeGroup( |
16997 isolate, DependentCode::kPropertyCellChangedGroup); | 16999 isolate, DependentCode::kPropertyCellChangedGroup); |
16998 } | 17000 } |
16999 } | 17001 } |
17000 } // namespace internal | 17002 } // namespace internal |
17001 } // namespace v8 | 17003 } // namespace v8 |
OLD | NEW |