mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 606662: Don't methodjit scripts that have sharps, r=dvander
This commit is contained in:
parent
d1a33fd04c
commit
63c79a2f69
5
js/src/jit-test/tests/jaeger/bug606662-1.js
Normal file
5
js/src/jit-test/tests/jaeger/bug606662-1.js
Normal file
@ -0,0 +1,5 @@
|
||||
// don't assert
|
||||
new(function() {
|
||||
#1#
|
||||
})
|
||||
|
5
js/src/jit-test/tests/jaeger/bug606662-2.js
Normal file
5
js/src/jit-test/tests/jaeger/bug606662-2.js
Normal file
@ -0,0 +1,5 @@
|
||||
// don't crash
|
||||
try{a()}catch(e){}
|
||||
try{for(e in((JSON.e)(x=/x/)))throw []}catch(e){}
|
||||
try{(function(){c()})()}catch(e){}
|
||||
try{new function(){#1#}}catch(e){}
|
@ -228,6 +228,11 @@ mjit::TryCompile(JSContext *cx, JSStackFrame *fp)
|
||||
{
|
||||
JS_ASSERT(cx->fp() == fp);
|
||||
|
||||
#if JS_HAS_SHARP_VARS
|
||||
if (fp->script()->hasSharps)
|
||||
return Compile_Abort;
|
||||
#endif
|
||||
|
||||
// Ensure that constructors have at least one slot.
|
||||
if (fp->isConstructing() && !fp->script()->nslots)
|
||||
fp->script()->nslots++;
|
||||
|
Loading…
Reference in New Issue
Block a user