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

Side by Side Diff: src/isolate.cc

Issue 9425048: Enable test-api/TurnOnAccessCheckAndRecompile and change it so it can't cause a GC. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 years, 10 months 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | test/cctest/cctest.status » ('j') | test/cctest/test-api.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 757 matching lines...) Expand 10 before | Expand all | Expand 10 after
768 // Get the data object from access check info. 768 // Get the data object from access check info.
769 JSFunction* constructor = JSFunction::cast(receiver->map()->constructor()); 769 JSFunction* constructor = JSFunction::cast(receiver->map()->constructor());
770 if (!constructor->shared()->IsApiFunction()) return; 770 if (!constructor->shared()->IsApiFunction()) return;
771 Object* data_obj = 771 Object* data_obj =
772 constructor->shared()->get_api_func_data()->access_check_info(); 772 constructor->shared()->get_api_func_data()->access_check_info();
773 if (data_obj == heap_.undefined_value()) return; 773 if (data_obj == heap_.undefined_value()) return;
774 774
775 HandleScope scope; 775 HandleScope scope;
776 Handle<JSObject> receiver_handle(receiver); 776 Handle<JSObject> receiver_handle(receiver);
777 Handle<Object> data(AccessCheckInfo::cast(data_obj)->data()); 777 Handle<Object> data(AccessCheckInfo::cast(data_obj)->data());
778 thread_local_top()->failed_access_check_callback_( 778 { VMState state(this, EXTERNAL);
779 v8::Utils::ToLocal(receiver_handle), 779 thread_local_top()->failed_access_check_callback_(
780 type, 780 v8::Utils::ToLocal(receiver_handle),
781 v8::Utils::ToLocal(data)); 781 type,
782 v8::Utils::ToLocal(data));
783 }
782 } 784 }
783 785
784 786
785 enum MayAccessDecision { 787 enum MayAccessDecision {
786 YES, NO, UNKNOWN 788 YES, NO, UNKNOWN
787 }; 789 };
788 790
789 791
790 static MayAccessDecision MayAccessPreCheck(Isolate* isolate, 792 static MayAccessDecision MayAccessPreCheck(Isolate* isolate,
791 JSObject* receiver, 793 JSObject* receiver,
(...skipping 1158 matching lines...) Expand 10 before | Expand all | Expand 10 after
1950 1952
1951 #ifdef DEBUG 1953 #ifdef DEBUG
1952 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ 1954 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \
1953 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_); 1955 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_);
1954 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) 1956 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET)
1955 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) 1957 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET)
1956 #undef ISOLATE_FIELD_OFFSET 1958 #undef ISOLATE_FIELD_OFFSET
1957 #endif 1959 #endif
1958 1960
1959 } } // namespace v8::internal 1961 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | test/cctest/cctest.status » ('j') | test/cctest/test-api.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698