mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1006876 - Use JS_CHECK_RECURSION_DONT_REPORT inside SavedStacksMetadataCallback. r=ejprbruel
This commit is contained in:
parent
aaad95841d
commit
f328ef948d
@ -0,0 +1,10 @@
|
||||
// |jit-test| exitstatus: 3
|
||||
|
||||
// This test case was found by the fuzzer and crashed the js shell. It should
|
||||
// throw a "too much recursion" error, but was crashing instead.
|
||||
|
||||
enableTrackAllocations();
|
||||
function f() {
|
||||
f();
|
||||
}
|
||||
f();
|
@ -520,6 +520,12 @@ SavedStacks::createFrameFromLookup(JSContext *cx, SavedFrame::Lookup &lookup)
|
||||
bool
|
||||
SavedStacksMetadataCallback(JSContext *cx, JSObject **pmetadata)
|
||||
{
|
||||
// Do not save the stack if the metadata callback was triggered in response
|
||||
// to a too-much-recursion error. Don't report because it has already been
|
||||
// reported since we are being asked to create metadata for the
|
||||
// too-much-recursion Error object.
|
||||
JS_CHECK_RECURSION_DONT_REPORT(cx, return true);
|
||||
|
||||
Rooted<SavedFrame *> frame(cx);
|
||||
if (!cx->compartment()->savedStacks().saveCurrentStack(cx, &frame))
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user