Changeset 36863 in webkit for trunk/JavaScriptCore/API/JSBase.cpp


Ignore:
Timestamp:
Sep 24, 2008, 1:38:55 PM (17 years ago)
Author:
[email protected]
Message:

2008-09-24 Geoffrey Garen <[email protected]>

Reviewed by Darin Adler.


Fixed <rdar://problem/5605532> Need a SPI for telling JS the size of
the objects it retains

  • API/JSBase.h: Filled in some missing function names.
  • API/tests/testapi.c: Test the new SPI a little.
  • API/JSSPI.cpp: Add the new SPI.
  • API/JSSPI.h: Add the new SPI.
  • JavaScriptCore.exp: Add the new SPI.
  • JavaScriptCore.xcodeproj/project.pbxproj: Add the new SPI.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/API/JSBase.cpp

    r36263 r36863  
    2626#include "config.h"
    2727#include "JSBase.h"
     28#include "JSBasePrivate.h"
    2829
    2930#include "APICast.h"
     
    103104    // the collector is busy.
    104105}
     106
     107void JSReportExtraMemoryCost(JSContextRef ctx, size_t size)
     108{
     109    ExecState* exec = toJS(ctx);
     110    exec->globalData().heap->registerThread();
     111    JSLock lock(exec);
     112
     113    exec->globalData().heap->reportExtraMemoryCost(size);
     114}
Note: See TracChangeset for help on using the changeset viewer.