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

Side by Side Diff: src/handles.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/global-handles.cc ('k') | src/heap.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 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 643 matching lines...) Expand 10 before | Expand all | Expand 10 after
654 654
655 655
656 void CustomArguments::IterateInstance(ObjectVisitor* v) { 656 void CustomArguments::IterateInstance(ObjectVisitor* v) {
657 v->VisitPointers(values_, values_ + ARRAY_SIZE(values_)); 657 v->VisitPointers(values_, values_ + ARRAY_SIZE(values_));
658 } 658 }
659 659
660 660
661 // Compute the property keys from the interceptor. 661 // Compute the property keys from the interceptor.
662 v8::Handle<v8::Array> GetKeysForNamedInterceptor(Handle<JSObject> receiver, 662 v8::Handle<v8::Array> GetKeysForNamedInterceptor(Handle<JSObject> receiver,
663 Handle<JSObject> object) { 663 Handle<JSObject> object) {
664 Isolate* isolate = receiver->GetIsolate();
664 Handle<InterceptorInfo> interceptor(object->GetNamedInterceptor()); 665 Handle<InterceptorInfo> interceptor(object->GetNamedInterceptor());
665 CustomArguments args(receiver->GetIsolate(), 666 CustomArguments args(isolate, interceptor->data(), *receiver, *object);
666 interceptor->data(), *receiver, *object);
667 v8::AccessorInfo info(args.end()); 667 v8::AccessorInfo info(args.end());
668 v8::Handle<v8::Array> result; 668 v8::Handle<v8::Array> result;
669 if (!interceptor->enumerator()->IsUndefined()) { 669 if (!interceptor->enumerator()->IsUndefined()) {
670 v8::NamedPropertyEnumerator enum_fun = 670 v8::NamedPropertyEnumerator enum_fun =
671 v8::ToCData<v8::NamedPropertyEnumerator>(interceptor->enumerator()); 671 v8::ToCData<v8::NamedPropertyEnumerator>(interceptor->enumerator());
672 LOG(ApiObjectAccess("interceptor-named-enum", *object)); 672 LOG(ApiObjectAccess("interceptor-named-enum", *object));
673 { 673 {
674 // Leaving JavaScript. 674 // Leaving JavaScript.
675 VMState state(EXTERNAL); 675 VMState state(isolate, EXTERNAL);
676 result = enum_fun(info); 676 result = enum_fun(info);
677 } 677 }
678 } 678 }
679 return result; 679 return result;
680 } 680 }
681 681
682 682
683 // Compute the element keys from the interceptor. 683 // Compute the element keys from the interceptor.
684 v8::Handle<v8::Array> GetKeysForIndexedInterceptor(Handle<JSObject> receiver, 684 v8::Handle<v8::Array> GetKeysForIndexedInterceptor(Handle<JSObject> receiver,
685 Handle<JSObject> object) { 685 Handle<JSObject> object) {
686 Isolate* isolate = receiver->GetIsolate();
686 Handle<InterceptorInfo> interceptor(object->GetIndexedInterceptor()); 687 Handle<InterceptorInfo> interceptor(object->GetIndexedInterceptor());
687 CustomArguments args(receiver->GetIsolate(), 688 CustomArguments args(isolate, interceptor->data(), *receiver, *object);
688 interceptor->data(), *receiver, *object);
689 v8::AccessorInfo info(args.end()); 689 v8::AccessorInfo info(args.end());
690 v8::Handle<v8::Array> result; 690 v8::Handle<v8::Array> result;
691 if (!interceptor->enumerator()->IsUndefined()) { 691 if (!interceptor->enumerator()->IsUndefined()) {
692 v8::IndexedPropertyEnumerator enum_fun = 692 v8::IndexedPropertyEnumerator enum_fun =
693 v8::ToCData<v8::IndexedPropertyEnumerator>(interceptor->enumerator()); 693 v8::ToCData<v8::IndexedPropertyEnumerator>(interceptor->enumerator());
694 LOG(ApiObjectAccess("interceptor-indexed-enum", *object)); 694 LOG(ApiObjectAccess("interceptor-indexed-enum", *object));
695 { 695 {
696 // Leaving JavaScript. 696 // Leaving JavaScript.
697 VMState state(EXTERNAL); 697 VMState state(isolate, EXTERNAL);
698 result = enum_fun(info); 698 result = enum_fun(info);
699 } 699 }
700 } 700 }
701 return result; 701 return result;
702 } 702 }
703 703
704 704
705 static bool ContainsOnlyValidKeys(Handle<FixedArray> array) { 705 static bool ContainsOnlyValidKeys(Handle<FixedArray> array) {
706 int len = array->length(); 706 int len = array->length();
707 for (int i = 0; i < len; i++) { 707 for (int i = 0; i < len; i++) {
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
931 931
932 OptimizedObjectForAddingMultipleProperties:: 932 OptimizedObjectForAddingMultipleProperties::
933 ~OptimizedObjectForAddingMultipleProperties() { 933 ~OptimizedObjectForAddingMultipleProperties() {
934 // Reoptimize the object to allow fast property access. 934 // Reoptimize the object to allow fast property access.
935 if (has_been_transformed_) { 935 if (has_been_transformed_) {
936 TransformToFastProperties(object_, unused_property_fields_); 936 TransformToFastProperties(object_, unused_property_fields_);
937 } 937 }
938 } 938 }
939 939
940 } } // namespace v8::internal 940 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/global-handles.cc ('k') | src/heap.cc » ('j') | src/top.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698