зеркало из https://github.com/mozilla/pjs.git
Bug 459948 - "Workers: update workers based on security review feedback". r+sr=sicking.
This commit is contained in:
Родитель
70896e7cc0
Коммит
946e425e3d
|
@ -320,7 +320,7 @@ 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!");
|
||||
|
||||
|
||||
JS_SetContextPrivate(cx, mWorker);
|
||||
|
||||
// Tell the worker which context it will be using
|
||||
|
@ -347,6 +347,9 @@ public:
|
|||
protected:
|
||||
|
||||
void RunQueue() {
|
||||
JSContext* cx = (JSContext*)PR_GetThreadPrivate(gJSContextIndex);
|
||||
NS_ASSERTION(cx, "nsDOMThreadService didn't give us a context!");
|
||||
|
||||
while (1) {
|
||||
nsCOMPtr<nsIRunnable> runnable;
|
||||
{
|
||||
|
@ -367,6 +370,9 @@ protected:
|
|||
}
|
||||
}
|
||||
|
||||
// Clear out any old cruft hanging around in the regexp statics.
|
||||
JS_ClearRegExpStatics(cx);
|
||||
|
||||
#ifdef DEBUG
|
||||
nsresult rv =
|
||||
#endif
|
||||
|
|
|
@ -89,14 +89,16 @@ NS_IMETHODIMP
|
|||
nsDOMWorkerSecurityManager::CanCreateInstance(JSContext* aJSContext,
|
||||
const nsCID& aCID)
|
||||
{
|
||||
return NS_OK;
|
||||
NS_NOTREACHED("Should not call this!");
|
||||
return NS_ERROR_UNEXPECTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDOMWorkerSecurityManager::CanGetService(JSContext* aJSContext,
|
||||
const nsCID& aCID)
|
||||
{
|
||||
return NS_OK;
|
||||
NS_NOTREACHED("Should not call this!");
|
||||
return NS_ERROR_UNEXPECTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
|
|
@ -57,6 +57,8 @@ _TEST_FILES = \
|
|||
test_threadErrors.html \
|
||||
test_threadTimeouts.html \
|
||||
test_longThread.html \
|
||||
test_recursion.html \
|
||||
test_regExpStatics.html \
|
||||
test_xhr.html \
|
||||
testXHR.txt \
|
||||
$(NULL)
|
||||
|
|
Загрузка…
Ссылка в новой задаче