mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 522839 - Deal with OOM when creating a context for a new worker thread. r=bent
This commit is contained in:
parent
b5c54b7e05
commit
42d9e3ec70
@ -372,7 +372,10 @@ public:
|
||||
|
||||
// Make sure we have a JSContext to run everything on.
|
||||
JSContext* cx = (JSContext*)PR_GetThreadPrivate(gJSContextIndex);
|
||||
NS_ASSERTION(cx, "nsDOMThreadService didn't give us a context!");
|
||||
if (!cx) {
|
||||
NS_ERROR("nsDOMThreadService didn't give us a context! Are we out of memory?");
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
NS_ASSERTION(!JS_GetGlobalObject(cx), "Shouldn't have a global!");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user