Changeset 32807 in webkit for trunk/JavaScriptCore/kjs/internal.h


Ignore:
Timestamp:
May 2, 2008, 3:07:53 AM (17 years ago)
Author:
[email protected]
Message:

Reviewed by Geoffrey Garen.

https://bugs.webkit.org/show_bug.cgi?id=18826
Make JavaScript heap per-thread

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/kjs/internal.h

    r32609 r32807  
    4646  class StringImp : public JSCell {
    4747  public:
    48     StringImp(const UString& v) : val(v) { Collector::reportExtraMemoryCost(v.cost()); }
     48    StringImp(const UString& v) : val(v) { Heap::heap(this)->reportExtraMemoryCost(v.cost()); }
    4949    enum HasOtherOwnerType { HasOtherOwner };
    5050    StringImp(const UString& value, HasOtherOwnerType) : val(value) { }
     
    6666  class NumberImp : public JSCell {
    6767    friend class ConstantValues;
    68     friend JSValue *jsNumberCell(double);
     68    friend JSValue* jsNumberCell(ExecState*, double);
    6969  public:
    7070    double value() const { return val; }
     
    7979    virtual JSObject *toObject(ExecState *exec) const;
    8080   
    81     void* operator new(size_t size)
     81    void* operator new(size_t size, ExecState* exec)
    8282    {
    83         return Collector::allocateNumber(size);
     83        return exec->heap()->allocateNumber(size);
    8484    }
     85
    8586  private:
    8687    NumberImp(double v) : val(v) { }
Note: See TracChangeset for help on using the changeset viewer.