Bug 763348 - Set private data on constructor instead of post method. r=jorendorff
authorBenjamin Peterson <benjamin@python.org>
Tue, 12 Jun 2012 21:29:02 -0400
changeset 96546 1eb234066998d32a74eda974521ecd6a6b388cf3
parent 96545 39f97be749d7e6e223ef33b5168f35e1dc277ee9
child 96547 3f1c7f0a6ec495c9ddebd4fdfca8b5439ec30f46
push id845
push usertim.taubert@gmx.de
push dateWed, 13 Jun 2012 13:35:17 +0000
treeherderfx-team@bdbed29aaaa6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjorendorff
bugs763348
milestone16.0a1
Bug 763348 - Set private data on constructor instead of post method. r=jorendorff
js/src/shell/jsworkers.cpp
--- a/js/src/shell/jsworkers.cpp
+++ b/js/src/shell/jsworkers.cpp
@@ -652,17 +652,17 @@ class Worker MOZ_FINAL : public WorkerPa
                                           NULL, jsMethods, NULL, NULL);
         if (!proto)
             goto bad;
 
         ctor = JS_GetConstructor(context, proto);
         if (!ctor)
             goto bad;
 
-        js::SetFunctionNativeReserved(post, 0, PRIVATE_TO_JSVAL(this));
+        js::SetFunctionNativeReserved(ctor, 0, PRIVATE_TO_JSVAL(this));
 
         JS_EndRequest(context);
         return true;
 
     bad:
         JS_EndRequest(context);
         JS_DestroyContext(context);
         context = NULL;