Closed
Bug 855411
Opened 13 years ago
Closed 13 years ago
GC: Rooting in xbl
Categories
(Core :: XBL, defect)
Core
XBL
Tracking
()
RESOLVED
FIXED
mozilla23
People
(Reporter: evilpies, Assigned: evilpies)
References
Details
Attachments
(13 files, 5 obsolete files)
|
2.75 KB,
patch
|
terrence
:
review+
bzbarsky
:
review+
|
Details | Diff | Splinter Review |
|
2.68 KB,
patch
|
terrence
:
review+
bzbarsky
:
review+
|
Details | Diff | Splinter Review |
|
9.55 KB,
patch
|
terrence
:
review+
bzbarsky
:
review+
|
Details | Diff | Splinter Review |
|
3.08 KB,
patch
|
terrence
:
review+
bzbarsky
:
review+
|
Details | Diff | Splinter Review |
|
4.04 KB,
patch
|
terrence
:
review+
bzbarsky
:
review+
|
Details | Diff | Splinter Review |
|
5.48 KB,
patch
|
terrence
:
review+
bzbarsky
:
review+
|
Details | Diff | Splinter Review |
|
4.04 KB,
patch
|
terrence
:
review+
bzbarsky
:
review+
|
Details | Diff | Splinter Review |
|
10.39 KB,
patch
|
terrence
:
review+
bzbarsky
:
review+
|
Details | Diff | Splinter Review |
|
4.49 KB,
patch
|
terrence
:
review+
bzbarsky
:
review+
|
Details | Diff | Splinter Review |
|
6.88 KB,
patch
|
terrence
:
review+
bzbarsky
:
review+
|
Details | Diff | Splinter Review |
|
12.05 KB,
patch
|
terrence
:
review+
bzbarsky
:
review+
|
Details | Diff | Splinter Review |
|
1.60 KB,
patch
|
bzbarsky
:
review+
|
Details | Diff | Splinter Review |
|
11.86 KB,
patch
|
bzbarsky
:
review+
|
Details | Diff | Splinter Review |
This should fix all rooting issues in xbl. There are something with Finalize that I didn't touch, because we shouldn't GC there.
| Assignee | ||
Comment 1•13 years ago
|
||
Fun times, just redid all of the patch piece by piece, because the browser was crashing on startup.
All because I wrote JS_DATA_TO_FUNC_PTR(JSPropertyOp, get.address()) instead of JS_DATA_TO_FUNC_PTR(JSPropertyOp, get.get()). I hope we can get rid of this soon.
| Assignee | ||
Comment 2•13 years ago
|
||
| Assignee | ||
Comment 3•13 years ago
|
||
| Assignee | ||
Comment 4•13 years ago
|
||
| Assignee | ||
Comment 5•13 years ago
|
||
| Assignee | ||
Comment 6•13 years ago
|
||
| Assignee | ||
Comment 7•13 years ago
|
||
| Assignee | ||
Comment 8•13 years ago
|
||
| Assignee | ||
Comment 9•13 years ago
|
||
| Assignee | ||
Comment 10•13 years ago
|
||
Flags: needinfo?
| Assignee | ||
Comment 11•13 years ago
|
||
Flags: needinfo?
| Assignee | ||
Comment 12•13 years ago
|
||
| Assignee | ||
Comment 13•13 years ago
|
||
| Assignee | ||
Comment 14•13 years ago
|
||
| Assignee | ||
Updated•13 years ago
|
Status: NEW → ASSIGNED
QA Contact: evilpies
| Assignee | ||
Comment 15•13 years ago
|
||
| Assignee | ||
Updated•13 years ago
|
Assignee: nobody → evilpies
QA Contact: evilpies
| Assignee | ||
Updated•13 years ago
|
Attachment #730444 -
Attachment is patch: true
| Assignee | ||
Comment 16•13 years ago
|
||
I dropped a method call that produced test failures. Fixed that now.
Attachment #730443 -
Attachment is obsolete: true
| Assignee | ||
Comment 17•13 years ago
|
||
I am not sure why this was making problems before, probably something else that I fixed during the rewrite.
Attachment #730444 -
Attachment is obsolete: true
| Assignee | ||
Comment 18•13 years ago
|
||
Try run is looking good: https://tbpl.mozilla.org/?tree=Try&rev=512525c6cb2d.
| Assignee | ||
Updated•13 years ago
|
Attachment #730445 -
Flags: review?(terrence)
Attachment #730445 -
Flags: review?(bzbarsky)
| Assignee | ||
Updated•13 years ago
|
Attachment #730446 -
Flags: review?(terrence)
Attachment #730446 -
Flags: review?(bzbarsky)
| Assignee | ||
Updated•13 years ago
|
Attachment #730447 -
Flags: review?(terrence)
Attachment #730447 -
Flags: review?(bzbarsky)
| Assignee | ||
Updated•13 years ago
|
Attachment #730449 -
Flags: review?(terrence)
Attachment #730449 -
Flags: review?(bzbarsky)
| Assignee | ||
Updated•13 years ago
|
Attachment #730450 -
Flags: review?(terrence)
Attachment #730450 -
Flags: review?(bzbarsky)
| Assignee | ||
Updated•13 years ago
|
Attachment #730451 -
Flags: review?(terrence)
Attachment #730451 -
Flags: review?(bzbarsky)
| Assignee | ||
Updated•13 years ago
|
Attachment #730453 -
Flags: review?(terrence)
Attachment #730453 -
Flags: review?(bzbarsky)
| Assignee | ||
Updated•13 years ago
|
Attachment #730454 -
Flags: review?(terrence)
Attachment #730454 -
Flags: review?(bzbarsky)
| Assignee | ||
Updated•13 years ago
|
Attachment #730455 -
Flags: review?(terrence)
Attachment #730455 -
Flags: review?(bzbarsky)
| Assignee | ||
Updated•13 years ago
|
Attachment #730456 -
Flags: review?(terrence)
Attachment #730456 -
Flags: review?(bzbarsky)
| Assignee | ||
Updated•13 years ago
|
Attachment #730457 -
Flags: review?(terrence)
Attachment #730457 -
Flags: review?(bzbarsky)
| Assignee | ||
Updated•13 years ago
|
Attachment #730707 -
Flags: review?(terrence)
Attachment #730707 -
Flags: review?(bzbarsky)
| Assignee | ||
Updated•13 years ago
|
Attachment #730708 -
Flags: review?(terrence)
Attachment #730708 -
Flags: review?(bzbarsky)
Comment 19•13 years ago
|
||
Comment on attachment 730445 [details] [diff] [review]
Lookup*
r=me
Attachment #730445 -
Flags: review?(bzbarsky) → review+
Comment 20•13 years ago
|
||
Comment on attachment 730446 [details] [diff] [review]
checkAccess
r=me
Attachment #730446 -
Flags: review?(bzbarsky) → review+
Comment 21•13 years ago
|
||
Comment on attachment 730447 [details] [diff] [review]
InstallMember
Why did you move the AutoPushJSContext? It's not exactly clear to me why this is safe. If you just need the JSContext before that, just get it instead of pushing, which has security-related side-effects and whatnot.
Attachment #730447 -
Flags: review?(bzbarsky) → review-
| Assignee | ||
Comment 22•13 years ago
|
||
Comment on attachment 730447 [details] [diff] [review]
InstallMember
Review of attachment 730447 [details] [diff] [review]:
-----------------------------------------------------------------
::: content/xbl/src/nsXBLProtoImpl.cpp
@@ +68,5 @@
> // class object in the bound document that represents the concrete version of this implementation.
> // This function also has the side effect of building up the prototype implementation if it has
> // not been built already.
> nsCOMPtr<nsIXPConnectJSObjectHolder> holder;
> + JS::Rooted<JSObject*> targetClassObject(cx, nullptr);
We need the context root this here.
Comment 23•13 years ago
|
||
Comment on attachment 730445 [details] [diff] [review]
Lookup*
Review of attachment 730445 [details] [diff] [review]:
-----------------------------------------------------------------
::: content/xbl/src/nsXBLBinding.h
@@ +87,5 @@
>
> /*
> * Internal version. Requires that aCx is in appropriate xbl scope.
> */
> bool LookupMemberInternal(JSContext* aCx, nsString& aName, JS::HandleId aNameAsId,
While you are here, might as well change this to JS::Handle<jsid>.
Attachment #730445 -
Flags: review?(terrence) → review+
Comment 24•13 years ago
|
||
Comment on attachment 730449 [details] [diff] [review]
CompileMember
>- nsresult rv = curr->CompileMember(context, mClassName, mClassObject);
>+ nsresult rv = curr->CompileMember(context, mClassName, classObject);
Why is this needed? If mClassObject is already rooted, seems like it should be usable here. Or is it not rooted yet? In that case, is it coming up?
r=me either way, I guess
Attachment #730449 -
Flags: review?(bzbarsky) → review+
Comment 25•13 years ago
|
||
> We need the context root this here.
Yes, I understand that. The point is you need the context, but do you need the modified JSContext stack and all that jazz?
Updated•13 years ago
|
Attachment #730446 -
Flags: review?(terrence) → review+
Updated•13 years ago
|
Attachment #730449 -
Flags: review?(terrence) → review+
Comment 26•13 years ago
|
||
Comment on attachment 730450 [details] [diff] [review]
read
Review of attachment 730450 [details] [diff] [review]:
-----------------------------------------------------------------
I don't know what the security implications of pushing a new context are, so I'll defer to :bz for that. The rooting looks fine, assuming that change is good.
Comment 27•13 years ago
|
||
Comment on attachment 730450 [details] [diff] [review]
read
Review of attachment 730450 [details] [diff] [review]:
-----------------------------------------------------------------
I don't know what the security implications of pushing a new context are, so I'll defer to :bz for that. The rooting looks fine, assuming that change is good.
Attachment #730450 -
Flags: review?(terrence) → review+
Updated•13 years ago
|
Attachment #730451 -
Flags: review?(terrence) → review+
Updated•13 years ago
|
Attachment #730453 -
Flags: review?(terrence) → review+
Comment 28•13 years ago
|
||
Comment on attachment 730450 [details] [diff] [review]
read
Don't push the cx. Just store it in a JSContext*.
Attachment #730450 -
Flags: review?(bzbarsky) → review-
Updated•13 years ago
|
Attachment #730454 -
Flags: review?(terrence) → review+
Updated•13 years ago
|
Attachment #730455 -
Flags: review?(terrence) → review+
Updated•13 years ago
|
Attachment #730456 -
Flags: review?(terrence) → review+
Updated•13 years ago
|
Attachment #730457 -
Flags: review?(terrence) → review+
Comment 29•13 years ago
|
||
Comment on attachment 730451 [details] [diff] [review]
execute
r=me
Attachment #730451 -
Flags: review?(bzbarsky) → review+
Comment 30•13 years ago
|
||
Comment on attachment 730453 [details] [diff] [review]
InstallXBLField
r=me
Attachment #730453 -
Flags: review?(bzbarsky) → review+
Comment 31•13 years ago
|
||
Comment on attachment 730454 [details] [diff] [review]
InstallAccessor
r=me
Attachment #730454 -
Flags: review?(bzbarsky) → review+
Comment 32•13 years ago
|
||
Comment on attachment 730455 [details] [diff] [review]
InstallField
r=me
Attachment #730455 -
Flags: review?(bzbarsky) → review+
Comment 33•13 years ago
|
||
Comment on attachment 730456 [details] [diff] [review]
Various stuff
r=me
Attachment #730456 -
Flags: review?(bzbarsky) → review+
Comment 34•13 years ago
|
||
Comment on attachment 730457 [details] [diff] [review]
Serialize
r=me
Attachment #730457 -
Flags: review?(bzbarsky) → review+
Comment 35•13 years ago
|
||
Comment on attachment 730708 [details] [diff] [review]
Init[Js]Clas v2
r=me
Attachment #730708 -
Flags: review?(bzbarsky) → review+
Comment 36•13 years ago
|
||
Comment on attachment 730707 [details] [diff] [review]
ChangeDocument v2
r=me
Attachment #730707 -
Flags: review?(bzbarsky) → review+
Updated•13 years ago
|
Attachment #730707 -
Flags: review?(terrence) → review+
Updated•13 years ago
|
Attachment #730708 -
Flags: review?(terrence) → review+
Comment 37•13 years ago
|
||
Comment on attachment 730447 [details] [diff] [review]
InstallMember
Review of attachment 730447 [details] [diff] [review]:
-----------------------------------------------------------------
I can't speak for the context movement, but the rest looks fine to me.
Attachment #730447 -
Flags: review?(terrence) → review+
| Assignee | ||
Comment 38•13 years ago
|
||
Attachment #730447 -
Attachment is obsolete: true
Attachment #731333 -
Flags: review?
| Assignee | ||
Comment 39•13 years ago
|
||
Attachment #731334 -
Flags: review?(bzbarsky)
| Assignee | ||
Updated•13 years ago
|
Attachment #731333 -
Flags: review? → review?(bzbarsky)
Comment 40•13 years ago
|
||
Comment on attachment 731334 [details] [diff] [review]
read v2
r=me
Attachment #731334 -
Flags: review?(bzbarsky) → review+
Comment 41•13 years ago
|
||
Comment on attachment 731333 [details] [diff] [review]
InstallMember - v2
> + JS::Rooted<JSObject*> targetScriptObject(cx);
How did that compile? cx is declared later....
Comment 42•13 years ago
|
||
Attachment #731333 -
Flags: review?(bzbarsky) → review-
| Assignee | ||
Updated•13 years ago
|
Attachment #730450 -
Attachment is obsolete: true
| Assignee | ||
Updated•13 years ago
|
Attachment #731334 -
Attachment description: read → read v2
| Assignee | ||
Comment 43•13 years ago
|
||
(In reply to Boris Zbarsky (:bz) from comment #42)
> Comment on attachment 731333 [details] [diff] [review]
> InstallMember - v2
>
> Per comment 41.
Let's just pretend this was
> JS::Rooted<JSObject*> targetScriptObject(context->GetNativeContext());
Okay?
| Assignee | ||
Comment 44•13 years ago
|
||
Compiles :)
Attachment #731333 -
Attachment is obsolete: true
Attachment #733684 -
Flags: review?(bzbarsky)
Comment 45•13 years ago
|
||
Comment on attachment 731333 [details] [diff] [review]
InstallMember - v2
r=me in that alternate universe. ;)
Attachment #731333 -
Flags: review- → review+
Updated•13 years ago
|
Attachment #733684 -
Flags: review?(bzbarsky) → review+
| Assignee | ||
Comment 46•13 years ago
|
||
Comment 47•13 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/0f2dc243e4c7
https://hg.mozilla.org/mozilla-central/rev/fea6d161488d
https://hg.mozilla.org/mozilla-central/rev/f7c2fc1b53c4
https://hg.mozilla.org/mozilla-central/rev/35ad506ee9ac
https://hg.mozilla.org/mozilla-central/rev/f066c15b6025
https://hg.mozilla.org/mozilla-central/rev/4bda5dd4a307
https://hg.mozilla.org/mozilla-central/rev/9cb8032812a8
https://hg.mozilla.org/mozilla-central/rev/00040dd1bf44
https://hg.mozilla.org/mozilla-central/rev/8e58ad2f288b
https://hg.mozilla.org/mozilla-central/rev/ddb51ef64845
https://hg.mozilla.org/mozilla-central/rev/1766922c611f
https://hg.mozilla.org/mozilla-central/rev/aee861088527
https://hg.mozilla.org/mozilla-central/rev/969674821d1a
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla23
You need to log in
before you can comment on or make changes to this bug.
Description
•