mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 21:31:04 +00:00
Bug 522839 - Deal with OOM when creating a context for a new worker thread. r=bent
This commit is contained in:
parent
df0c0ee8d7
commit
a6684af3a0
@ -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