Bug 41176

Summary: Fix testapi.c to account for movable objects
Product: WebKit Reporter: Nathan Lawrence <nlawrence>
Component: JavaScriptCoreAssignee: Nathan Lawrence <nlawrence>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, ggaren, nlawrence, oliver, slewis
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch
ggaren: review+, ggaren: commit-queue+
Patch none

Description Nathan Lawrence 2010-06-24 14:22:02 PDT
Created attachment 59701 [details]
Patch

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.
Comment 1 Geoffrey Garen 2010-06-24 15:53:29 PDT
Comment on attachment 59701 [details]
Patch

r=me
Comment 2 Oliver Hunt 2010-06-24 23:45:49 PDT
Comment on attachment 59701 [details]
Patch

aStackRef should be cleared immediately after JSObjectSetPrivateProperty as the private storage should then keep the heap reference live.
Comment 3 Oliver Hunt 2010-06-24 23:48:06 PDT
Basically because aHeapRef needs to be pinned somehow -- realistically we'll need some kind of layer for API objects to GC allocate handles i guess :-/
Comment 4 Nathan Lawrence 2010-06-25 11:45:12 PDT
Created attachment 59784 [details]
Patch
Comment 5 Nathan Lawrence 2010-06-25 11:46:09 PDT
Updated per Oliver's comment.
Comment 6 Geoffrey Garen 2010-06-25 11:54:13 PDT
(In reply to comment #3)
> Basically because aHeapRef needs to be pinned somehow -- realistically we'll need some kind of layer for API objects to GC allocate handles i guess :-/

The current plan is just not to move objects pointed to by the stack.
Comment 7 Geoffrey Garen 2010-06-25 16:54:26 PDT
Comment on attachment 59784 [details]
Patch

r=me
Comment 8 WebKit Commit Bot 2010-06-25 23:25:58 PDT
Comment on attachment 59784 [details]
Patch

Clearing flags on attachment: 59784

Committed r61946: <http://trac.webkit.org/changeset/61946>
Comment 9 WebKit Commit Bot 2010-06-25 23:26:03 PDT
All reviewed patches have been landed.  Closing bug.