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() {
return current;
}
JSObject* Context::global_proxy() {
JSGlobalProxy* Context::global_proxy() {
return native_context()->global_proxy_object();
}
void Context::set_global_proxy(JSObject* object) {
void Context::set_global_proxy(JSGlobalProxy* object) {
native_context()->set_global_proxy_object(object);
}
......
......@@ -110,7 +110,7 @@ enum ContextLookupFlags {
V(WEAKSET_ADD_INDEX, JSFunction, weakset_add)
#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) \
/* Below is alpha-sorted */ \
V(ACCESSOR_PROPERTY_DESCRIPTOR_MAP_INDEX, Map, \
......@@ -521,8 +521,8 @@ class Context : public FixedArray, public NeverReadOnlySpaceObject {
Context* closure_context();
// Returns a JSGlobalProxy object or null.
JSObject* global_proxy();
void set_global_proxy(JSObject* global);
JSGlobalProxy* global_proxy();
void set_global_proxy(JSGlobalProxy* global);
// Get the JSGlobalObject object.
V8_EXPORT_PRIVATE JSGlobalObject* global_object();
......
......@@ -2564,10 +2564,7 @@ bool JSFunction::has_context() const {
return READ_FIELD(this, kContextOffset)->IsContext();
}
JSObject* JSFunction::global_proxy() {
return context()->global_proxy();
}
JSGlobalProxy* JSFunction::global_proxy() { return context()->global_proxy(); }
Context* JSFunction::native_context() { return context()->native_context(); }
......
......@@ -693,6 +693,7 @@ class PropertyArray;
class FunctionLiteral;
class FunctionTemplateInfo;
class JSGlobalObject;
class JSGlobalProxy;
#ifdef V8_INTL_SUPPORT
class JSLocale;
class JSRelativeTimeFormat;
......@@ -3114,7 +3115,7 @@ class JSFunction: public JSObject {
inline Context* context();
inline bool has_context() const;
inline void set_context(Object* context);
inline JSObject* global_proxy();
inline JSGlobalProxy* global_proxy();
inline Context* native_context();
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