mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-14 05:45:37 +00:00
Add tracer support for JSOP_UNBRANDTHIS with primitive this. Bug 625399, r=Waldo.
This commit is contained in:
parent
57aeaf92d6
commit
96fbd99178
7
js/src/jit-test/tests/basic/bug625399.js
Normal file
7
js/src/jit-test/tests/basic/bug625399.js
Normal file
@ -0,0 +1,7 @@
|
||||
function a(bb) {
|
||||
"use strict";
|
||||
return;
|
||||
this.d = function() { bb; };
|
||||
}
|
||||
for (var i = 0; i <= RUNLOOP; i++)
|
||||
a();
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user