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

Side by Side Diff: src/isolate.h

Issue 234913003: Allow allocation and GC in access check callbacks. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: added TODOs, addressed comments Created 6 years, 8 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 | « src/handles.cc ('k') | src/isolate.cc » ('j') | no next file with comments »
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 767 matching lines...) Expand 10 before | Expand all | Expand 10 after
778 778
779 Handle<JSArray> CaptureSimpleStackTrace(Handle<JSObject> error_object, 779 Handle<JSArray> CaptureSimpleStackTrace(Handle<JSObject> error_object,
780 Handle<Object> caller, 780 Handle<Object> caller,
781 int limit); 781 int limit);
782 void CaptureAndSetDetailedStackTrace(Handle<JSObject> error_object); 782 void CaptureAndSetDetailedStackTrace(Handle<JSObject> error_object);
783 783
784 // Returns if the top context may access the given global object. If 784 // Returns if the top context may access the given global object. If
785 // the result is false, the pending exception is guaranteed to be 785 // the result is false, the pending exception is guaranteed to be
786 // set. 786 // set.
787 787
788 // TODO(yangguo): temporary wrappers 788 bool MayNamedAccess(Handle<JSObject> receiver,
789 bool MayNamedAccessWrapper(Handle<JSObject> receiver, 789 Handle<Object> key,
790 Handle<Object> key,
791 v8::AccessType type) {
792 return MayNamedAccess(*receiver, *key, type);
793 }
794 bool MayIndexedAccessWrapper(Handle<JSObject> receiver,
795 uint32_t index,
796 v8::AccessType type) {
797 return MayIndexedAccess(*receiver, index, type);
798 }
799 void ReportFailedAccessCheckWrapper(Handle<JSObject> receiver,
800 v8::AccessType type) {
801 ReportFailedAccessCheck(*receiver, type);
802 }
803
804 bool MayNamedAccess(JSObject* receiver,
805 Object* key,
806 v8::AccessType type); 790 v8::AccessType type);
807 bool MayIndexedAccess(JSObject* receiver, 791 bool MayIndexedAccess(Handle<JSObject> receiver,
808 uint32_t index, 792 uint32_t index,
809 v8::AccessType type); 793 v8::AccessType type);
810 794
811 void SetFailedAccessCheckCallback(v8::FailedAccessCheckCallback callback); 795 void SetFailedAccessCheckCallback(v8::FailedAccessCheckCallback callback);
812 void ReportFailedAccessCheck(JSObject* receiver, v8::AccessType type); 796 void ReportFailedAccessCheck(Handle<JSObject> receiver, v8::AccessType type);
813 797
814 // Exception throwing support. The caller should use the result 798 // Exception throwing support. The caller should use the result
815 // of Throw() as its return value. 799 // of Throw() as its return value.
816 Failure* Throw(Object* exception, MessageLocation* location = NULL); 800 Failure* Throw(Object* exception, MessageLocation* location = NULL);
817 801
818 template <typename T> 802 template <typename T>
819 MUST_USE_RESULT MaybeHandle<T> Throw(Handle<Object> exception, 803 MUST_USE_RESULT MaybeHandle<T> Throw(Handle<Object> exception,
820 MessageLocation* location = NULL) { 804 MessageLocation* location = NULL) {
821 Throw(*exception, location); 805 Throw(*exception, location);
822 return MaybeHandle<T>(); 806 return MaybeHandle<T>();
(...skipping 764 matching lines...) Expand 10 before | Expand all | Expand 10 after
1587 } 1571 }
1588 1572
1589 EmbeddedVector<char, 128> filename_; 1573 EmbeddedVector<char, 128> filename_;
1590 FILE* file_; 1574 FILE* file_;
1591 int scope_depth_; 1575 int scope_depth_;
1592 }; 1576 };
1593 1577
1594 } } // namespace v8::internal 1578 } } // namespace v8::internal
1595 1579
1596 #endif // V8_ISOLATE_H_ 1580 #endif // V8_ISOLATE_H_
OLDNEW
« no previous file with comments | « src/handles.cc ('k') | src/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698