Add tracer support for JSOP_UNBRANDTHIS with primitive this. Bug 625399, r=Waldo.

This commit is contained in:
Jason Orendorff 2011-01-17 11:19:26 -06:00
parent 57aeaf92d6
commit 96fbd99178
2 changed files with 12 additions and 0 deletions

View File

@ -0,0 +1,7 @@
function a(bb) {
"use strict";
return;
this.d = function() { bb; };
}
for (var i = 0; i <= RUNLOOP; i++)
a();

View File

@ -16348,6 +16348,11 @@ TraceRecorder::record_JSOP_UNBRAND()
JS_REQUIRES_STACK AbortableRecordingStatus
TraceRecorder::record_JSOP_UNBRANDTHIS()
{
/* In case of primitive this, do nothing. */
JSStackFrame *fp = cx->fp();
if (fp->fun()->inStrictMode() && !fp->thisValue().isObject())
return ARECORD_CONTINUE;
LIns* this_ins;
RecordingStatus status = getThis(this_ins);
if (status != RECORD_CONTINUE)