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

Side by Side Diff: src/isolate.cc

Issue 10861007: Rename JSGlobalProxy::context to native_context, (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 4 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/ia32/macro-assembler-ia32.cc ('k') | src/mark-compact.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 771 matching lines...) Expand 10 before | Expand all | Expand 10 after
782 }; 782 };
783 783
784 784
785 static MayAccessDecision MayAccessPreCheck(Isolate* isolate, 785 static MayAccessDecision MayAccessPreCheck(Isolate* isolate,
786 JSObject* receiver, 786 JSObject* receiver,
787 v8::AccessType type) { 787 v8::AccessType type) {
788 // During bootstrapping, callback functions are not enabled yet. 788 // During bootstrapping, callback functions are not enabled yet.
789 if (isolate->bootstrapper()->IsActive()) return YES; 789 if (isolate->bootstrapper()->IsActive()) return YES;
790 790
791 if (receiver->IsJSGlobalProxy()) { 791 if (receiver->IsJSGlobalProxy()) {
792 Object* receiver_context = JSGlobalProxy::cast(receiver)->context(); 792 Object* receiver_context = JSGlobalProxy::cast(receiver)->native_context();
793 if (!receiver_context->IsContext()) return NO; 793 if (!receiver_context->IsContext()) return NO;
794 794
795 // Get the native context of current top context. 795 // Get the native context of current top context.
796 // avoid using Isolate::native_context() because it uses Handle. 796 // avoid using Isolate::native_context() because it uses Handle.
797 Context* native_context = 797 Context* native_context =
798 isolate->context()->global_object()->native_context(); 798 isolate->context()->global_object()->native_context();
799 if (receiver_context == native_context) return YES; 799 if (receiver_context == native_context) return YES;
800 800
801 if (Context::cast(receiver_context)->security_token() == 801 if (Context::cast(receiver_context)->security_token() ==
802 native_context->security_token()) 802 native_context->security_token())
(...skipping 1230 matching lines...) Expand 10 before | Expand all | Expand 10 after
2033 2033
2034 #ifdef DEBUG 2034 #ifdef DEBUG
2035 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ 2035 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \
2036 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_); 2036 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_);
2037 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) 2037 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET)
2038 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) 2038 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET)
2039 #undef ISOLATE_FIELD_OFFSET 2039 #undef ISOLATE_FIELD_OFFSET
2040 #endif 2040 #endif
2041 2041
2042 } } // namespace v8::internal 2042 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ia32/macro-assembler-ia32.cc ('k') | src/mark-compact.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698