Ignore:
Timestamp:
Aug 18, 2008, 1:09:59 AM (17 years ago)
Author:
[email protected]
Message:

Reviewed by Maciej.

Make JSGlobalContextRetain/Release actually work.

  • API/JSContextRef.cpp: (JSGlobalContextRetain): (JSGlobalContextRelease): Ref/deref global data to give checking for globalData.refCount() some sense.
  • API/tests/testapi.c: (main): Added a test for this bug.
  • kjs/JSGlobalData.cpp: (KJS::JSGlobalData::~JSGlobalData): While checking for memory leaks, found that JSGlobalData::emptyList has changed to a pointer, but it was not destructed, causing a huge leak in run-webkit-tests --threaded.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/API/tests/testapi.c

    r35444 r35815  
    582582    JSClassRef globalObjectClass = JSClassCreate(&globalObjectClassDefinition);
    583583    context = JSGlobalContextCreate(globalObjectClass);
    584    
     584
     585    JSGlobalContextRetain(context);
     586    JSGlobalContextRelease(context);
     587
    585588    JSObjectRef globalObject = JSContextGetGlobalObject(context);
    586589    ASSERT(JSValueIsObject(context, globalObject));
Note: See TracChangeset for help on using the changeset viewer.