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

Side by Side Diff: src/objects.h

Issue 101733002: Fixed global object leak (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: spacing Created 7 years 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 860 matching lines...) Expand 10 before | Expand all | Expand 10 after
871 WriteBarrierMode mode = UPDATE_WRITE_BARRIER); \ 871 WriteBarrierMode mode = UPDATE_WRITE_BARRIER); \
872 872
873 class AccessorPair; 873 class AccessorPair;
874 class AllocationSite; 874 class AllocationSite;
875 class AllocationSiteCreationContext; 875 class AllocationSiteCreationContext;
876 class AllocationSiteUsageContext; 876 class AllocationSiteUsageContext;
877 class DictionaryElementsAccessor; 877 class DictionaryElementsAccessor;
878 class ElementsAccessor; 878 class ElementsAccessor;
879 class Failure; 879 class Failure;
880 class FixedArrayBase; 880 class FixedArrayBase;
881 class GlobalObject;
881 class ObjectVisitor; 882 class ObjectVisitor;
882 class StringStream; 883 class StringStream;
883 class Type; 884 class Type;
884 885
885 886
886 // A template-ized version of the IsXXX functions. 887 // A template-ized version of the IsXXX functions.
887 template <class C> inline bool Is(Object* obj); 888 template <class C> inline bool Is(Object* obj);
888 889
889 #ifdef VERIFY_HEAP 890 #ifdef VERIFY_HEAP
890 #define DECLARE_VERIFIER(Name) void Name##Verify(); 891 #define DECLARE_VERIFIER(Name) void Name##Verify();
(...skipping 6514 matching lines...) Expand 10 before | Expand all | Expand 10 after
7405 7406
7406 class JSGlobalProxy : public JSObject { 7407 class JSGlobalProxy : public JSObject {
7407 public: 7408 public:
7408 // [native_context]: the owner native context of this global proxy object. 7409 // [native_context]: the owner native context of this global proxy object.
7409 // It is null value if this object is not used by any context. 7410 // It is null value if this object is not used by any context.
7410 DECL_ACCESSORS(native_context, Object) 7411 DECL_ACCESSORS(native_context, Object)
7411 7412
7412 // Casting. 7413 // Casting.
7413 static inline JSGlobalProxy* cast(Object* obj); 7414 static inline JSGlobalProxy* cast(Object* obj);
7414 7415
7416 inline bool IsDetachedFrom(GlobalObject* global);
7417
7415 // Dispatched behavior. 7418 // Dispatched behavior.
7416 DECLARE_PRINTER(JSGlobalProxy) 7419 DECLARE_PRINTER(JSGlobalProxy)
7417 DECLARE_VERIFIER(JSGlobalProxy) 7420 DECLARE_VERIFIER(JSGlobalProxy)
7418 7421
7419 // Layout description. 7422 // Layout description.
7420 static const int kNativeContextOffset = JSObject::kHeaderSize; 7423 static const int kNativeContextOffset = JSObject::kHeaderSize;
7421 static const int kSize = kNativeContextOffset + kPointerSize; 7424 static const int kSize = kNativeContextOffset + kPointerSize;
7422 7425
7423 private: 7426 private:
7424 DISALLOW_IMPLICIT_CONSTRUCTORS(JSGlobalProxy); 7427 DISALLOW_IMPLICIT_CONSTRUCTORS(JSGlobalProxy);
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
7474 // JavaScript global object. 7477 // JavaScript global object.
7475 class JSGlobalObject: public GlobalObject { 7478 class JSGlobalObject: public GlobalObject {
7476 public: 7479 public:
7477 // Casting. 7480 // Casting.
7478 static inline JSGlobalObject* cast(Object* obj); 7481 static inline JSGlobalObject* cast(Object* obj);
7479 7482
7480 // Ensure that the global object has a cell for the given property name. 7483 // Ensure that the global object has a cell for the given property name.
7481 static Handle<PropertyCell> EnsurePropertyCell(Handle<JSGlobalObject> global, 7484 static Handle<PropertyCell> EnsurePropertyCell(Handle<JSGlobalObject> global,
7482 Handle<Name> name); 7485 Handle<Name> name);
7483 7486
7487 inline bool IsDetached();
7488
7484 // Dispatched behavior. 7489 // Dispatched behavior.
7485 DECLARE_PRINTER(JSGlobalObject) 7490 DECLARE_PRINTER(JSGlobalObject)
7486 DECLARE_VERIFIER(JSGlobalObject) 7491 DECLARE_VERIFIER(JSGlobalObject)
7487 7492
7488 // Layout description. 7493 // Layout description.
7489 static const int kSize = GlobalObject::kHeaderSize; 7494 static const int kSize = GlobalObject::kHeaderSize;
7490 7495
7491 private: 7496 private:
7492 DISALLOW_IMPLICIT_CONSTRUCTORS(JSGlobalObject); 7497 DISALLOW_IMPLICIT_CONSTRUCTORS(JSGlobalObject);
7493 }; 7498 };
(...skipping 3112 matching lines...) Expand 10 before | Expand all | Expand 10 after
10606 } else { 10611 } else {
10607 value &= ~(1 << bit_position); 10612 value &= ~(1 << bit_position);
10608 } 10613 }
10609 return value; 10614 return value;
10610 } 10615 }
10611 }; 10616 };
10612 10617
10613 } } // namespace v8::internal 10618 } } // namespace v8::internal
10614 10619
10615 #endif // V8_OBJECTS_H_ 10620 #endif // V8_OBJECTS_H_
OLDNEW
« src/api.cc ('K') | « src/bootstrapper.cc ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698