Closed Bug 721642 Opened 8 years ago Closed 8 years ago

js/src/jsproxy.cpp's proxy_TraceObject need not handle function proxies

Categories

(Core :: JavaScript Engine, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla13

People

(Reporter: jimb, Assigned: jimb)

Details

Attachments

(1 file)

There's no need for proxy_TraceObject to handle both object and function proxies.

Function proxies will always call proxy_TraceFunction, which takes care of marking the 'call' and 'construct' slots.

The attached patch also moves the call to proxy_TraceObject from proxy_TraceFunction into a tail position, so it could be compiled as a jump.
Really? I thought for cloned functions we use JSObject-sized allocations (might have changed in the meantime).
Try run for 5760242d704a is complete.
Detailed breakdown of the results available here:
    https://tbpl.mozilla.org/?tree=Try&rev=5760242d704a
Results (out of 207 total builds):
    success: 184
    warnings: 23
Builds (or logs if builds failed) available at:
http://ftp.mozilla.org/pub/mozilla.org/firefox/try-builds/jblandy@mozilla.com-5760242d704a
(In reply to Andreas Gal :gal from comment #2)
> Really? I thought for cloned functions we use JSObject-sized allocations
> (might have changed in the meantime).

I'm not sure what you mean. The question is, how will proxy_TraceObject ever be called to trace an object that has "call" and "construct" slots? I don't see how cloned functions come into the picture.
Version: unspecified → Trunk
Attachment #592067 - Flags: review?(gal)
Attachment #592067 - Flags: review?(gal) → review?(jorendorff)
Comment on attachment 592067 [details] [diff] [review]
Remove function proxy support from proxy_TraceObject.

The patch looks correct to me.
Attachment #592067 - Flags: review?(jorendorff) → review+
Try run for 31b17181105a is complete.
Detailed breakdown of the results available here:
    https://tbpl.mozilla.org/?tree=Try&rev=31b17181105a
Results (out of 216 total builds):
    exception: 1
    success: 176
    warnings: 37
    failure: 2
Builds (or logs if builds failed) available at:
http://ftp.mozilla.org/pub/mozilla.org/firefox/try-builds/jblandy@mozilla.com-31b17181105a
I didn't see anything that didn't look like an infrastructure exception or a known intermittent bug, so I've pushed this.
https://hg.mozilla.org/integration/mozilla-inbound/rev/c22135099e70
Status: NEW → ASSIGNED
Flags: in-testsuite+
OS: Linux → All
Hardware: x86_64 → All
Target Milestone: --- → mozilla13
Assignee: general → jimb
https://hg.mozilla.org/mozilla-central/rev/c22135099e70
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.