Stop checking for compileAndGo in GetPCCountScriptContents

RESOLVED FIXED in mozilla36

Status

()

RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: bzbarsky, Assigned: bzbarsky)

Tracking

unspecified
mozilla36
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

Doesn't seem like there's a good reason for it.
Created attachment 8524667 [details] [diff] [review]
Stop checking compileAndGo in GetPCCountScriptContents

This seems a bit weird in that it makes us return the empty string in _more_ cases.  Specifically, we used to not do that when the script was compileAndGo but now we will?  What's the real goal of this early return?
Attachment #8524667 - Flags: review?(bhackett1024)
Comment on attachment 8524667 [details] [diff] [review]
Stop checking compileAndGo in GetPCCountScriptContents

Review of attachment 8524667 [details] [diff] [review]:
-----------------------------------------------------------------

::: js/src/jsopcode.cpp
@@ +2397,1 @@
>          return buf.finishString();

I think it would be better to just delete this |if| statement entirely.  This now has the effect of not getting PC counts for any global scripts, which we don't want to happen.  I vaguely remember there being some issue with global non-CNG scripts when I originally wrote this but don't remember what it is.  But there isn't any intrinsic reason why we should discriminate between scripts with and without functions here.
Attachment #8524667 - Flags: review?(bhackett1024) → review+
https://hg.mozilla.org/mozilla-central/rev/e20b1f0d5763
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.