Bug 795150 - Add DOMCallbacks to worker thread JSRuntimes. (r=bz)

This commit is contained in:
Eric Faust 2012-10-03 12:32:06 -04:00
parent 8debe5cabb
commit cc7460a381

View File

@ -402,6 +402,12 @@ CreateJSContextForWorker(WorkerPrivate* aWorkerPrivate)
};
JS_SetSecurityCallbacks(runtime, &securityCallbacks);
// DOM helpers:
static js::DOMCallbacks DOMCallbacks = {
InstanceClassHasProtoAtDepth
};
SetDOMCallbacks(runtime, &DOMCallbacks);
JSContext* workerCx = JS_NewContext(runtime, 0);
if (!workerCx) {
JS_DestroyRuntime(runtime);