Bug 41176 - Fix testapi.c to account for movable objects
Summary: Fix testapi.c to account for movable objects
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nathan Lawrence
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-24 14:22 PDT by Nathan Lawrence
Modified: 2010-06-25 23:26 PDT (History)
5 users (show)

See Also:


Attachments
Patch (1.96 KB, patch)
2010-06-24 14:22 PDT, Nathan Lawrence
ggaren: review+
ggaren: commit-queue+
Details | Formatted Diff | Diff
Patch (2.14 KB, patch)
2010-06-25 11:45 PDT, Nathan Lawrence
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.