Commit 23ab7c75 authored by Georg Neis's avatar Georg Neis Committed by Commit Bot

Use JSGlobalProxy type for the global proxy field on Context.

R=mslekova@chromium.org

Change-Id: I1f60108effa15585a7cf5af150fc4c1d4dd9570f
Reviewed-on: https://chromium-review.googlesource.com/1142160Reviewed-by: 's avatarSigurd Schneider <sigurds@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54540}
parent 4a6a631b
...@@ -130,13 +130,11 @@ Context* Context::script_context() { ...@@ -130,13 +130,11 @@ Context* Context::script_context() {
return current; return current;
} }
JSGlobalProxy* Context::global_proxy() {
JSObject* Context::global_proxy() {
return native_context()->global_proxy_object(); return native_context()->global_proxy_object();
} }
void Context::set_global_proxy(JSGlobalProxy* object) {
void Context::set_global_proxy(JSObject* object) {
native_context()->set_global_proxy_object(object); native_context()->set_global_proxy_object(object);
} }
......
...@@ -110,7 +110,7 @@ enum ContextLookupFlags { ...@@ -110,7 +110,7 @@ enum ContextLookupFlags {
V(WEAKSET_ADD_INDEX, JSFunction, weakset_add) V(WEAKSET_ADD_INDEX, JSFunction, weakset_add)
#define NATIVE_CONTEXT_FIELDS(V) \ #define NATIVE_CONTEXT_FIELDS(V) \
V(GLOBAL_PROXY_INDEX, JSObject, global_proxy_object) \ V(GLOBAL_PROXY_INDEX, JSGlobalProxy, global_proxy_object) \
V(EMBEDDER_DATA_INDEX, FixedArray, embedder_data) \ V(EMBEDDER_DATA_INDEX, FixedArray, embedder_data) \
/* Below is alpha-sorted */ \ /* Below is alpha-sorted */ \
V(ACCESSOR_PROPERTY_DESCRIPTOR_MAP_INDEX, Map, \ V(ACCESSOR_PROPERTY_DESCRIPTOR_MAP_INDEX, Map, \
...@@ -521,8 +521,8 @@ class Context : public FixedArray, public NeverReadOnlySpaceObject { ...@@ -521,8 +521,8 @@ class Context : public FixedArray, public NeverReadOnlySpaceObject {
Context* closure_context(); Context* closure_context();
// Returns a JSGlobalProxy object or null. // Returns a JSGlobalProxy object or null.
JSObject* global_proxy(); JSGlobalProxy* global_proxy();
void set_global_proxy(JSObject* global); void set_global_proxy(JSGlobalProxy* global);
// Get the JSGlobalObject object. // Get the JSGlobalObject object.
V8_EXPORT_PRIVATE JSGlobalObject* global_object(); V8_EXPORT_PRIVATE JSGlobalObject* global_object();
......
...@@ -2564,10 +2564,7 @@ bool JSFunction::has_context() const { ...@@ -2564,10 +2564,7 @@ bool JSFunction::has_context() const {
return READ_FIELD(this, kContextOffset)->IsContext(); return READ_FIELD(this, kContextOffset)->IsContext();
} }
JSObject* JSFunction::global_proxy() { JSGlobalProxy* JSFunction::global_proxy() { return context()->global_proxy(); }
return context()->global_proxy();
}
Context* JSFunction::native_context() { return context()->native_context(); } Context* JSFunction::native_context() { return context()->native_context(); }
......
...@@ -693,6 +693,7 @@ class PropertyArray; ...@@ -693,6 +693,7 @@ class PropertyArray;
class FunctionLiteral; class FunctionLiteral;
class FunctionTemplateInfo; class FunctionTemplateInfo;
class JSGlobalObject; class JSGlobalObject;
class JSGlobalProxy;
#ifdef V8_INTL_SUPPORT #ifdef V8_INTL_SUPPORT
class JSLocale; class JSLocale;
class JSRelativeTimeFormat; class JSRelativeTimeFormat;
...@@ -3114,7 +3115,7 @@ class JSFunction: public JSObject { ...@@ -3114,7 +3115,7 @@ class JSFunction: public JSObject {
inline Context* context(); inline Context* context();
inline bool has_context() const; inline bool has_context() const;
inline void set_context(Object* context); inline void set_context(Object* context);
inline JSObject* global_proxy(); inline JSGlobalProxy* global_proxy();
inline Context* native_context(); inline Context* native_context();
static Handle<Object> GetName(Isolate* isolate, Handle<JSFunction> function); static Handle<Object> GetName(Isolate* isolate, Handle<JSFunction> function);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment