зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1210607 - Check for null compartment in PopulateReportBlame() r=terrence
This commit is contained in:
Родитель
08c32a7a8c
Коммит
46c8da5401
|
@ -0,0 +1,9 @@
|
|||
// |jit-test| allow-oom
|
||||
|
||||
if (!('oomAfterAllocations' in this))
|
||||
quit();
|
||||
|
||||
var g = newGlobal();
|
||||
x = Debugger(g);
|
||||
selectforgc(g);
|
||||
oomAfterAllocations(0);
|
|
@ -252,11 +252,15 @@ ReportError(JSContext* cx, const char* message, JSErrorReport* reportp,
|
|||
static void
|
||||
PopulateReportBlame(JSContext* cx, JSErrorReport* report)
|
||||
{
|
||||
JSCompartment* compartment = cx->compartment();
|
||||
if (!compartment)
|
||||
return;
|
||||
|
||||
/*
|
||||
* Walk stack until we find a frame that is associated with a non-builtin
|
||||
* rather than a builtin frame and which we're allowed to know about.
|
||||
*/
|
||||
NonBuiltinFrameIter iter(cx, cx->compartment()->principals());
|
||||
NonBuiltinFrameIter iter(cx, compartment->principals());
|
||||
if (iter.done())
|
||||
return;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче