Changeset 61946 in webkit for trunk/JavaScriptCore


Ignore:
Timestamp:
Jun 25, 2010, 11:25:46 PM (15 years ago)
Author:
[email protected]
Message:

2010-06-25 Nathan Lawrence <[email protected]>

Reviewed by Geoffrey Garen.

We assume in testapi.c that the value aHeapRef refers to will not be
moved. When we have movable objects, this will not be the case.

  • API/tests/testapi.c: (main):
Location:
trunk/JavaScriptCore
Files:
2 edited

Legend:

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

    r60390 r61946  
    928928   
    929929    JSStringRef lengthStr = JSStringCreateWithUTF8CString("length");
    930     aHeapRef = JSObjectMakeArray(context, 0, 0, 0);
     930    JSObjectRef aStackRef = JSObjectMakeArray(context, 0, 0, 0);
     931    aHeapRef = aStackRef;
    931932    JSObjectSetProperty(context, aHeapRef, lengthStr, JSValueMakeNumber(context, 10), 0, 0);
    932933    JSStringRef privatePropertyName = JSStringCreateWithUTF8CString("privateProperty");
     
    937938        printf("PASS: Set private property.\n");
    938939    }
     940    aStackRef = 0;
    939941    if (JSObjectSetPrivateProperty(context, aHeapRef, privatePropertyName, aHeapRef)) {
    940942        printf("FAIL: JSObjectSetPrivateProperty should fail on non-API objects.\n");
     
    965967        JSObjectMake(context, 0, 0);
    966968
     969    aHeapRef = JSValueToObject(context, JSObjectGetPrivateProperty(context, myObject, privatePropertyName), 0);
    967970    if (JSValueToNumber(context, JSObjectGetProperty(context, aHeapRef, lengthStr, 0), 0) != 10) {
    968971        printf("FAIL: Private property has been collected.\n");
  • trunk/JavaScriptCore/ChangeLog

    r61927 r61946  
     12010-06-25  Nathan Lawrence  <[email protected]>
     2
     3        Reviewed by Geoffrey Garen.
     4
     5        We assume in testapi.c that the value aHeapRef refers to will not be
     6        moved.  When we have movable objects, this will not be the case.
     7
     8        * API/tests/testapi.c:
     9        (main):
     10
    1112010-06-25  Sheriff Bot  <[email protected]>
    212
Note: See TracChangeset for help on using the changeset viewer.