mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 858097 - Fix StackFrame::epilogue to check |this| is an object to avoid OOM crashes. r=jwalden
--HG-- extra : rebase_source : d13d16bd9ab4fd9d875983c6a14f4d06417ff0c8
This commit is contained in:
parent
6b0d9bb8d0
commit
424483a21d
6
js/src/jit-test/tests/basic/bug858097.js
Normal file
6
js/src/jit-test/tests/basic/bug858097.js
Normal file
@ -0,0 +1,6 @@
|
||||
// |jit-test| allow-oom
|
||||
function MyObject( value ) {}
|
||||
gcparam("maxBytes", gcparam("gcBytes") + 4*(1));
|
||||
gczeal(4);
|
||||
function test() {}
|
||||
var obj = new test();
|
@ -407,8 +407,7 @@ StackFrame::epilogue(JSContext *cx)
|
||||
if (cx->compartment->debugMode())
|
||||
DebugScopes::onPopCall(this, cx);
|
||||
|
||||
|
||||
if (isConstructing() && returnValue().isPrimitive())
|
||||
if (isConstructing() && thisValue().isObject() && returnValue().isPrimitive())
|
||||
setReturnValue(ObjectValue(constructorThis()));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user