Closed Bug 636251 Opened 9 years ago Closed 9 years ago

Use JSOPTION_NO_SCRIPT_RVAL in nsFrameMessageManager.cpp

Categories

(Core :: IPC, defect)

defect
Not set

Tracking

()

RESOLVED FIXED

People

(Reporter: mwu, Assigned: mwu)

Details

Attachments

(1 file)

The return value is never used so we can use JSOPTION_NO_SCRIPT_RVAL and pass null.
Attachment #514589 - Flags: review?(Olli.Pettay)
Comment on attachment 514589 [details] [diff] [review]
Use JSOPTION_NO_SCRIPT_RVAL in nsFrameMessageManager.cpp

I can't review this, since I haven't managed to find any good
documentation when JSOPTION_NO_SCRIPT_RVAL should be set and when unset.

Why couldn't it be set when mCx is created and never unset?
Attachment #514589 - Flags: review?(Olli.Pettay)
(In reply to comment #1)
> Comment on attachment 514589 [details] [diff] [review]
> Use JSOPTION_NO_SCRIPT_RVAL in nsFrameMessageManager.cpp
> 
> I can't review this, since I haven't managed to find any good
> documentation when JSOPTION_NO_SCRIPT_RVAL should be set and when unset.
> 
> Why couldn't it be set when mCx is created and never unset?

Most other code I've seen that set these sort of flags always unset them after compiling. I assume this is so other code trying to use this context don't unexpectedly get hit by flags they didn't set themselves.
Attachment #514589 - Flags: review?(jorendorff)
Comment on attachment 514589 [details] [diff] [review]
Use JSOPTION_NO_SCRIPT_RVAL in nsFrameMessageManager.cpp

I don't know what an nsFrameScriptExecutor is, but as far as JSAPI use is concerned, this patch is definitely good.
Attachment #514589 - Flags: review?(jorendorff) → review+
http://hg.mozilla.org/mozilla-central/rev/bde6b79dea6f
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.