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

Unified Diff: src/objects-inl.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/objects-debug.cc ('k') | src/runtime.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects-inl.h
===================================================================
--- src/objects-inl.h (revision 539)
+++ src/objects-inl.h (working copy)
@@ -359,23 +359,25 @@
}
+bool Object::IsJSGlobalProxy() {
+ bool result = IsHeapObject() &&
+ (HeapObject::cast(this)->map()->instance_type() ==
+ JS_GLOBAL_PROXY_TYPE);
+ ASSERT(!result || IsAccessCheckNeeded());
+ return result;
+}
+
+
bool Object::IsGlobalObject() {
- return IsHeapObject() &&
- ((HeapObject::cast(this)->map()->instance_type() ==
- JS_GLOBAL_OBJECT_TYPE) ||
- (HeapObject::cast(this)->map()->instance_type() ==
- JS_BUILTINS_OBJECT_TYPE));
+ if (!IsHeapObject()) return false;
+
+ InstanceType type = HeapObject::cast(this)->map()->instance_type();
+ return type == JS_GLOBAL_OBJECT_TYPE ||
+ type == JS_BUILTINS_OBJECT_TYPE;
}
bool Object::IsJSGlobalObject() {
-#ifdef DEBUG
- if (IsHeapObject() &&
- (HeapObject::cast(this)->map()->instance_type() ==
- JS_GLOBAL_OBJECT_TYPE)) {
- ASSERT(IsAccessCheckNeeded());
- }
-#endif
return IsHeapObject() &&
(HeapObject::cast(this)->map()->instance_type() ==
JS_GLOBAL_OBJECT_TYPE);
@@ -397,7 +399,7 @@
bool Object::IsAccessCheckNeeded() {
return IsHeapObject()
- && HeapObject::cast(this)->map()->needs_access_check();
+ && HeapObject::cast(this)->map()->is_access_check_needed();
}
@@ -856,7 +858,7 @@
ACCESSORS(JSObject, properties, FixedArray, kPropertiesOffset)
-ACCESSORS(JSObject, elements, HeapObject, kElementsOffset)
+ACCESSORS(JSObject, elements, FixedArray, kElementsOffset)
void JSObject::initialize_properties() {
@@ -877,6 +879,8 @@
int JSObject::GetHeaderSize() {
switch (map()->instance_type()) {
+ case JS_GLOBAL_PROXY_TYPE:
+ return JSGlobalProxy::kSize;
case JS_GLOBAL_OBJECT_TYPE:
return JSGlobalObject::kSize;
case JS_BUILTINS_OBJECT_TYPE:
@@ -1202,6 +1206,7 @@
CAST_ACCESSOR(SharedFunctionInfo)
CAST_ACCESSOR(Map)
CAST_ACCESSOR(JSFunction)
+CAST_ACCESSOR(JSGlobalProxy)
CAST_ACCESSOR(JSGlobalObject)
CAST_ACCESSOR(JSBuiltinsObject)
CAST_ACCESSOR(Code)
@@ -1796,8 +1801,9 @@
ACCESSORS(GlobalObject, builtins, JSBuiltinsObject, kBuiltinsOffset)
ACCESSORS(GlobalObject, global_context, Context, kGlobalContextOffset)
+ACCESSORS(GlobalObject, global_receiver, JSObject, kGlobalReceiverOffset)
-ACCESSORS(JSGlobalObject, security_token, Object, kSecurityTokenOffset)
+ACCESSORS(JSGlobalProxy, context, Object, kContextOffset)
ACCESSORS(AccessorInfo, getter, Object, kGetterOffset)
ACCESSORS(AccessorInfo, setter, Object, kSetterOffset)
« no previous file with comments | « src/objects-debug.cc ('k') | src/runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698