 Chromium Code Reviews
 Chromium Code Reviews Issue 2475433008:
  Set global proxy internal field count based on the global object template.  (Closed)
    
  
    Issue 2475433008:
  Set global proxy internal field count based on the global object template.  (Closed) 
  | Index: src/objects.h | 
| diff --git a/src/objects.h b/src/objects.h | 
| index 9e3c0372ce2e34c091dcda0510015f217c09b823..d07c93d355926160d28ed3b805b7c040cd54e87c 100644 | 
| --- a/src/objects.h | 
| +++ b/src/objects.h | 
| @@ -8504,6 +8504,10 @@ class JSGlobalProxy : public JSObject { | 
| inline bool IsDetachedFrom(JSGlobalObject* global) const; | 
| + static int SizeFor(int internal_field_count) { | 
| 
jochen (gone - plz use gerrit)
2016/11/04 08:06:23
can you move the body of this method to objects-in
 
dcheng
2016/11/04 09:27:19
Done.
 | 
| + return kHeaderSize + internal_field_count * kPointerSize; | 
| + } | 
| + | 
| // Dispatched behavior. | 
| DECLARE_PRINTER(JSGlobalProxy) | 
| DECLARE_VERIFIER(JSGlobalProxy) | 
| @@ -8511,9 +8515,7 @@ class JSGlobalProxy : public JSObject { | 
| // Layout description. | 
| static const int kNativeContextOffset = JSObject::kHeaderSize; | 
| static const int kHashOffset = kNativeContextOffset + kPointerSize; | 
| - static const int kSize = kHashOffset + kPointerSize; | 
| 
jochen (gone - plz use gerrit)
2016/11/04 08:06:23
kHeaderSize would usually not contain any of the d
 
dcheng
2016/11/04 09:27:19
Done.
 | 
| - static const int kSizeWithInternalFields = | 
| - kSize + v8::Context::kProxyInternalFieldCount * kPointerSize; | 
| + static const int kHeaderSize = kHashOffset + kPointerSize; | 
| private: | 
| DISALLOW_IMPLICIT_CONSTRUCTORS(JSGlobalProxy); |