Bug 1173947 - Make getRandomValues message be urgent. r=mrbkap, a=ritu
authorBill McCloskey <billm@mozilla.com>
Tue, 07 Jul 2015 14:21:36 -0700
changeset 281783 d49806df40bbb9c3dcba3b6edd75acdfc812cc72
parent 281782 2ea47c7ed4e376d2862153af51ee3073359e8cc2
child 281784 d07c2f504fd7ed55ed960b764db788058c52e2e7
push id4932
push userjlund@mozilla.com
push dateMon, 10 Aug 2015 18:23:06 +0000
treeherdermozilla-beta@6dd5a4f5f745 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmrbkap, ritu
bugs1173947
milestone41.0a2
Bug 1173947 - Make getRandomValues message be urgent. r=mrbkap, a=ritu
dom/base/test/chrome/cpows_child.js
dom/ipc/PContent.ipdl
--- a/dom/base/test/chrome/cpows_child.js
+++ b/dom/base/test/chrome/cpows_child.js
@@ -87,16 +87,20 @@ function make_object()
 function make_json()
 {
   return { check: "ok" };
 }
 
 function parent_test(finish)
 {
   function f(check_func) {
+    // Make sure this doesn't crash.
+    let array = new Uint32Array(10);
+    content.crypto.getRandomValues(array);
+
     let result = check_func(10);
     ok(result == 20, "calling function in parent worked");
     return result;
   }
 
   addMessageListener("cpows:from_parent", (msg) => {
     let obj = msg.objects.obj;
     ok(obj.a == 1, "correct value from parent");
--- a/dom/ipc/PContent.ipdl
+++ b/dom/ipc/PContent.ipdl
@@ -720,17 +720,17 @@ parent:
 
     PRemoteSpellcheckEngine();
     PDeviceStorageRequest(DeviceStorageParams params);
 
     PFileSystemRequest(FileSystemParams params);
 
     sync PCrashReporter(NativeThreadId tid, uint32_t processType);
 
-    sync GetRandomValues(uint32_t length)
+    prio(urgent) sync GetRandomValues(uint32_t length)
         returns (uint8_t[] randomValues);
 
     async GetSystemMemory(uint64_t getterId);
 
     sync IsSecureURI(uint32_t type, URIParams uri, uint32_t flags)
         returns (bool isSecureURI);
 
     sync GetLookAndFeelCache(LookAndFeelInt[] lookAndFeelIntCache);