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

Unified Diff: src/top.h

Issue 7366: Split window support from V8. ... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 12 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/stub-cache-ia32.cc ('k') | src/top.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/top.h
===================================================================
--- src/top.h (revision 539)
+++ src/top.h (working copy)
@@ -42,7 +42,6 @@
class ThreadLocalTop BASE_EMBEDDED {
public:
- Context* security_context_;
// The context where the current execution method is created and for variable
// lookups.
Context* context_;
@@ -70,12 +69,11 @@
};
#define TOP_ADDRESS_LIST(C) \
- C(handler_address) \
+ C(handler_address) \
C(c_entry_fp_address) \
C(context_address) \
C(pending_exception_address) \
- C(external_caught_exception_address) \
- C(security_context_address)
+ C(external_caught_exception_address)
class Top {
public:
@@ -88,18 +86,6 @@
static Address get_address_from_id(AddressId id);
- // Access to the security context from which JS execution started.
- // In a browser world, it is the JS context of the frame which initiated
- // JavaScript execution.
- static Context* security_context() { return thread_local_.security_context_; }
- static void set_security_context(Context* context) {
- ASSERT(context == NULL || context->IsGlobalContext());
- thread_local_.security_context_ = context;
- }
- static Context** security_context_address() {
- return &thread_local_.security_context_;
- }
-
// Access to top context (where the current function object was created).
static Context* context() { return thread_local_.context_; }
static void set_context(Context* context) {
@@ -243,18 +229,22 @@
static void Iterate(ObjectVisitor* v, ThreadLocalTop* t);
static char* Iterate(ObjectVisitor* v, char* t);
- static Handle<JSObject> global() {
- return Handle<JSObject>(context()->global());
+ // Returns the global object of the current context. It could be
+ // a builtin object, or a js global object.
+ static Handle<GlobalObject> global() {
+ return Handle<GlobalObject>(context()->global());
}
+
+ // Returns the global proxy object of the current context.
+ static Object* global_proxy() {
+ return context()->global_proxy();
+ }
+
static Handle<Context> global_context();
static Handle<JSBuiltinsObject> builtins() {
return Handle<JSBuiltinsObject>(thread_local_.context_->builtins());
}
- static Handle<JSBuiltinsObject> security_context_builtins() {
- return Handle<JSBuiltinsObject>(
- thread_local_.security_context_->builtins());
- }
static Object* LookupSpecialFunction(JSObject* receiver,
JSObject* prototype,
@@ -308,24 +298,20 @@
public:
SaveContext() :
context_(Top::context()),
- security_context_(Top::security_context()),
prev_(Top::save_context()) {
Top::set_save_context(this);
}
~SaveContext() {
Top::set_context(*context_);
- Top::set_security_context(*security_context_);
Top::set_save_context(prev_);
}
Handle<Context> context() { return context_; }
- Handle<Context> security_context() { return security_context_; }
SaveContext* prev() { return prev_; }
private:
Handle<Context> context_;
- Handle<Context> security_context_;
SaveContext* prev_;
};
@@ -334,19 +320,16 @@
#ifdef DEBUG
public:
AssertNoContextChange() :
- context_(Top::context()),
- security_context_(Top::security_context()) {
+ context_(Top::context()) {
}
~AssertNoContextChange() {
ASSERT(Top::context() == *context_);
- ASSERT(Top::security_context() == *security_context_);
}
private:
HandleScope scope_;
Handle<Context> context_;
- Handle<Context> security_context_;
#else
public:
AssertNoContextChange() { }
« no previous file with comments | « src/stub-cache-ia32.cc ('k') | src/top.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698