If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

update TestXPC to use Request Model

RESOLVED FIXED

Status

()

Core
XPConnect
RESOLVED FIXED
8 years ago
8 years ago

People

(Reporter: timeless, Assigned: timeless)

Tracking

Trunk
x86
Mac OS X
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

14.46 KB, patch
timeless
: review+
timeless
: superreview+
Details | Diff | Splinter Review
(Assignee)

Description

8 years ago
for a long time, gecko conspired with spidermonkey to give a free pass from the request model to js code running on the main thread, as long as it didn't try to pass the context to another thread.

i can't remember when spidermonkey revoked that pass, but it was a while ago, and no one updated the tests.
(Assignee)

Comment 1

8 years ago
Created attachment 386225 [details] [diff] [review]
use requests

i just need someone to confirm that i've used the request model correctly.

note that this runs w/o fails, it does get plenty of assertions ("Script compiled without principals").
Attachment #386225 - Flags: superreview?(brendan)
Attachment #386225 - Flags: review?(brendan)
Comment on attachment 386225 [details] [diff] [review]
use requests

I owe jorendorff a review and I am out on paternity leave, so redirecting to Jason.

/be
Attachment #386225 - Flags: superreview?(jorendorff)
Attachment #386225 - Flags: superreview?(brendan)
Attachment #386225 - Flags: review?(jorendorff)
Attachment #386225 - Flags: review?(brendan)
Comment on attachment 386225 [details] [diff] [review]
use requests

Thanks for updating these.

In the new EvaluateScript function, please do printf("%s", msg);.  I think gcc warns about that otherwise.

In TestArgFormatter, it looks like you could just declare the AutoRequest at the top and stay in a request for the duration of the function. Then you could avoid the do-while(0) loop. That approach might also work in TestSecurityManager. I didn't look closely.

Would you be willing to s/%%/%/ and again use printf("%s", msg) instead of a plain printf(msg)?
Attachment #386225 - Flags: review?(jorendorff) → review+
Attachment #386225 - Flags: superreview?(jorendorff) → superreview?(mrbkap)
Comment on attachment 386225 [details] [diff] [review]
use requests

I meant to say, r=me with those changes, and once again thanks for the patch.

I'm not a superreviewer; maybe mrbkap...?

Updated

8 years ago
Attachment #386225 - Flags: superreview?(mrbkap) → superreview+
(Assignee)

Comment 5

8 years ago
Created attachment 389590 [details] [diff] [review]
updated

i've decided not to broaden the autorequests, i'm treating them as units and for tests this is perfectly fine.
Attachment #386225 - Attachment is obsolete: true
Attachment #389590 - Flags: superreview+
Attachment #389590 - Flags: review+
(Assignee)

Comment 6

8 years ago
http://hg.mozilla.org/mozilla-central/rev/7aa7add88115
Status: NEW → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.