OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/api.h" | 7 #include "src/api.h" |
8 #include "src/arguments.h" | 8 #include "src/arguments.h" |
9 #include "src/ast.h" | 9 #include "src/ast.h" |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
(...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
599 } | 599 } |
600 | 600 |
601 | 601 |
602 RUNTIME_FUNCTION(StoreInterceptorProperty) { | 602 RUNTIME_FUNCTION(StoreInterceptorProperty) { |
603 HandleScope scope(isolate); | 603 HandleScope scope(isolate); |
604 ASSERT(args.length() == 3); | 604 ASSERT(args.length() == 3); |
605 StoreIC ic(IC::NO_EXTRA_FRAME, isolate); | 605 StoreIC ic(IC::NO_EXTRA_FRAME, isolate); |
606 Handle<JSObject> receiver = args.at<JSObject>(0); | 606 Handle<JSObject> receiver = args.at<JSObject>(0); |
607 Handle<Name> name = args.at<Name>(1); | 607 Handle<Name> name = args.at<Name>(1); |
608 Handle<Object> value = args.at<Object>(2); | 608 Handle<Object> value = args.at<Object>(2); |
609 ASSERT(receiver->HasNamedInterceptor()); | 609 #ifdef DEBUG |
| 610 if (receiver->IsJSGlobalProxy()) { |
| 611 PrototypeIterator iter(isolate, receiver); |
| 612 ASSERT(iter.IsAtEnd() || |
| 613 Handle<JSGlobalObject>::cast(PrototypeIterator::GetCurrent(iter)) |
| 614 ->HasNamedInterceptor()); |
| 615 } else { |
| 616 ASSERT(receiver->HasNamedInterceptor()); |
| 617 } |
| 618 #endif |
610 Handle<Object> result; | 619 Handle<Object> result; |
611 ASSIGN_RETURN_FAILURE_ON_EXCEPTION( | 620 ASSIGN_RETURN_FAILURE_ON_EXCEPTION( |
612 isolate, result, | 621 isolate, result, |
613 JSObject::SetProperty(receiver, name, value, ic.strict_mode())); | 622 JSObject::SetProperty(receiver, name, value, ic.strict_mode())); |
614 return *result; | 623 return *result; |
615 } | 624 } |
616 | 625 |
617 | 626 |
618 RUNTIME_FUNCTION(KeyedLoadPropertyWithInterceptor) { | 627 RUNTIME_FUNCTION(KeyedLoadPropertyWithInterceptor) { |
619 HandleScope scope(isolate); | 628 HandleScope scope(isolate); |
(...skipping 813 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1433 Handle<FunctionTemplateInfo>( | 1442 Handle<FunctionTemplateInfo>( |
1434 FunctionTemplateInfo::cast(signature->receiver())); | 1443 FunctionTemplateInfo::cast(signature->receiver())); |
1435 } | 1444 } |
1436 } | 1445 } |
1437 | 1446 |
1438 is_simple_api_call_ = true; | 1447 is_simple_api_call_ = true; |
1439 } | 1448 } |
1440 | 1449 |
1441 | 1450 |
1442 } } // namespace v8::internal | 1451 } } // namespace v8::internal |
OLD | NEW |